query_strategy.query_labels. QueryInstanceRandom

QueryInstanceRandom(X=None, y=None, **kwargs)

Methods

select

select(self, label_index, unlabel_index, batch_size=1)

Randomly sample a batch of indexes from the unlabel indexes.

Parameters:
label_index: object
Add this parameter to ensure the consistency of api of strategies. Please ignore it.
unlabel_index: collections.Iterable
The indexes of unlabeled set.
batch_size: int, optional (default=1)
Selection batch size.
Returns:
selected_idx: list
The selected indexes which is a subset of unlabel_index.

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