Skip to content

Conversation

cmcamdy
Copy link
Contributor

@cmcamdy cmcamdy commented Apr 15, 2024

| API 名称 | paddle.distribution.chi2 / paddle.distribution.LKJCholesky |

Copy link

paddle-bot bot commented Apr 15, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请检查PR提交格式和内容是否完备,具体请参考示例模版
Your PR has been submitted. Thanks for your contribution!
Please check its format and content. For this, you can refer to Template and Demo.

@cmcamdy cmcamdy changed the title 【Hackathon 6th No.1】为 Paddle 新增 chi2/LKJCholesky API 【Hackathon 6th No.5】为 Paddle 新增 chi2/LKJCholesky API Apr 15, 2024

----------------------------------------
- `paddle.distribution.LKJCholesky`
- `Pytorch`和`numpyro` 的`LKJCholesky`实现逻辑基本一致,区别是numpyro多了`sample method`的选择:`_onion`和`_cvine`。 `paddle` 中考虑实现后者
Copy link

@xuxinyi389 xuxinyi389 Apr 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

补充下两种采样方式:_onion 和 _cvine 的区别;pytorch没有sample method参数,它使用的是两种中的一种嘛?对相关内容做补充

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改
pytorch默认的是onion
cvine的sample方法可以参考: https://ms.mcmaster.ca/canty/seminars/Joe_vinecorr_print.pdf

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image 部分公式没有显示正确,检查下

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修复

@cmcamdy cmcamdy requested a review from xuxinyi389 April 17, 2024 11:10
参数表:
- `dim (int)`: 目标相关矩阵的维度。
- `concentration (float, optional)`: 集中参数,默认为1.0。这个参数控制了生成的相关矩阵的分布。concentration 越大,生成的矩阵越接近单位矩阵。
- `sample_method (str)`:不同采样策略,可选项有:`onion` 和 `cvine`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image 这个参数与torch是有差异,参考下numpyro文档做进一步补充说明较好。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已添加

@xuxinyi389
Copy link

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants