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

[MRG] BUG Fixes duck typing in voting #14287

Merged
merged 5 commits into from Jul 12, 2019

Conversation

@thomasjpfan
Copy link
Member

thomasjpfan commented Jul 7, 2019

Fixes the ducktyping of predict_proba in VotingClassifier.

Copy link
Member

jnothman left a comment

CI is not happy.

('lr', clf1), ('rf', clf2), ('gnb', clf3)],
voting='hard')
eclf.fit(X, y)
assert not hasattr(eclf, "predict_proba")

This comment has been minimized.

Copy link
@jnothman

jnothman Jul 7, 2019

Member

This would apply even before fit

Copy link
Member

jnothman left a comment

Otherwise lgtm

with pytest.raises(AttributeError, match=msg):
eclf.predict_proba

with pytest.raises(AttributeError, match=msg):

This comment has been minimized.

Copy link
@jnothman

jnothman Jul 7, 2019

Member

This is redundant wrt the previous assertion

@rth
rth approved these changes Jul 8, 2019
Copy link
Member

rth left a comment

Thanks! I imagine we don't need a what's new entry for this?

@jnothman

This comment has been minimized.

Copy link
Member

jnothman commented Jul 8, 2019

thomasjpfan and others added 2 commits Jul 8, 2019
@qinhanmin2014 qinhanmin2014 merged commit b55d12e into scikit-learn:master Jul 12, 2019
11 of 12 checks passed
11 of 12 checks passed
ci/circleci: lint Your tests are queued behind your running builds
Details
LGTM analysis: C/C++ No code changes detected
Details
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No new or fixed alerts
Details
scikit-learn.scikit-learn Build #20190712.27 succeeded
Details
scikit-learn.scikit-learn (Linux py35_conda_openblas) Linux py35_conda_openblas succeeded
Details
scikit-learn.scikit-learn (Linux py35_ubuntu_atlas) Linux py35_ubuntu_atlas succeeded
Details
scikit-learn.scikit-learn (Linux pylatest_conda_mkl_pandas) Linux pylatest_conda_mkl_pandas succeeded
Details
scikit-learn.scikit-learn (Linux32 py35_ubuntu_atlas_32bit) Linux32 py35_ubuntu_atlas_32bit succeeded
Details
scikit-learn.scikit-learn (Windows py35_pip_openblas_32bit) Windows py35_pip_openblas_32bit succeeded
Details
scikit-learn.scikit-learn (Windows py37_conda_mkl) Windows py37_conda_mkl succeeded
Details
scikit-learn.scikit-learn (macOS pylatest_conda_mkl) macOS pylatest_conda_mkl succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.