I'm studying about Smoothing Splines and I'm having some doubts about this method. I already understood the criterion to choose the smooth parameter, but How I acess the fit of this type of non-parametric regression? Residuals? Just looking the fit in the plot?

All that I get as output from smooth.spline() in R is below

Smoothing Parameter  spar= 0.9  lambda= 0.007442127
Equivalent Degrees of Freedom (Df): 5.384943
Penalized Criterion: 4357.647
GCV: 32.18273

One more doubt, the smooth parameter is spar or lambda? I know that there exists some relationship between the two values.

age <- c(0.083, 0.25, 0.5, 0.75, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 10.5, 11.0, 11.5, 12.0, 12.5, 13.0, 13.5, 14.0, 14.5, 15.0, 15.5, 16.0, 16.5, 17.0, 18.0, 19.0, 20.0)
height<- c(525.0, 608.0, 665.0, 717.0, 745.0, 803.0, 859.0, 940, 1007, 1065, 1121, 1183, 1238, 1298, 1348, 1369, 1391, 1422, 1470, 1525, 1578, 1638, 1664, 1692, 1708, 1723, 1727, 1727, 1727, 1729, 1738, 1738)
plot(age,height,main="Age vs Height",xlab="Age",ylab="Height")

enter image description here

What data is used to fit this curve?


Very interesting question. In my view, debugging / diagnosis on none-parametric model is very different from the classical literature in regression setting. People even not run diagnosis too much on these models other than focusing on testing set performance / cross validation.

One example would be, in regression setting, we may check many things to make sure the assumptions are met. Such as residuals vs fitted, QQ plot etc. But, in an extreme case of none-parametric model, In neural network, people do not check these assumptions, but only care about the performance on testing set (under-fitting or over-fitting).

  • $\begingroup$ I have one doubt about testing set performance. When you do a smoothing spline, how many percent of data you use as training and testing set? I think I made a mistake and fit a smoothing spline with all the dataset that I have. $\endgroup$ – user72621 Nov 14 '16 at 20:55
  • 1
    $\begingroup$ @Roland you always have many options to split your data into training and testing. And different options will have different pros and cons. See this for other options. stats.stackexchange.com/questions/17602/… $\endgroup$ – hxd1011 Nov 14 '16 at 20:57
  • 1
    $\begingroup$ @Roland also, keep in mind of under-fitting and over-fitting and the signs for those. Here is another link: stats.stackexchange.com/questions/220827/… $\endgroup$ – hxd1011 Nov 14 '16 at 20:59
  • $\begingroup$ I think I'm missing something. When we do a Smoothing Spline, the default of the algorithm is using Generalized Cross Validation to select the smoothing parameter. In the examples that I'm saw they fit the spline with all data and just use the predict function. I don't need to split the data to test the fit? I mean fit a model with a part of the data and test the fit with another part? $\endgroup$ – user72621 Nov 14 '16 at 21:11
  • 1
    $\begingroup$ @Roland Here is what you are missing: Some software will run the whole process (cross validation) automatically to select the good parameter. So, it does not require you manually do that. But if you want to do customized things (e.g., plotting learning curve), you can manually split data and run it in different parameter. Also here is another useful link. stats.stackexchange.com/questions/226553/… $\endgroup$ – hxd1011 Nov 14 '16 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy