xpectra.metrics
Calibration and selective-prediction metrics not provided by sklearn.
Functions
|
Area under the risk-coverage curve (lower is better). |
|
Top-label ECE plus the per-bin table used for reliability diagrams. |
|
Mean squared error between one-hot labels and predicted probabilities. |
|
Selective-risk curve: abstain on the least confident samples first. |
|
Accuracy/macro-F1/MCC on the retained fraction at a target coverage. |
- xpectra.metrics.expected_calibration_error(y_true, proba, n_bins=15, strategy='uniform')[source]
Top-label ECE plus the per-bin table used for reliability diagrams.
- xpectra.metrics.multiclass_brier(y_true, proba)[source]
Mean squared error between one-hot labels and predicted probabilities.
- xpectra.metrics.risk_coverage(y_true, y_pred, confidence)[source]
Selective-risk curve: abstain on the least confident samples first.