Principle:Scikit learn Scikit learn Metric Visualization
| Knowledge Sources | |
|---|---|
| Domains | Model Evaluation, Data Visualization |
| Last Updated | 2026-02-08 15:00 GMT |
Overview
Metric visualization provides graphical representations of model performance metrics, enabling intuitive assessment and comparison of classifier and regressor behavior.
Description
Numerical metrics alone can obscure important patterns in model behavior. Metric visualization tools produce standardized plots that reveal how a model performs across different operating conditions, classes, or prediction ranges. They solve the problem of communicating complex evaluation results to stakeholders and identifying subtle performance issues that scalar metrics might miss. Visualization sits at the intersection of model evaluation and reporting, serving as a bridge between quantitative analysis and human interpretation.
Usage
Use a Confusion Matrix display to see the distribution of correct and incorrect predictions across all classes, revealing which classes are commonly confused. Use an ROC Curve display to visualize the trade-off between true positive rate and false positive rate at different thresholds. Use a Precision-Recall display when evaluating classifiers on imbalanced datasets where the positive class is rare. Use a DET (Detection Error Tradeoff) curve for comparing classifiers with a focus on error rates, as its normal deviate scaling linearizes the curves for easier comparison. Use a Prediction Error display for regression models to plot predicted versus actual values, revealing systematic biases.
Theoretical Basis
Confusion Matrix is a matrix (for classes) where entry is the number of samples with true class predicted as class :
The diagonal elements represent correct classifications; off-diagonal elements represent errors. Normalization by row (true labels) yields recall per class; normalization by column yields precision per class.
ROC Curve plots TPR against FPR as the decision threshold varies from to :
A perfect classifier has the curve passing through the upper-left corner (0, 1).
Precision-Recall Curve plots Precision against Recall, with a perfect classifier reaching the upper-right corner (1, 1). This visualization is more informative than the ROC curve when the positive class is rare.
DET Curve plots the False Negative Rate against the False Positive Rate on normal deviate (probit) scales:
The normal deviate transformation linearizes curves from well-calibrated classifiers, making visual comparison of multiple systems easier.
Prediction Error Plot for regression displays versus . Points lying on the diagonal line represent perfect predictions. Systematic deviations from this line indicate bias, and the spread around it indicates variance.
Related Pages
- Implementation:Scikit_learn_Scikit_learn_ConfusionMatrixDisplay
- Implementation:Scikit_learn_Scikit_learn_DetCurveDisplay
- Implementation:Scikit_learn_Scikit_learn_PrecisionRecallDisplay
- Implementation:Scikit_learn_Scikit_learn_PredictionErrorDisplay
- Implementation:Scikit_learn_Scikit_learn_RocCurveDisplay