[MRG+2] FEA Add SplineTransformer#18368
Merged
glemaitre merged 79 commits intoscikit-learn:mainfrom Jan 24, 2021
Merged
Conversation
Member
Author
|
@eickenberg Is this good enough for your cheering?:smile: |
864ea19 to
63fd248
Compare
* Make n_knots the first arguments as n_degree=3 is a very good default.
Member
Author
|
I think it has reached readiness for merge. |
glemaitre
approved these changes
Jan 18, 2021
Member
glemaitre
left a comment
There was a problem hiding this comment.
LGTM Maybe just a last approval of @jnothman @thomasjpfan before merging
Member
Why? Do you have specific concerns, or want to highlight changes since @agramfort's approval? |
Member
|
I wanted just to make sure that you were happy with the changes to address #18368 (comment) I ping @thomasjpfan by mistake. |
Member
|
It's sufficient for users to see the connection, and can be expanded later.
A See Also in the class docstring might not hurt. But yes, that's fine by
me.
|
Member
|
I pushed a small change to cross-reference adding a |
Member
|
Thanks @lorentzenchr |
Member
|
Thanks @lorentzenchr !
|
This was referenced Feb 26, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Closes #17027.
What does this implement/fix? Explain your changes.
This PR adds a new transformer
preprocessing.SplineTransformerthat creates a B-spline basis for each feature. This is very convenient for non-linear continuous feature effects in linear models.Any other comments? Edited
As an example, polynomial interpolation is extended and explains the
SplineTransformera bit.Possible other examples to put it in are preprocessing plot discretization or maybe adaboost regression.
They could also be used in some more examples to improve the linear models.
Not implemented are:
degreenumber of output columns are non-zero per row (per input feature).scipy.interpolate.BSpline(..., extrapolation='periodic').