explain()
explain(model, df, target_col=None)Run hereOne call for a full plain-English explanation of the model: top features, direction of effect, and caveats.
🌱In plain English: A plain-English summary of what the model leans on most and which way each thing pushes the answer.
Try it yourself Output
Press Run to execute this snippet.
permutation_importance()
explain.permutation_importance(model, df, target, n_repeats=5)Shuffle each feature and see how much the score drops; a model-agnostic, trustworthy importance ranking.
🌱In plain English: Ranks which columns actually matter by scrambling each one and seeing how much the score drops.
Exampleruns locally after pip install
import breezeml
breezeml.explain.permutation_importance(model, df, "target")
partial_dependence()
explain.partial_dependence(model, df, target, feature)Shows how the prediction changes as one feature moves, holding the rest fixed. The 'what-if' curve.
🌱In plain English: A what-if curve: slide one feature up and down and watch the prediction move, everything else held still.
Exampleruns locally after pip install
import breezeml
breezeml.explain.partial_dependence(model, df, "target", feature="age")
features: select · pca · polynomial
features.select(df, target, k=10) · features.pca(df) · features.polynomial(df)Pick the k most informative columns, compress with PCA, or expand with polynomial interactions, all one-liners.
🌱In plain English: Trim to the columns that matter, squeeze many columns into a few, or invent new combined ones, each in a line.
Exampleruns locally after pip install
import breezeml
top = breezeml.features.select(df, "target", k=10)
reduced = breezeml.features.pca(df, n_components=0.95)