rasbt / mlxtend

A library of extension and helper modules for Python's data analysis and machine learning libraries.
https://rasbt.github.io/mlxtend/
Other
4.83k stars 855 forks source link

Disable unnecessary warning in EnsembleVoteClassifier #941

Closed rasbt closed 1 year ago

rasbt commented 2 years ago

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

not