stouputils.data_science.metric_dictionnary module#
This module contains the MetricDictionnary class, which provides a dictionary of metric names.
This is often used to log metrics to MLflow and to display them in the console easily.
This class contains the following metrics:
Main metrics:
Area Under the Curve (AUC)
Specificity (True Negative Rate)
Recall/Sensitivity (True Positive Rate)
Precision (Positive Predictive Value)
Negative Predictive Value (NPV)
Accuracy
F1 Score
Confusion matrix metrics:
True Negatives (TN)
False Positives (FP)
False Negatives (FN)
True Positives (TP)
False Positive Rate
False Negative Rate
False Discovery Rate
False Omission Rate
Critical Success Index (Threat Score)
F-scores:
F-beta Score (where beta is configurable)
Matthews correlation coefficient:
Matthews Correlation Coefficient (MCC)
Optimal thresholds for binary classification:
Youden’s J statistic
Cost-based threshold
Average metrics across folds:
Mean value of any metric across k-fold cross validation
Standard deviation metrics across folds:
Standard deviation of any metric across k-fold cross validation