statsmodels.nonparametric.kernel_density.KDEMultivariateConditional.imse

KDEMultivariateConditional.imse(bw)[source]

The integrated mean square error for the conditional KDE.

Parameters:
bwarray_like

The bandwidth parameter(s).

Returns:
CVfloat

The cross-validation objective function.

Notes

For more details see pp. 156-166 in [1]. For details on how to handle the mixed variable types see [2].

The formula for the cross-validation objective function for mixed variable types is:

CV(h,λ)=1nl=1nGl(Xl)[μl(Xl)]22nl=1nfl(Xl,Yl)μl(Xl)

where

Gl(Xl)=n2iljlKXi,XlKXj,XlKYi,Yj(2)

where KXi,Xl is the multivariate product kernel and μl(Xl) is the leave-one-out estimator of the pdf.

KYi,Yj(2) is the convolution kernel.

The value of the function is minimized by the _cv_ls method of the GenericKDE class to return the bw estimates that minimize the distance between the estimated and “true” probability density.

References

[1]

Racine, J., Li, Q. Nonparametric econometrics: theory and practice. Princeton University Press. (2007)

[2]

Racine, J., Li, Q. “Nonparametric Estimation of Distributions with Categorical and Continuous Data.” Working Paper. (2000)