alipy.query_strategy.query_type. QueryTypeAURO

AURO select one instance and its 2 labels to query which one is more relevant.

The query type of this method is different with the normal active learning algorithms that always query labels. To this end, the label matrix you provided can have the following additional information:

1. -1 means irrelevant. 2. A positive value means relevant, the larger, the more relevant. (However, do not use 2 which is defined as the dummy label)

References

----------

[1] Huang S J , Chen S , Zhou Z H . Multi-label active learning: query type matters[C]// Proceedings of the 24th International Joint Conference on Artificial Intelligence, pages 946-952, Buenos Aires, Argentina, July 25-31, 2015

Methods

init

__init__(self, X, y)
Parameters
X: 2D array
Feature matrix of the whole dataset. It is a reference which will not use additional memory.
y: array-like
Label matrix of the whole dataset. It is a reference which will not use additional memory.

select

select(self, label_index, unlabel_index, **kwargs)

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

Parameters:
label_index: {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 labels.
unlabel_index: {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 labels.
Returns:
selected_ins: int
The index of selected instance.
y1, y2: int
The indexes of selected labels.

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