Most machine learning questions can be answered with one chart: scikit-learn's RocCurveDisplay and PrecisionRecallDisplay compare classifiers, CalibrationDisplay checks whether probabilities can be trusted, SHAP and permutation importance explain what a model uses, and KMeans with silhouette scores and PCA explore data without labels. This page maps each question to the tutorial that answers it, with runnable code and seeded sample data in every post.

Which Chart Answers Which Question?
| Your question | Chart | Tutorial |
|---|---|---|
| Which classifier ranks cases better? | ROC curve and AUC | ROC Curve and AUC |
| The positive class is rare. How do I compare models? | Precision-recall curve | Precision-Recall Curve |
| Can I read the predicted probabilities as real chances? | Calibration curve, Brier score | Calibration Curve |
| Is the model overfitting, and would more data help? | Learning curve, validation curve | Learning and Validation Curves |
| How does the prediction change as one feature changes? | Partial dependence and ICE | Partial Dependence and ICE Plots |
| Is my regression model wrong in a systematic way? | Residual plot, Q-Q plot | Residual Plot for Regression |
| What shape does my classifier's boundary have? | Decision boundary plot | Decision Boundary Plot |
| What rules did my decision tree learn? | plot_tree, export_text, pruning | Plot a Decision Tree |
| Which features does the model rely on? | Impurity and permutation importance | Feature Importance |
| Why did the model predict this for this row? | SHAP beeswarm, bar, waterfall | SHAP Plots |
| How many clusters should I use? | Elbow plot and silhouette plot | K-Means Elbow and Silhouette |
| Can I summarize many correlated columns in two or three? | Scree plot, loadings, biplot | PCA Explained Variance and Biplot |
| Can I see my high-dimensional data as clusters in 2D? | t-SNE and UMAP embedding plots | t-SNE vs UMAP |
A Sensible Order for Evaluating a Classifier
- Rank first. Plot a ROC curve and compute AUC to see whether the model separates the classes at all. If positives are rare, add a precision-recall curve, because AUC can look flattering when negatives dominate.
- Check the probabilities. A model with a high AUC can still give bad probabilities. A calibration curve shows it, and
CalibratedClassifierCVfixes it. This matters whenever the score feeds a decision such as a price, a threshold or an expected-value calculation. Calibration barely changes ranking metrics like AUC, so the two checks answer different questions. - Explain it. Permutation importance gives a quick global ranking of features. SHAP adds direction and per-row explanations.
Charts for Data Without Labels
K-means and PCA need no target column. They are usually run together: scale the features, use PCA to see whether the data has a low-dimensional shape, then cluster and check the clusters with silhouette scores. Both posts show the effect of skipping StandardScaler. In the PCA post, one large-valued column took 93% of the variance when the data was not scaled.
Which Tutorial Should I Start With?
| If you are... | Start with |
|---|---|
| New to model evaluation | ROC curve, then precision-recall |
| Shipping a model whose scores feed a decision | Calibration curve |
| Asked to explain a model to stakeholders | Feature importance, then SHAP |
| Exploring a new dataset | PCA, then K-means |
Practical Tips
- Evaluate on held-out data. Every chart here is misleading when drawn from the training set.
- Fix the random seed so the charts are reproducible. All generator scripts in these posts use a seeded
np.random.default_rng. - Plot more than one metric. ROC, precision-recall and calibration each fail in a different way, and a model can pass one and fail another.