You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm interested in optimizing the smoothing parameter using the GCV (page 244 7.52). Oftentimes, this requires the number of effective number of parameters and degrees of freedom for the generated spline. I've been looking at the source code in _sspumv.py and just wanted to confirm there's no easy/built-in way to get this from a spline that csaps has created.
The text was updated successfully, but these errors were encountered:
Under the hood csaps uses scipy.interpolate.PPoly class as the base class for the spline representation. You can get the spline coefficients and the degree from the spline instance.
Thanks for the reply! I did see the information here that the SplinePPForm provides, but it doesn't seem sufficient to calculate the GCV. I've modified my code to calculate it manually based on _sspumv.py and that does seem to work. If I have time I'll try to submit a PR that stores the variables needed for someone to calculate the GCV.
Calculating the GCV directly would require the package to generate a spline at each step along the valid range of the smoothing factor (0, 1), so maybe I can just provide an example of how to do it that folks can copy and paste if they'd like.
I'm interested in optimizing the smoothing parameter using the GCV (page 244 7.52). Oftentimes, this requires the number of effective number of parameters and degrees of freedom for the generated spline. I've been looking at the source code in _sspumv.py and just wanted to confirm there's no easy/built-in way to get this from a spline that csaps has created.
The text was updated successfully, but these errors were encountered: