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

Disable unnecessary warning in EnsembleVoteClassifier #941

Closed
rasbt opened this issue May 21, 2022 · 0 comments · Fixed by #994
Closed

Disable unnecessary warning in EnsembleVoteClassifier #941

rasbt opened this issue May 21, 2022 · 0 comments · Fixed by #994
Labels

Comments

@rasbt
Copy link
Owner

rasbt commented May 21, 2022

There is an unnecessary warning

 /Users/sebastian/miniforge3/lib/python3.9/site-packages/mlxtend/classifier/ensemble_vote.py:166: UserWarning: fit_base_estimators=False enforces use_clones to be `False`
  warnings.warn("fit_base_estimators=False "

when both use_clones and fit_base_estimators are False:

eclf = EnsembleVoteClassifier(clfs=(clf1, clf2, clf3),
                              weights=(1, 1, 1),
                              use_clones=False,
                              fit_base_estimators=False)
eclf.fit(X_train, y_train)

This warning should only be shown if

  • fit_base_estimators=False and use_clones=True

not

  • fit_base_estimators=False and use_clones=False
@rasbt rasbt added the easy label May 21, 2022
rasbt added a commit that referenced this issue Nov 12, 2022
…oteClassifier

Removed unnecessary warnings as described in #941
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant