-
Notifications
You must be signed in to change notification settings - Fork 296
【Hackathon 6th No.6】Add StudentT API to Paddle #888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
如果可以复用上次的RFC,就不需要改。如果有一些变化,在上次的RFC基础上改就行。 |
| D_{KL} & = \log \Gamma(\frac{\nu_1+1}{2}) - \log \Gamma(\frac{\nu_2+1}{2}) + \frac{1}{2}\log\frac{\nu_2}{\nu_1} + \log\frac{\sigma_2}{\sigma_1} - \log\Gamma(\frac{\nu_1}{2}) + \log\Gamma(\frac{\nu_2}{2}) \\ | ||
| & - \frac{\nu_1+1}{2} [\psi(\frac{1+\nu_1}{2}) - \psi(\frac{\nu_1}{2})] + \frac{\nu_2+1}{2} [\psi(\frac{1+\nu_2}{2}) - \psi(\frac{\nu_2}{2})] | ||
| \end{align*} | ||
| $$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
|
|
||
|
|
||
| # 四、对比分析 | ||
| Pytorch 与 Tensorflow_probability 实现方式大体类似, 由于t分布是连续的概率分布,相应的概率属性都可以通过基本的概率计算得到。而在 Tensorflow_probability 中除了实现了mean, variance, log_prob, entropy 等方法外还实现了 cdf, survival function, quantile 等方法。考虑与 paddle 现有概率分布类 API 保持一致,参照 pytorch 的实现方式。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我看参考资料还有scipy,但是前文并没有列出,可以补充下,也可以帮助后面决定是否要增加cdf等方法。tf额外实现cdf、survival等方法,目的是什么,paddle应该实现嘛?实现了也不影响API之间保持一致吧。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已添加
MultivariateNormal 在 paddle 2.6 版本中已有,是否需要继续修改呢? https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/distribution/MultivariateNormal_cn.html#cn-api-paddle-distribution-multivariatenormal |
| 需满足 `df>0`, `scale>0` | ||
| 类包含的方法及实现方案如下: | ||
|
|
||
| - `mean` 计算均值 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
后面都是xx的计算方法,统一下。还有注意此处排版,缩进级别和内容并不匹配。其他没有问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
可以复用 |
|
LGTM |


新增 StudentT API 的 rfcs。
MultivariateNormal 上次写过了,是需要改吗?