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]

基于非对称核的累积分布估计。

Parameters:
xarray_like, float

用于评估密度的点。x 可以是标量或一维。

samplendarray, 1-d

用于计算核估计的样本。

bwfloat

带宽参数,目前没有默认值。

kernel_typestr or callable

核函数名称或核函数。 目前支持的核函数名称有“beta”、“beta2”、“gamma”、“gamma2”、“bs”、“invgamma”、“invgauss”、“lognorm”、“recipinvgauss”和“weibull”。

weightsNone or ndarray

如果 weights 不是 None,则样本点的核函数会根据它进行加权。没有权重对应于每个分量均匀加权为 1 / nobs,其中 nobs 是 sample 的大小。

batch_sizefloat

如果x是一个一维数组,那么点可以以向量化形式进行评估。为了限制内存的使用量,循环可以分批次进行。批次的数量是根据中间数组的大小限制来确定的。

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

默认情况下,中间数组中的元素最多为10000个。

Returns:
cdffloat or ndarray

在点 x 处的 cdf 估计。cdf 与 x 具有相同的大小或形状。


Last update: Oct 16, 2024