permutation_importance_strobl – Strobl (2008) conditional permutation importance.#
Back to op axis | Back to L7 | Browse all options
Operational op under axis
op, sub-layerL7_A_importance_dag_body, layerl7. Standalone callable:mf.functions.cond_permutation_importance.
Function signature#
mf.functions.cond_permutation_importance(
result: FitResultBase,
X: np.ndarray | pd.DataFrame,
y: np.ndarray | pd.Series,
) -> CondPermutationImportanceResult
Parameters#
name |
type |
default |
constraint |
description |
|---|---|---|---|---|
|
|
— |
— |
Fitted result object exposing ._model (the raw sklearn estimator). Returned by any L4 standalone callable. |
|
`np.ndarray |
pd.DataFrame` |
— |
— |
|
`np.ndarray |
pd.Series` |
— |
— |
Returns#
CondPermutationImportanceResult — frozen dataclass with fit results.
Attribute |
Type |
Description |
|---|---|---|
|
|
Mean conditional permutation importance, shape (n_features,). |
|
|
Std deviation over n_repeats, shape (n_features,). |
|
|
Feature names. |
|
|
‘strobl’ – Strobl (2008) conditional permutation. |
|
|
Human-readable text table. |
Behavior#
Permutes x_j only within bins defined by the joint distribution of correlated predictors, eliminating the extrapolation bias of plain permutation importance for correlated features. v0.3 implementation uses tree-partition bins (Strobl et al. 2008 §4).
When to use
Highly correlated macro panels (FRED-MD / -QD with redundant aggregates).
When NOT to use
When predictor correlations are negligible – the cheaper plain permutation importance suffices.
In recipe context#
Set params.op = "permutation_importance_strobl" in the relevant layer to activate this op within a recipe:
# Layer L7 recipe fragment
params:
op: permutation_importance_strobl
References#
macroforecast design Part 3, L7: ‘every importance op produces (table, figure) pairs; the L7.B sub-layer governs export shape.’
Strobl, Boulesteix, Kneib, Augustin & Zeileis (2008) ‘Conditional variable importance for random forests’, BMC Bioinformatics 9: 307.