-
Notifications
You must be signed in to change notification settings - Fork 252
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
Anchor Tabular - KeyError in get_features_index #924
Comments
Hey, usually issues with mixed data arise from a mis-specification of the Edit: I see the call |
This is it, that's why my example is failing. |
There's multiple ways to go about validation and it's usually fairly tricky to validate custom user data, would be keen to hear if you have more specific suggestions, e.g.:
|
I would suggest doing it in On another side, |
I understand that some our conventions make it more difficult to cater for all all use-cases, but this is a trade-off we've had to make, at least for the time being. The alternative here would be having to consider any custom encoding scheme, e.g. even allowing label-encoding with arbitrary user-supplied integers for categories would be infeasible without every user providing even more metadata about their specific encoding. As for your case, there are a couple of workarounds. Essentially missing data is another type of category (separate for each categorical data column). This gives two options:
I'm not sure I follow here, do you mean string labels for "raw label values" here? Would be good to see what you have in mind. |
I have the following error when trying to call explain on an AnchorTabular fitted on a mixed of numerical and categorical data. On alibi 0.9.2.
self.val2idx
is of typeDict[int, DefaultDict[int, Any]] = {}
butf_val
is a value fromself.cat_lookup
.And
self.cat_lookup
maps categorical variables to their value inX
.cat_lookup
is initialized in two ways :or
So, from what I understand, we are using a categorical value (value_A in my error message) stored in f_val to call a dict that is suppose to have
int
keys.I'm going to try to understand why anchor_tabular_adult.ipynb is working.
The text was updated successfully, but these errors were encountered: