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 of shape (n_samples, n_classes)
Class membership probabilities for each sample.
- cost_matrixarray-like pf shape (n_classes, n_classes)
Cost matrix with cost_matrix[i,j] defining the cost of predicting class j for a sample with the actual class i. Only supported for ‘least_confident’ or ‘margin_sampling’.
- method‘least_confident’ or ‘margin_sampling’ or ‘entropy’, default=’least_confident’
The method to calculate the uncertainty.
References
- 1
Settles, Burr. “Active learning literature survey”. University of Wisconsin-Madison Department of Computer Sciences, 2009.
- 2
P.-L. Chen and H.-T. Lin. Active Learning for Multiclass Cost-Sensitive Classification Using Probabilistic Models. In Conf. Technol. Appl. Artif. Intell., pages 13–18, 2013.