cupy.random.noncentral_chisquare#

cupy.random.noncentral_chisquare(df, nonc, size=None, dtype=<class 'float'>)[source]#

非中心卡方分布。

返回从非中心卡方分布中提取的样本数组。其概率密度函数定义为

\[f(x) = \frac{1}{2}e^{-(x+\lambda)/2} \ \left(\frac{x}{\lambda}\right)^{k/4 - 1/2} \ I_{k/2 - 1}(\sqrt{\lambda x}),\]

其中 \(I\) 是第一类修正贝塞尔函数。

参数:
  • df (float) – 非中心卡方分布的参数 \(k\)

  • nonc (float) – 非中心卡方分布的参数 \(\lambda\)

  • size (intint 元组) – 数组的形状。如果为 None,则生成零维数组。

  • dtype – 数据类型说明符。只允许 numpy.float32numpy.float64 类型。

返回值:

从非中心卡方分布中提取的样本。

返回类型:

cupy.ndarray