我正在尝试在R中执行内核逻辑回归。是否有这样做的软件包?
stats::ksmooth
为您提供了Nadaraya–Watson内核回归:
with(cars, {
plot(speed, dist>40)
lines(ksmooth(speed, dist>40, "normal", bandwidth = 2), col = 2)
lines(ksmooth(speed, dist>40, "normal", bandwidth = 6), col = 3)
})
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句