KernelCensoredReg.cv_loo()

statsmodels.nonparametric.kernel_regression.KernelCensoredReg.cv_loo

KernelCensoredReg.cv_loo(bw, func) [source]

The cross-validation function with leave-one-out estimator

Parameters:

bw: array_like

Vector of bandwidth values

func: callable function

Returns the estimator of g(x). Can be either _est_loc_constant (local constant) or _est_loc_linear (local_linear).

Returns:

L: float

The value of the CV function

Notes

Calculates the cross-validation least-squares function. This function is minimized by compute_bw to calculate the optimal value of bw

For details see p.35 in [2]

..math:: CV(h)=n^{-1}sum_{i=1}^{n}(Y_{i}-g_{-i}(X_{i}))^{2}

where g_{-i}(X_{i}) is the leave-one-out estimator of g(X) and h is the vector of bandwidths

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.nonparametric.kernel_regression.KernelCensoredReg.cv_loo.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部