Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ENH: interpolate: Tracker Issue for follow-up work on Splines #26171

Description

@aadya940

Is your feature request related to a problem? Please describe.

After working on PR #26168 #26141 #25862 #26078 #25638 #25570 and a conversation with @ev-br , these features were either needed or would make sense to have in SciPy. This is a tracker issue (for discussions and tracking the implementation) and one line explanation of why they may be needed.

Describe the solution you'd like.

  • P-spline penalties, a cheaper discrete alternative to the exact integral penalty
  • Higher order derivative penalties (penalize the third derivative instead of the second)
  • A solver= option to pick the linear algebra backend for the fitting problem
  • Wrap LAPACK dpbcon in scipy.linalg for a cheap condition number estimate from the Cholesky factor
  • Add clamp_values kwarg for scipy.interpolate.make_smoothing_spline
  • Add splines with higher degree polynomials (k > 3)

Describe alternatives you've considered.

No response

Additional context (e.g. screenshots, GIFs)

  1. P-Splines are very common in interpolation and are often used instead of smoothing splines.
  2. Higher order derivatives are important for users that care about curvature. This was first requested in #24532.
  3. A solver= param was first discussed here.
  4. Smoothing parameter lam increases the condition-number proportionally, wrapping dpbcon in scipy.linalg would help estimate when the system becomes ill-posed instead of estimating it (which is the current behavior).
  5. scipy.interpolate.make_smoothing_spline at lam=0 is just a make_lsq_spline. Since lsq splines now support a clamp_values kwarg, it may be reasonable to add the same for smoothing splines.
  6. Quartic and higher splines were first requested here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions