asreview.models.queriers.HybridMaxRandom#
- class asreview.models.queriers.HybridMaxRandom(probability=0.95, random_state=None)[source]#
Bases:
QueryMixin
,BaseEstimator
95% Maximum and 5% Random query strategy.
A mix of maximum and random query strategies with a mix ratio of 0.95. At each query 95% of the instances would be sampled with the maximum query strategy after which the remaining 5% would be sampled with the random query strategy.
- Parameters:
Methods
__init__
([probability, random_state])Get metadata routing of this object.
get_params
([deep])Get parameters for this estimator.
query
(p)Rank the instances of the feature matrix.
set_params
(**params)Set the parameters of this estimator.
Attributes
- get_metadata_routing()#
Get metadata routing of this object.
Please check User Guide on how the routing mechanism works.
- Returns:
routing (MetadataRequest) – A
MetadataRequest
encapsulating routing information.
- get_params(deep=True)#
Get parameters for this estimator.
- Parameters:
deep (bool, default=True) – If True, will return the parameters for this estimator and contained subobjects that are estimators.
- Returns:
params (dict) – Parameter names mapped to their values.
- label = 'Mixed (95% Maximum and 5% Random)'#
- name = 'max_random'#
- query(p)[source]#
Rank the instances of the feature matrix.
- Parameters:
p (numpy.ndarray) – The probability of inclusion for each record in the feature matrix.
- Returns:
numpy.ndarray – The QueryStrategy ranks the row numbers of the feature matrix. It returns an array of shape (len(X),) containing the row indices in ranked order.
- set_params(**params)#
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as
Pipeline
). The latter have parameters of the form<component>__<parameter>
so that it’s possible to update each component of a nested object.- Parameters:
**params (dict) – Estimator parameters.
- Returns:
self (estimator instance) – Estimator instance.