Confidence Scores
- class moval.models.Confidence(score_type: str, negative_score: bool, normalization: bool)
Bases:
ABCBase model for confidence calculation.
Confidence scores can be computed by calling the
__call__()method. This class should not be directly instaniated, and instead used as the base class for confidence scores calculation.- Atrributes:
- score_type (str):
The name of confidence scores.
- negative_score (bool):
A boolean that indicates if original confidence score is negative correlated to the classification correctness.
- normalization (bool):
A boolean that indicates if original confidence score needs normalization before usage.
- cal_func (:py:func):
The function to calculate the corresponding confidence scores.
- class moval.models.maxclassprobabilityConfidence
Bases:
ConfidenceConfidence scores based on max class probability.
- Note:
The maximum class probability ([0, 1]) is high is the model is confident.
- class moval.models.energyConfidence
Bases:
ConfidenceConfidence scores based on energy.
- Note:
Energy is low is the model is confident, we should calculate negative energy. Original engergy is unbounded, we should normalize by finding the max/min value later.
- class moval.models.entropyConfidence
Bases:
ConfidenceConfidence scores based on entropy.
- Note:
Entropy is low is the model is confident, we should calculate negative entropy. We should also choose the base as class number to ensure that the largest entropy is 1.
- class moval.models.doctorConfidence
Bases:
ConfidenceMOVAL model with doctor confidence.