Function similar to csaps. Determines the optimal smoothing parameter using the generalized cross validation method from Craven and Wahba. The function returns the output from a smoothing spline fit, the smoothing parameter, the estimated variance, the magnitude of the estimated 95% confidence interval, and the value of the minimizing function.
The generalized cross validation method for choosing the smoothing parameter should be more robust and give "better" answers than the default choice for csaps. It works for data that is not equally spaced.
The code has not been optimized.
Matthew Taliaferro (2020). csapsGCV(x,y,p,xx,W) (https://www.mathworks.com/matlabcentral/fileexchange/63168-csapsgcv-x-y-p-xx-w), MATLAB Central File Exchange. Retrieved .
Comprehensive rewrite of code. The method for finding Q has been fixed. Doesn't use a csaps (and therefore ppval). Uses "ordinary" cross-validation for data with less than 30 data points. An improved method for finding an initial guess.
Added some extra outputs and imputs to more closely mimic csaps.
Added more to the description