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:
- x
floator array_like Points for which cdf is evaluated.
xcan be scalar or 1-dim.- samplearray_like
1-d sample from which kernel estimate is computed.
- bw
float Bandwidth parameter, there is currently no default value for it.
- kernel_type
strorcallable Kernel name or kernel function. Currently supported kernel names are “beta”, “beta2”, “gamma”, “gamma2”, “bs”, “invgamma”, “invgauss”, “lognorm”, “recipinvgauss” and “weibull”.
- weights
Noneor array_like,optional 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_size
float,optional If x is an 1-dim array, then points can be evaluated in vectorized form. To limit the amount of memory, a loop works in batches. Evaluation points and sample points are split so that the intermediate kernel arrays have at most
batch_size * 1000elements. The value does not need to be an integer.Default is to have at most 10000 elements in intermediate arrays.
Changed in version 0.15.1:
batch_sizebounds the size of the intermediate kernel arrays on both axes, the evaluation points and the sample. Previously a sample with more thanbatch_size * 1000observations raised an error. A single-elementxnow always returns a scalar.
- x
- Returns:
- Raises:
TypeErrorIf
batch_sizeis not a number, for example None, a str or a bool.ValueErrorIf
batch_size * 1000is smaller than 1 or is nan.