Machine Learning Explainability
A prediction gives us a number or a class. An explanation helps us understand how the model used its inputs to produce that result. Start with one prediction you can inspect, then learn to compare explanations across a dataset.
Linear models: follow every part of a prediction
Start with four named customers and a fitted spending model. This nine-part series explains coefficients, curves, interactions, meaningful features, feature clustering, plots, and linear SHAP before turning the numbers into a plain-language explanation.
Shapley Values and SHAP
The new ten-part series follows all nine videos in A Data Odyssey’s SHAP playlist. Begin with a bonus prediction, calculate how credit is shared, and apply the same idea to a working Python model. Later chapters cover plots, classification, categorical features, and anomaly detection.
TreeSHAP: understand the calculation inside trees
Follow five chapters using the same ten customers and Maya’s prediction. Calculate the feature shares, derive TreeSHAP’s path updates, compare two hidden-input rules, and verify the same tree in Python.
Choose the question before the method
SHAP shares a prediction’s difference from a baseline among its features. LIME fits a simple approximation to the model near one input. Permutation importance measures how a chosen evaluation metric changes when an input is shuffled. These questions can complement one another, but their answers have different units and meanings.
You do not need to learn LIME before starting SHAP. If you want to study local approximations afterward, the separate LIME lesson develops a fitted example and checks how well it agrees with the original model nearby.
From one prediction to many
The plot-reading chapter explains how individual contributions become a dataset summary. It keeps two populations separate: reference rows used to define the comparison, and explained rows whose contributions are summarized.
Check what the result actually supports
A faithful model explanation can describe an inaccurate prediction. It also does not establish the effect of a real-world intervention. The limitations chapter develops those distinctions with concrete examples.
Continue into implementation
The series includes reproducible Python scripts for regression, classification, categorical inputs, and Isolation Forest. The separate C++ implementation notes cover permutation importance, LIME, Kernel SHAP, and tree calculations.
Use explanations in a report
Preserve the model version, output units, reference settings, and relevant input values when presenting an explanation. The production explanation notes discuss this handoff, while the anomaly review-queue chapter connects explanations with evidence for an investigation.