悬赏 100 个论坛币 已解决
在ggplot2程序包中,qplot()函数中,使用smooth时,出现了bs="cs"这个参数,完整命令如下:
qplot(carat,price,data=dsmall,geom=c("point","smooth"),method="gam",formula=y~s(x, bs = "cs"))
我查到了bs,是为多样式平滑生成B-Spline基础矩阵。但不知cs是什么意思
最佳答案
ltx5151 查看完整内容
cubic smoothing spline
自动通过B-spine生成相应的natural cubic spline basis functions,相当于做三次样条逼近这个设定后,函数根据data和knots的分布,自动选取smoothing penalty,使得函数足够smooth,防止overfit.