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+1] Add test for voting classifier‘s init errors #6371

Merged
merged 1 commit into from
Feb 29, 2016

Conversation

yenchenlin
Copy link
Contributor

I've added tests for voting classifier to test different errors it will raise when invalid arguments are passed into __init__ and fit is called.

Coverage increased (+0.005%) 😄


eclf = VotingClassifier(estimators=[('lr', clf)], weights=[1, 2])
msg = ('Number of classifiers and weights must be equal'
'; got %d weights, %d estimators'
Copy link
Member

Choose a reason for hiding this comment

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

You could just hardcode this? (got 2 weights, 1 estimators)

@yenchenlin
Copy link
Contributor Author

Thanks @rvraghav93 !
I've updated the code.

@raghavrv
Copy link
Member

Thanks!

@yenchenlin yenchenlin changed the title Add test for voting classifier‘s init errors [MRG] Add test for voting classifier‘s init errors Feb 17, 2016
@MechCoder MechCoder changed the title [MRG] Add test for voting classifier‘s init errors [MRG+1] Add test for voting classifier‘s init errors Feb 18, 2016
@MechCoder
Copy link
Member

lgtm

@TomDLT
Copy link
Member

TomDLT commented Feb 29, 2016

Merging, thanks @yenchenlin1994

TomDLT added a commit that referenced this pull request Feb 29, 2016
…fier

[MRG+1] Add test for voting classifier‘s init errors
@TomDLT TomDLT merged commit 1049642 into scikit-learn:master Feb 29, 2016
@yenchenlin
Copy link
Contributor Author

@TomDLT thanks for always helping me a lot! 🍺
😄

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