Global explanation describes how a model generally behaves across many examples: which factors matter broadly and how decisions change in aggregate. It is useful when a model supports high-stakes decisions, debugging, failure analysis, bias investigation, or improvement work. section 9.0 section 9.3
A global method asks, “What sensible pattern has this model learned?” rather than, “Why did it make this one prediction?” Local explainability focuses on an individual example; global explainability considers behavior over a large number of examples. section 9.3
Common global approaches include:
- Feature importance assigns scores to features according to their contribution to correct target prediction. section 9.6
- Permutation feature importance compares predictive performance before and after shuffling features, treating the trained model as a black box. section 9.6
- Partial dependence plots marginalize, or sum out, other variables to show how a feature relates to model output. section 9.6
- Global surrogate models approximate a black-box model with an interpretable model, balancing fidelity against interpretability. section 9.6
Black-box global methods use only model inputs and outputs, not internal model structure, so they are model-agnostic. Glass-box approaches instead expose interpretable structure directly. Explainable boosting machines provide both global and local explanations through feature components and selected pairwise interactions. section 9.3 section 9.5
Bank-marketing EBM
An ExplainableBoostingClassifier trained on the Bank Marketing data produces global feature-importance scores and dependency plots. A dependency plot for age shows negative scores for normalized values corresponding to ages 33–49, suggesting lower subscription likelihood absent other information. Its accuracy is comparable to the referenced XGBoost model while remaining a glass-box model. section 9.5.2
Listing 9.11 Training and visualizing EBMs using InterpretML
from interpret.glassbox import ExplainableBoostingClassifier
wts = np.full_like(ytrn, fill_value=1.0)
wts[ytrn > 0] = 5.0 #1
feature_names = list(Xtrn.columns)
feature_types = np.full_like(feature_names, fill_value='continuous')
cat_features = ['default', 'housing', 'loan', 'contact', 'poutcome',
'job', 'marital', 'education', 'month', 'day_of_week']
feature_types = ['categorical' if f in cat_features else 'continuous'
for f in feature_names] #2
ebm = ExplainableBoostingClassifier(feature_names=feature_names,
feature_types=feature_types)
ebm.fit(Xtrn, ytrn, sample_weight=wts) #3
from interpret import set_visualize_provider #4
from interpret.provider import InlineProvider
set_visualize_provider(InlineProvider())
from interpret import show #5
x = Xtst.iloc[3104, :].values.reshape(1, -1)
y = ytst[3104].astype(float).reshape((1, 1))
local_explainer = ebm.explain_local(x, y) #6
show(local_explainer)
ebm_global = ebm.explain_global() #7
show(ebm_global)
The listing shows how to train an ExplainableBoostingClassifier with feature types and class-imbalance weights before generating global visualizations. section 9.5.2

