statsmodels.nonparametric.kernel_density.KDEMultivariate.loo_likelihood

KDEMultivariate.loo_likelihood(bw, func=<function KDEMultivariate.<lambda>>)[source]

Returns the leave-one-out likelihood function.

The leave-one-out likelihood function for the unconditional KDE.

Parameters:
  • bw (array_like) – The value for the bandwidth parameter(s).
  • func (callable, optional) – Function to transform the likelihood values (before summing); for the log likelihood, use func=np.log. Default is f(x) = x.

Notes

The leave-one-out kernel estimator of fi is:

fi(Xi)=1(n1)hj=1,jiKh(Xi,Xj)

where Kh represents the generalized product kernel estimator:

Kh(Xi,Xj)=qs=1h1sk(XisXjshs)