-
Notifications
You must be signed in to change notification settings - Fork 5
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
contributions mismatch for nominal features #16
Comments
Is it possible for you to publish here a model and sample utterance that reproduces the issue? |
Could you confirm that the nominal features are of type boolean? X_test['feature'] = np.where(X_test['feature'] == False, 0, 1) I suspect an issue in the interpret explain_local implementation. It looks like the boolean features are not correctly mapped, and have scores of 0.0. |
ok forget my last comment, the problem is that the conversion to onnx mutates the ebm model object. obviously, this is not a normal behavior of the converter. I will fix this. |
This prevents from using the ebm model correctly after the conversion. Fixes #16
This prevents from using the ebm model correctly after the conversion. Fixes #16 Signed-off-by: Romain Picard <[email protected]>
Description
I trained an EBM classification model. This model was initially saved in pickle format.
I used
ebm2onnx
as shown below to convert my model to the .onnx format.I noticed that the contribution to the prediction for a test case is different for
nominal
type features when passing in onnx format; the contributions are set to zero.Do you have an explanation for this ?
What I Did
Here are the result of local explanation with EBM pickle model for one example :
result is
After transforming
ebm_first
toonnx_model
i did the following to imitate inference in production:result is
The two arrays are not equal in index 4 and 5; the only
nominal
features of the dataset.The text was updated successfully, but these errors were encountered: