Skip to content

SIs don't sum to the model's prediction? See #264

Closed
@mmschlk

Description

@mmschlk

SIs don't sum to the model's prediction? See

import shapiq
# load data
X, y = shapiq.load_california_housing(to_numpy=True)
# train a model
from sklearn.ensemble import RandomForestRegressor
model = RandomForestRegressor()
model.fit(X, y)
# set up an explainer with k-SII interaction values up to order 4
explainer = shapiq.TabularExplainer(
    model=model,
    data=X,
    index="k-SII",
    max_order=2
)
# explain the model's prediction for the first sample
interaction_values = explainer.explain(X[0], budget=256)
# analyse interaction values
interaction_values.plot_force()

# vs
model.predict(X[[0]])

Originally posted by @hbaniecki in #250 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    approximator 🔧all issues that are linked to approximatorsbug 💣Something isn't workingexplainer 🔍All issues that are linked to explainersimputer 🔧All issues linked to imputers

    Projects

    Status

    ✅ Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions