Categorical Variables in Counterfactuals #179
Unanswered
Sreenath2019
asked this question in
Q&A
Replies: 1 comment
-
@Sreenath2019, sorry did not see this until today. The permitted_range feature constraints that feature to take only the values that you specify for that feature. For instance in your example the generated counterfactuals will only takes values for "education" from 'Doctorate' and 'Prof-school'. Does that answer your question? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I started using this amazing library for a recent project and have a got a question regarding the categorical variables.
In the example here, we do one-hot encoding for the categorical variables (e.g. education).
However, while creating the counterfactuals, with permitted_range, we still treat the categorical variables as they are i.e. with different levels
e.g.
permitted_range={'age': [20, 30], 'education': ['Doctorate', 'Prof-school']}
.I am a bit confused with this one. Will be great if anyone can help me with this. Thanks
Beta Was this translation helpful? Give feedback.
All reactions