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+2] FEA Add SplineTransformer #18368
Conversation
@eickenberg Is this good enough for your cheering? |
* Make n_knots the first arguments as n_degree=3 is a very good default.
I think it has reached readiness for merge. |
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')
.The text was updated successfully, but these errors were encountered: