Skip to content

paddle.distribution.Exponential 内容问题 #7475

@Echo-Nie

Description

@Echo-Nie

文档链接&描述 Document Links & Description

Exponential的api添加PR:#6413
API源码:https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/distribution/exponential.py
预览文档:preview-Exponential-API文档

问题1:ICDF(k)

Exponential-API文档-PaddlePaddle深度学习平台 - icdf(k)

Image

Q: 指数分布的逆累积分布函数,公式写错了吗?

指数分布的概率密度函数为: $f(x; \lambda) = \lambda e^{-\lambda x} \quad \text{对于 } x \geq 0$ ,其中, $\lambda$ 是率参数;

指数分布的累积分布函数为: $F(x; \lambda) = 1 - e^{-\lambda x} \quad \text{对于 } x \geq 0$,要求逆累积分布函数,即给定一个概率 $p$$0\leq p<1$ ),求解 $x$ 使得 $F(x; \lambda) = p$
通过解方程: $1 - e^{-\lambda x} = p$

可以得到: $e^{-\lambda x} = 1 - p$ ,取自然对数得: $-\lambda x = \ln(1 - p)$ ,因此: $x = -\frac{1}{\lambda} \ln(1 - p)$ ,与原文档不符。

应该写成: $icdf(p; θ) = -\frac{1}{θ} \ln(1 - p), \quad 0 < p < 1 $

问题2:kl_divergence

预览链接:Exponential-API文档-kl_divergence(other)

Image

这里是写成Geometric吗?

Exponential 分布是连续分布,定义在 $[0, \infty)$ ; Geometric 分布是离散分布,定义在 ${0,1,2,\dots}$ ;KL 散度 kl_divergence(other) 计算的是 两个相同分布族之间的 KL 散度,因此参数 other 应该是Exponential,而不是 Geometric?

问题3:cdf和icdf中的 k和value

Image

@sunzhongkai588 @luotao1

请提出你的建议/提个PR修复这个问题 Please give your suggestion/update a PR to fix it

是否存在以上问题? 如果核实之后,我将提交PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions