Skip to content
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

Counterfactual Generation for only Categorical Features #349

Open
pedramsalimi opened this issue Dec 25, 2022 · 1 comment
Open

Counterfactual Generation for only Categorical Features #349

pedramsalimi opened this issue Dec 25, 2022 · 1 comment

Comments

@pedramsalimi
Copy link

Hello,
I am trying to generate counterfactuals for a dataset that only contains categorical features so I want to define my data interface but when I specify continuous_features to None or even not specify it I will get this error:
ValueError: should provide the name(s) of continuous features in the data as a list

My code:

d_rec = dice_ml.Data(dataframe=data,
continuous_features=None,
categorical_features=categorical_features,
outcome_name=outcome_name)

Many thanks,

@Chirayu-Tripathi
Copy link

You can pass empty list:
d_rec = dice_ml.Data(dataframe=data, continuous_features=[], categorical_features=categorical_features, outcome_name=outcome_name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants