midlearn.MIDImportance
- class midlearn.MIDImportance(estimator: MIDRegressor | MIDExplainer, **kwargs)[source]
MID Importance.
This object is returned by the MIDRegressor.importance() method and holds the results of the feature importance calculation.
- __init__(estimator: MIDRegressor | MIDExplainer, **kwargs)[source]
Initialize the MIDImportance object.
- Parameters:
estimator (MIDRegressor or MIDExplainer) – The fitted MID model instance from which to calculate importance.
**kwargs (dict) – Additional keyword arguments passed to the midr::mid.importance() function in R.
Methods
__init__
(estimator, **kwargs)Initialize the MIDImportance object.
plot
([style, theme, max_nterms])Visualize the importance scores of the component functions from a fitted MID model with plotnine.
terms
(**kwargs)Attributes
importance
measure
predictions