-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG+2] FEA Add SplineTransformer #18368
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
Conversation
@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.
I think it has reached readiness for merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Maybe just a last approval of @jnothman @thomasjpfan before merging
Why? Do you have specific concerns, or want to highlight changes since @agramfort's approval? |
I wanted just to make sure that you were happy with the changes to address #18368 (comment) I ping @thomasjpfan by mistake. |
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.
|
I pushed a small change to cross-reference adding a |
Thanks @lorentzenchr |
Thanks @lorentzenchr !
|
Reference Issues/PRs
Closes #17027.
What does this implement/fix? Explain your changes.
This PR adds a new transformer
preprocessing.SplineTransformer
that 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
SplineTransformer
a 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:
degree
number of output columns are non-zero per row (per input feature).scipy.interpolate.BSpline(..., extrapolation='periodic')
.