How is numparam calculated for smoothing splines?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am using the function: [fitobject,gof,output]=fit(x,y,'smoothingspline','smoothingparam',s); where 's' is the chosen level of smoothing.
I understand that output.numparam gives "Number of unknown parameters (coefficients) to fit", but I am not sure how MATLAB calculates this number for the (cubic) smoothing spline. It changes for each level of 's' - from 2 with maximum smoothing (makes sense since it is a linear function), to >40, and with the exception of maximum smoothing it usually includes decimals, which I'm finding hard to interpret. I would be really grateful if anyone could tell me what this number indicates and/or how it is calculated. Thank you.
0 comentarios
Respuestas (1)
Archoran Encor
el 23 de Ag. de 2021
It's the same question I had to answer for a research project of mine today. It is basically the trace of the smoothing matrix - being a value between 2 and your number of input points. That's some hell of a formula using the smoothing value p and the sum of all spline leverages. But I think Matlab is only being stuck with their own definitions there...
But basically you can refer to this value as maximum degrees of freedom of your interpolation.
0 comentarios
Ver también
Categorías
Más información sobre Spline Postprocessing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!