model_native_linear_coef – Standardised regression coefficients from a fitted linear model.#
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.model_native_linear_coef_importance.
Function signature#
mf.functions.model_native_linear_coef_importance(
result: FitResultBase,
X: np.ndarray | pd.DataFrame,
) -> NativeImportanceResult
Parameters#
name |
type |
default |
constraint |
description |
|---|---|---|---|---|
|
|
— |
— |
Fitted result object exposing ._model (the raw sklearn estimator). Returned by any L4 standalone callable such as mf.functions.ridge_fit, mf.functions.random_forest_fit, etc. |
|
`np.ndarray |
pd.DataFrame` |
— |
— |
Returns#
NativeImportanceResult — frozen dataclass with fit results.
Attribute |
Type |
Description |
|---|---|---|
|
|
Absolute coefficient values |
|
|
Feature names matching importances_. |
|
|
‘linear_coef’ – method descriptor. |
|
|
Human-readable text table sorted by descending importance. |
Behavior#
Returns β̂_j for each predictor as the importance score; with standardize=True (default) the predictors are pre-scaled so coefficients are directly comparable. Compatible with every linear-family L4 model (ols / ridge / lasso / elastic_net / lasso_path / bayesian_ridge / huber / glmboost).
Cheapest meaningful importance score; the natural sanity-check to run before the more expensive permutation / SHAP families.
When to use
Linear-model baselines; quick interpretation when a tree / NN model is overkill.
When NOT to use
Non-linear models – coefficients no longer summarise marginal effects.
In recipe context#
Set params.op = "model_native_linear_coef" in the relevant layer to activate this op within a recipe:
# Layer L7 recipe fragment
params:
op: model_native_linear_coef
References#
macroforecast design Part 3, L7: ‘every importance op produces (table, figure) pairs; the L7.B sub-layer governs export shape.’
Greene (2018) ‘Econometric Analysis’, 8th ed., Pearson, Chapter 4.