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 thomasjpfan commented Jul 7, 2019

Fixes the ducktyping of predict_proba in VotingClassifier.

Copy link
Member

@jnothman 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")
Copy link
Member

@jnothman jnothman Jul 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would apply even before fit

Copy link
Member

@jnothman jnothman left a comment

Otherwise lgtm

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

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

@jnothman jnothman Jul 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant wrt the previous assertion

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

@rth rth left a comment

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

@jnothman
Copy link
Member

@jnothman jnothman commented Jul 8, 2019

@qinhanmin2014 qinhanmin2014 merged commit b55d12e into scikit-learn:master Jul 12, 2019
11 of 12 checks passed
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

Successfully merging this pull request may close these issues.

None yet

4 participants