Logo

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

System Message: WARNING/2 (g_{-i}(X_{i}))

latex exited with error [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=latex) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2011/06/27> Babel <3.9k> and hyphenation patterns for 2 languages loaded. (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo)) (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def’ not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.131 \endinput ^^M No pages of output. Transcript written on math.log.
is the leave-one-out estimator of g(X) and

System Message: WARNING/2 (h)

latex exited with error [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=latex) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2011/06/27> Babel <3.9k> and hyphenation patterns for 2 languages loaded. (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo)) (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def’ not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.131 \endinput ^^M No pages of output. Transcript written on math.log.
is the vector of bandwidths

Previous topic

statsmodels.nonparametric.kernel_regression.KernelCensoredReg.censored

Next topic

statsmodels.nonparametric.kernel_regression.KernelCensoredReg.fit

This Page