Partial Dependence and ICE Plots in Python with scikit-learn
Draw partial dependence and ICE plots with scikit-learn's PartialDependenceDisplay to see how a model's prediction changes with one feature, and when the average hides different groups.
Draw partial dependence and ICE plots with scikit-learn's PartialDependenceDisplay to see how a model's prediction changes with one feature, and when the average hides different groups.
Use scikit-learn's LearningCurveDisplay and ValidationCurveDisplay to tell whether a model is overfitting, underfitting, or needs more data, and to pick a hyperparameter such as max_depth.
Embed high-dimensional data in 2D with t-SNE and UMAP, plot it with Matplotlib, tune perplexity and n_neighbors, and learn which parts of the picture you can trust.
Which chart answers which machine learning question? A map of the ROC, precision-recall, calibration, SHAP, feature importance, K-means and PCA tutorials, with the order to read them in.
Run PCA in scikit-learn, plot explained variance and a scree plot to choose how many components to keep, read the loadings, and draw a biplot.
Draw residual plots for a regression model with scikit-learn's PredictionErrorDisplay, learn to read curves, fans and outliers, and fix them with a log-transformed target.
Plot a classifier's decision boundary with scikit-learn's DecisionBoundaryDisplay, compare six models on the same data, and see overfitting as a jagged boundary.
Explain a model with SHAP in Python: build the explainer, then read the beeswarm, bar, waterfall, and dependence plots, with runnable code for each.
Plot a calibration curve in Python with scikit-learn's CalibrationDisplay, see which models give trustworthy probabilities, and fix the ones that don't with CalibratedClassifierCV.
Plot a decision tree with scikit-learn's plot_tree, print its rules with export_text, and prune an overgrown tree with ccp_alpha so it stays readable and generalizes.
Choose the number of clusters for K-means in Python with the elbow method and silhouette score, and read a silhouette plot to see which clusters are weak.
Plot a ROC curve in Python with scikit-learn's RocCurveDisplay, compare models by AUC, pick a threshold, and handle multiclass and cross-validated curves.
Plot a precision-recall curve in Python with scikit-learn's PrecisionRecallDisplay, compare models by average precision, and pick a threshold on imbalanced data.
Plot feature importance in Python with scikit-learn, compare impurity-based importances to permutation importance on a test set, and see why the two can disagree.