alipy.query_strategy.query_features. QueryFeatureRandom

Randomly pick a missing feature to query.

Methods

select

select(self, observed_entries, unkonwn_entries, batch_size=1, **kwargs)

Select a subset from the unlabeled set, return the selected instance and feature.

Parameters:
observed_entries: {list, np.ndarray, MultiLabelIndexCollection}
The indexes of labeled samples. It should be a 1d array of indexes (column major, start from 0)
or MultiLabelIndexCollection or a list of tuples with 2 elements, in which,
the 1st element is the index of instance and the 2nd element is the index of features.
unkonwn_entries: {list, np.ndarray, MultiLabelIndexCollection}
The indexes of unlabeled samples. It should be a 1d array of indexes (column major, start from 0)
or MultiLabelIndexCollection or a list of tuples with 2 elements, in which,
the 1st element is the index of instance and the 2nd element is the index of features.
batch_size: int, optional (default=1)
Selection batch size.
Returns:
selected_feature: list
The selected features, it is a list of tuples.
Note that, the index is a subset of unkonwn_entries.

Copyright © 2018, alipy developers (BSD 3 License).