statsmodels.nonparametric.kernels_asymmetric.cdf_kernel_asym

statsmodels.nonparametric.kernels_asymmetric.cdf_kernel_asym(x, sample, bw, kernel_type, weights=None, batch_size=10)[source]

Estimate of cumulative distribution based on asymmetric kernel.

Parameters:
xarray_like, float

Points for which density is evaluated. x can be scalar or 1-dim.

samplendarray, 1-d

Sample from which kernel estimate is computed.

bwfloat

Bandwidth parameter, there is currently no default value for it.

kernel_typestr or callable

Kernel name or kernel function. Currently supported kernel names are “beta”, “beta2”, “gamma”, “gamma2”, “bs”, “invgamma”, “invgauss”, “lognorm”, “recipinvgauss” and “weibull”.

weightsNone or ndarray

If weights is not None, then kernel for sample points are weighted by it. No weights corresponds to uniform weighting of each component with 1 / nobs, where nobs is the size of sample.

batch_sizefloat

If x is an 1-dim array, then points can be evaluated in vectorized form. To limit the amount of memory, a loop can work in batches. The number of batches is determined so that the intermediate array sizes are limited by

np.size(batch) * len(sample) < batch_size * 1000.

Default is to have at most 10000 elements in intermediate arrays.

Returns:
cdffloat or ndarray

Estimate of cdf at points x. cdf has the same size or shape as x.


Last update: Nov 14, 2024