You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.nn.probability.distribution.Gamma.rst 1.7 kB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. mindspore.nn.probability.distribution.Gamma
  2. ================================================
  3. .. py:class:: mindspore.nn.probability.distribution.Gamma(concentration=None, rate=None, seed=None, dtype=mstype.float32, name='Gamma')
  4. 伽马分布(Gamma distribution)。
  5. 连续随机分布,取值范围为 :math:`(0, \inf)` ,概率密度函数为
  6. .. math::
  7. f(x, \alpha, \beta) = \beta^\alpha / \Gamma(\alpha) x^{\alpha - 1} \exp(-\beta x).
  8. 其中 :math:`G` 为 Gamma 函数。
  9. **参数:**
  10. - **concentration** (int, float, list, numpy.ndarray, Tensor) - 浓度,也被称为伽马分布的alpha。默认值:None。
  11. - **rate** (int, float, list, numpy.ndarray, Tensor) - 逆尺度参数,也被称为伽马分布的beta。默认值:None。
  12. - **seed** (int) - 采样时使用的种子。如果为None,则使用全局种子。默认值:None。
  13. - **dtype** (mindspore.dtype) - 事件样例的类型。默认值:mindspore.float32。
  14. - **name** (str) - 分布的名称。默认值:'Gamma'。
  15. .. note::
  16. - `concentration` 和 `rate` 中的元素必须大于零。
  17. - `dtype` 必须是float,因为伽马分布是连续的。
  18. **异常:**
  19. - **ValueError** - `concentration` 或者 `rate` 中元素小于0。
  20. - **TypeError** - `dtype` 不是float的子类。
  21. .. py:method:: concentration
  22. :property:
  23. 返回分布的浓度(也称为伽马分布的alpha)。
  24. **返回:**
  25. Tensor, concentration 的值。
  26. .. py:method:: rate
  27. :property:
  28. 返回分布的逆尺度(也称为伽马分布的beta)。
  29. **返回:**
  30. Tensor, rate 的值。