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] added validation for sample weight in DummyRegressor #15505

Merged
merged 3 commits into from Nov 4, 2019

Conversation

theoptips
Copy link
Contributor

@theoptips theoptips commented Nov 2, 2019

Fixes #15358 DummyRegressor

What does this implement/fix? Explain your changes.

Use utils.validation._check_sample_weight
to replace check_consistent_length(X, y, sample_weight)

Ran pytest
test_dummy.py passed all tests

Collaborator:
Work with @MDouriez continued

@theoptips
Copy link
Contributor Author

theoptips commented Nov 2, 2019

[MRG] fixing test_common.py issue caused by prior commit with check_consistent_length(X, y, sample_weight) check validation fo X y

add check_consistent_length(X, y, sample_weight) to check for X y input
sklearn/dummy.py Outdated Show resolved Hide resolved
sklearn/dummy.py Outdated Show resolved Hide resolved
@eickenberg
Copy link
Contributor

@theoptips theoptips changed the title added validation for sample weight in DummyRegressor [MRG] added validation for sample weight in DummyRegressor Nov 2, 2019
Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

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

thanks @theoptips

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.

Use _check_sample_weight to consistently validate sample_weight
4 participants