Skip to content

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

Description

@pbiecek

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Python 🐍Related to Pythoninvalid ❕This doesn't seem right, potential bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions