3.8.7.1.1. statsmodels.nonparametric.kernels.aitchison_aitken

statsmodels.nonparametric.kernels.aitchison_aitken(h, Xi, x, num_levels=None)[source]
The Aitchison-Aitken kernel, used for unordered discrete random variables.
Parameters:

h : 1-D ndarray, shape (K,)

The bandwidths used to estimate the value of the kernel function.

Xi
: 2-D ndarray of ints, shape (nobs, K)

The value of the training set.

x: 1-D ndarray, shape (K,)

The value at which the kernel density is being estimated.

num_levels: bool, optional

Gives the user the option to specify the number of levels for the random variable. If False, the number of levels is calculated from the data.

Returns:

kernel_value : ndarray, shape (nobs, K)

The value of the kernel function at each training point for each var.

rac{lambda}{c-1}`.
Here \(c\) is the number of levels plus one of the RV.