skactiveml.pool.uncertainty_scores#
- skactiveml.pool.uncertainty_scores(probas, cost_matrix=None, method='least_confident')[source]#
Computes uncertainty scores. Three methods are available: least confident (‘least_confident’), margin sampling (‘margin_sampling’), and entropy based uncertainty (‘entropy’) [1]. For the least confident and margin sampling methods cost-sensitive variants are implemented in case of a given cost matrix (see [2] for more information).
- Parameters
- probasarray-like, shape (n_samples, n_classes)
Class membership probabilities for each sample.
- cost_matrixarray-like, shape (n_classes, n_classes)
Cost matrix with C[i,j] defining the cost of predicting class j for a sample with the actual class i. Only supported for least confident variant.
- method{‘least_confident’, ‘margin_sampling’, ‘entropy’},
optional (default=’least_confident’)
Least confidence (lc) queries the sample whose maximal posterior probability is minimal. In case of a given cost matrix, the maximial expected cost variant is used. Smallest margin (sm) queries the sample whose posterior probability gap between the most and the second most probable class label is minimal. In case of a given cost matrix, the cost-weighted minimum margin is used. Entropy (‘entropy’) queries the sample whose posterior’s have the maximal entropy. There is no cost-sensitive variant of entropy based uncertainty sampling.
References
- [1] Settles, Burr. “Active learning literature survey”.
University of Wisconsin-Madison Department of Computer Sciences, 2009.
- [2] Chen, Po-Lung, and Hsuan-Tien Lin. “Active learning for multiclass
cost-sensitive classification using probabilistic models.” 2013 Conference on Technologies and Applications of Artificial Intelligence. IEEE, 2013.