Skip to content

Grouped partial-dependence profiles does not work with dummy variables #327

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

Closed
pbiecek opened this issue Sep 14, 2020 · 1 comment
Closed
Labels
invalid ❕ This doesn't seem right, potential bug Python 🐍 Related to Python

Comments

@pbiecek
Copy link
Member

pbiecek commented Sep 14, 2020

see this one: pbiecek/ema#43

I was trying to use Grouped partial-dependence profiles model_profile() function in python, but unfortunately, it cannot handle as grouping variables floats/integers. The problem is that most RF/Logit models cannot handle text data, therefore variables need to encoded as integers (eg: out of the variable gender, I create gender_female with values 0,1). So when I try to apply your aggregated function, I keep getting this error:

sequence item 0: expected str instance, int found

Can you transform variables with n<10 categories into strings to be able to get aggregated results for categorical variables? Or just allow integers if for example n_cat<10?

@pbiecek pbiecek added the Python 🐍 Related to Python label Sep 14, 2020
@hbaniecki hbaniecki added the invalid ❕ This doesn't seem right, potential bug label Sep 15, 2020
hbaniecki added a commit that referenced this issue Sep 19, 2020
@hbaniecki
Copy link
Member

I tested it with float and int variables, so it should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid ❕ This doesn't seem right, potential bug Python 🐍 Related to Python
Projects
None yet
Development

No branches or pull requests

2 participants