-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue when initializing explainer through TabularExplainer and KernelExplainer #463
Comments
@lucazav I believe the issue with the bad cuML error message appeared in interpret-community 0.18.0 and was fixed in 0.21.0: #450
With latest version you will see the error you saw: This seems to be due to the timestamp column. However, it seems like the explainers should be able to support this datatype, based on: It should automatically featurize the timestamp column and explain numeric fields:
I think I see the problem. This only exists on mimic explainer, based on this search: So basically all other explainers (except for MimicExplainer) can't handle timestamp type column. You can convert the column to numeric (eg the float value in seconds), but for some explainers like LIME explainer it won't work well - specifically for LIME you won't be able to sample around the value correctly to get meaningful results. For KernelExplainer it might work more sensibly, since it's just replacing the value with the background data and not trying to change it, and the feature importance might be correct in the sense of how important the column is but difficult to intepret in the sense that increasing/decreasing the value will result in a specific change to the output (which you can't assume anyway with shap values, but which will be especially difficult to assume here), since there may be many cyclical/seasonal complex relationships for the time feature. I think it's more useful to break the time feature into the components like above and view feature importances in terms of day/hour/month/etc to get a better understanding of how it may influence the model's output. |
I have a trained regression model (a VotingEnsemble model obtained through training with Azure AutoML) and I'd like to generate an explainer using TabularExplainer.
My dataset has a column ('CALENDAR_DATE') of type datetime64[ns], which my model handles correctly (predict method works fine).
After the import of the TabularExplainer class, I tried to initialize my explainer through:
but I get the following error:
I get the same error message when I force:
Thus, I proceeded trying to explicitly inizialize a KernelExplainer, thorugh:
but I received the error:
Therefore I changed the 'CALENDAR_DATE' column type to string, with:
After this, both TabularExplainer and KernelExplainer correctly work when initializing the explainers (with the modified dataset X_train_copy).
Why does this happen?
The text was updated successfully, but these errors were encountered: