lime icon indicating copy to clipboard operation
lime copied to clipboard

regression explanation intercept has duplicated values

Open yinxi-db opened this issue 4 years ago • 0 comments

For a regression model explainer below

explainer = LimeTabularExplainer(X_train, feature_names, mode="regression")
exp = explainer.explain_instance(X_test[0], model, num_features=11)

The returned explanation still has two intercept

print(exp.intercept)
>>>{0: 6.051529868550603, 1: 6.051529868550603}

exp.intercept[0] and exp.intercept[1] are duplicated values. The same applies to exp.local_exp[0] and exp.local_exp[0]. Suggest to consolidate the regression explanation object.

yinxi-db avatar Nov 17 '21 18:11 yinxi-db