-
Notifications
You must be signed in to change notification settings - Fork 765
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 4th No.11】为 Paddle 新增 Geometric API -- Geometric 中文API doc #5816
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5816.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
------------------------------- | ||
|
||
.. py:class:: paddle.distribution.Geometric(probs) | ||
几何分布 |
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.
描述太简单了,请和英文对齐
已经修改!
数学公式: | ||
|
||
.. math:: | ||
$P(X=k) = (1-p)^{k-1}p$ |
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.
$P(X=k) = (1-p)^{k-1}p$ | ||
|
||
上面数学公式中: | ||
|
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.
下面三个公式符号的解释,统一都缩进吧,如
:math:`p`:表示成功的概率。
:math:`X`:表示进行了多少次试验才获得第一次成功。
:math:`k`:表示实验次数,是一个正整数
包括下文涉及到的公式符号的解释,都添加缩进,保持美观
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.
下面三个公式符号的解释,统一都缩进吧,如
:math:`p`:表示成功的概率。 :math:`X`:表示进行了多少次试验才获得第一次成功。 :math:`k`:表示实验次数,是一个正整数
包括下文涉及到的公式符号的解释,都添加缩进,保持美观
已经进行缩进!
**返回** | ||
|
||
- **Tensor** - value 第一次成功所需的试验次数k的概率。 | ||
|
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.
各个方法的代码示例也添加上(直接用copy from 英文代码)
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.
各个方法的代码示例也添加上(直接用copy from 英文代码)
我不太清楚该怎么用,请您检查一下我新提交的用法是否正确,感谢!
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.
各个方法的代码示例也添加上(直接用copy from 英文代码)
我不太清楚该怎么用,请您检查一下我新提交的用法是否正确,感谢!
各个方法下的代码示例,代码怎么用的就怎么引用。比如 entropy()
方法,代码示例中就直接写
COPY-FROM: paddle.distribution.Geometric.entropy
@sunzhongkai588 已经按照您提出的意见进行修改,请再次检查一下! 感谢! |
|
||
**代码示例** | ||
|
||
COPY-FROM: paddle.distribution.Geometric |
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.
方法怎么引用的,copy from后面的内容就怎么写。以 pmf(k)
为例,此处应该改成 COPY-FROM: paddle.distribution.Geometric.pmf
其他方法也这么修改
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.
方法怎么引用的,copy from后面的内容就怎么写。以
pmf(k)
为例,此处应该改成COPY-FROM: paddle.distribution.Geometric.pmf
其他方法也这么修改
好的谢谢!已按照您的提示修改完毕!
请您再次审查一下,谢谢!@sunzhongkai588
目前看没太大问题。待英文文档的pr(PaddlePaddle/Paddle#51224 )合入后,我再做验证 |
好的! 感谢! |
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.
@dasenCoding 文档内容没问题,CI报了代码风格的错,原因是有出现中英文之间没加空格。
- 可以使用pre commit工具进行自动检查、优化代码风格问题。详见:https://www.paddlepaddle.org.cn/documentation/docs/zh/dev_guides/git_guides/codestyle_check_guide_cn.html ;或者手动检查并更新
@dasenCoding CodeStyle 还木有过,辛苦修复一下 |
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 for docs
@luotao1 @sunzhongkai588 不好意思拖了几天,感谢! |
PR types
Others
PR changes
Docs
Description
为 Paddle 新增 Geometric API -- Geometric doc
Geometric API: PaddlePaddle/Paddle#51224