我知道平滑参数(lambda)对于拟合平滑样条非常重要,但是我没有看到关于如何选择合理的lambda(spar =?)的任何帖子,我被告知spar通常在0到1之间有没有人可以在使用smooth.spline()时分享你的经验?谢谢.
smooth.spline(x, y = NULL, w = NULL, df, spar = NULL,
cv = FALSE, all.knots = FALSE, nknots = NULL,
keep.data = TRUE, df.offset = 0, penalty = 1,
control.spar = list(), tol = 1e-6 * IQR(x))
Run Code Online (Sandbox Code Playgroud)