Skip to content

ENH Allow sample_weight in SplineTransformer.fit method - #20526

Merged
glemaitre merged 9 commits into
scikit-learn:mainfrom
mlondschien:issue-20522
Jul 21, 2021
Merged

glemaitre merged 9 commits into
scikit-learn:mainfrom
mlondschien:issue-20522

Conversation

@mlondschien

Copy link
Copy Markdown
Contributor

Closes #20522.

@TomDLT TomDLT left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks !
The estimator now fails a common test for sample weights (check_sample_weights_invariance(kind=zeros): "For SplineTransformer, a zero sample_weight is not equivalent to removing the sample"). You need either to fix the handling of the sample weights to pass the test, or to add the test to the ignored list if it is not relevant to this estimator.

@mlondschien

Copy link
Copy Markdown
Contributor Author

See #20528.

@lorentzenchr lorentzenchr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@mlondschien Thanks for this PR.

Comment thread sklearn/preprocessing/_polynomial.py Resolved
@glemaitre glemaitre changed the title Allow sample_weights in SplineTransformer.fit method Allow sample_weight in SplineTransformer.fit method Jul 21, 2021
@glemaitre glemaitre changed the title Allow sample_weight in SplineTransformer.fit method ENH Allow sample_weight in SplineTransformer.fit method Jul 21, 2021

@glemaitre glemaitre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread sklearn/preprocessing/_polynomial.py Resolved
@glemaitre glemaitre self-assigned this Jul 21, 2021
@glemaitre
glemaitre merged commit 3a3f1be into scikit-learn:main Jul 21, 2021
@glemaitre

Copy link
Copy Markdown
Member

Merging then. Thanks @mlondschien

@mlondschien
mlondschien deleted the issue-20522 branch July 21, 2021 14:38
samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow sample_weights in SplineTransformer.fit method

4 participants