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
AnchorTabularExplainer without categorical features #3
Comments
Hello, I must have removed that at some point and forgotten to put it back in. |
In the meantime, you can discretize your data first, similar to what I do here |
Hi @marcotcr, I discretized the data and got anchor working, thank you! However, I'm seeing some inconsistencies in the reported coverage and precision when I try to use the anchor explanation on the original dataset (i.e. before the discretization). Not sure if you can help just by looking at this code, but here's what I'm doing:
And here's the output:
I would expect the figures to match. Any idea on this? |
If the validation and test distributions are similar, the numbers should match. I would have to see it in more detail to understand if your discretization is doing something or if there's a bug in the code. I can take a look if you can share a notebook. The newest version I uploaded has discretizing built in, you may want to give it a try. |
Hello @marcotcr, |
If you discretize the data before you give it to AnchorTabularExplainer, you would have to learn the model on discretized features. If you want the black box model to use numerical features, you have to use the newest version with built in discretizing. |
Hi there.
This will prevent the |
Thanks, |
@eindzl Thanks, I also had the same problem and now it works correctly after your update . |
Will this workaround be implemented at some point? |
Hi @marcotcr ,
Firstly, the paper is great and I'm really looking forward to using the package.
I tried to use it on my own data where the
AnchorTabularExplainer()
object does not have anycategorical_names
(i.e. categorical features). I see that the code when calling theexplain_instance()
method goes to https://github.com/marcotcr/anchor/blob/master/anchor/anchor_tabular.py#L215 and since there are no categorical features, themapping
dict remains empty and so the method is not working.Am I missing something? Or, is there something I can do to overcome this?
The text was updated successfully, but these errors were encountered: