Skip to content
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

【Hackathon 6th No.6】为 Paddle 新增 StudentT API -part #64294

Merged
merged 11 commits into from
Jun 4, 2024

Conversation

NKNaN
Copy link
Contributor

@NKNaN NKNaN commented May 14, 2024

PR Category

User Experience

PR Types

New features

Description

新增 StudentT 分布类
rfc: https://github.com/PaddlePaddle/community/blob/master/rfcs/APIs/20240428_api_design_for_StudentT.md

Copy link

paddle-bot bot commented May 14, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

sample_mean = samples.mean(axis=0)
sample_variance = samples.var(axis=0)

np.testing.assert_allclose(
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已添加注释

Copy link
Contributor

@xuxinyi389 xuxinyi389 May 20, 2024

Choose a reason for hiding this comment

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

这个经验值要在rfc同步更新,并将由来说清楚

Copy link
Contributor Author

Choose a reason for hiding this comment

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

)
var = paddle.where(
nan_index, paddle.full_like(var, fill_value=float('nan')), var
)
Copy link
Contributor

@xuxinyi389 xuxinyi389 May 17, 2024

Choose a reason for hiding this comment

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

任何情况下,此处两个paddle.where op都会进行判断执行。一般而言对于判断分支需要将概率最大的分支放在最前面,即df在1和2之间概率应该默认是最频繁的场景,调整下写法。此外命名nan_index是不是有点怪,中文名“nan索引”,但其实际是作为paddle.where的condition参数

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
Contributor

LGTM

jeff41404
jeff41404 previously approved these changes May 24, 2024
Copy link
Contributor

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

paddle-ci-bot bot commented May 30, 2024

Sorry to inform you that 82e7413's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

* :math:`scale = \sigma`: is the scale parameter.
* :math:`\Gamma(\cdot)`: is the gamma function.

Args:
Copy link
Contributor

Choose a reason for hiding this comment

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

name 参数描述加一下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已添加

Copy link
Contributor

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

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

LGTM for docs

@luotao1 luotao1 merged commit 23764bf into PaddlePaddle:develop Jun 4, 2024
32 checks passed
@luotao1 luotao1 changed the title 【Hackathon 6th No.6】为 Paddle 新增 StudentT API 【Hackathon 6th No.6】为 Paddle 新增 StudentT API -part Jun 4, 2024
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.

5 participants