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

categorical_features #64

Open
renatodeleone opened this issue Jan 26, 2021 · 0 comments
Open

categorical_features #64

renatodeleone opened this issue Jan 26, 2021 · 0 comments

Comments

@renatodeleone
Copy link

When running anchor I receive the following error

explainer = anchor_tabular.AnchorTabularExplainer(possible_outcomes, feature_names, X2E, categorical_names)
explainer.fit(X_train, y_train, X_test, y_test)
Traceback (most recent call last):

File "", line 1, in
explainer = anchor_tabular.AnchorTabularExplainer(possible_outcomes, feature_names, X2E, categorical_names)

File "anchor_tabular.py", line 43, in init
self.encoder = sklearn.preprocessing.OneHotEncoder(

File "C:\compiler\anaconda3\lib\site-packages\sklearn\utils\validation.py", line 72, in inner_f
return f(**kwargs)

TypeError: init() got an unexpected keyword argument 'categorical_features'

=========================
I suspect that the problem is with OneHotEncoder https://stackoverflow.com/questions/59476165/typeerror-init-got-an-unexpected-keyword-argument-categorical-features

"Since the latest build of sklearn library removed categorical_features parameter for onehotencoder class. It is advised to use ColumnTransformer class for categorical datasets. Refer the sklearn's official documentation for futher clarifications."

Any help will be appreciated

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

No branches or pull requests

1 participant