midlearn.MIDShapley
- class midlearn.MIDShapley(estimator: MIDRegressor | MIDExplainer, data: pd.DataFrame)[source]
MID-derived Shapley values.
This object is returned by the MIDRegressor.shapley() method and holds a shap.Explanation object internally.
- __init__(estimator: MIDRegressor | MIDExplainer, data: pd.DataFrame)[source]
Initialize the MIDShapley object.
- Parameters:
estimator (MIDRegressor or MIDExplainer) – The fitted MID model instance from which to calculate MID-derived Shapley values.
data (pd.DataFrame) – Data used to derive predictions.
Methods
__init__(estimator, data)Initialize the MIDShapley object.
plot([style, instances, variables])Visualize the calculated SHAP Explanation object with the shap library.