nessie.detectors.classification_entropy
Module Contents
Classes
Given a distribution over labels for each instance in form of a (num_instances, num_labels) |
- class nessie.detectors.classification_entropy.ClassificationEntropy
Bases:
nessie.detectors.error_detector.ModelBasedDetector
Given a distribution over labels for each instance in form of a (num_instances, num_labels) numpy array, the resulting score for each instance is the entropy of each instances label distribution. If the entropy is larger, then this means more uncertainty and higher chance of being an annotation error.
Active Learning Book Synthesis Lectures on Artificial Intelligence and Machine Learning Morgan & Claypool Publishers, June 2012 Section 2.3
See also https://modal-python.readthedocs.io/en/latest/content/query_strategies/uncertainty_sampling.html
- error_detector_kind(self)
- score(self, probabilities: numpy.typing.NDArray[float], **kwargs) numpy.typing.NDArray[float]
Scores the input according to their class distribution entropy.
- Parameters
probabilities – a (num_instances, num_classes) numpy array obtained from a machine learning model
- Returns
a (num_instances,) numpy array containing the resulting scores
- Return type
scores
- uses_probabilities(self) bool