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 4th No.11】为 Paddle 新增 Geometric API -- Geometric 中文API doc #5816

Merged
merged 7 commits into from
May 16, 2023

Conversation

dasenCoding
Copy link
Contributor

PR types
Others

PR changes
Docs

Description
为 Paddle 新增 Geometric API -- Geometric doc

Geometric API: PaddlePaddle/Paddle#51224

@paddle-bot
Copy link

paddle-bot bot commented Apr 21, 2023

感谢你贡献飞桨文档,文档预览构建中,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)
几何分布
Copy link
Collaborator

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.

描述太简单了,请和英文对齐

已经修改!

数学公式:

.. math::
$P(X=k) = (1-p)^{k-1}p$
Copy link
Collaborator

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.

$是什么?包括下文也经常出现这符号,请确认并修改 image

这是我的失误,已经纠正!

$P(X=k) = (1-p)^{k-1}p$

上面数学公式中:

Copy link
Collaborator

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`:表示实验次数,是一个正整数

包括下文涉及到的公式符号的解释,都添加缩进,保持美观

Copy link
Contributor Author

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的概率。

Copy link
Collaborator

Choose a reason for hiding this comment

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

各个方法的代码示例也添加上(直接用copy from 英文代码)

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 from 英文代码)

我不太清楚该怎么用,请您检查一下我新提交的用法是否正确,感谢!

Copy link
Collaborator

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

@dasenCoding
Copy link
Contributor Author

@sunzhongkai588 已经按照您提出的意见进行修改,请再次检查一下!

感谢!


**代码示例**

COPY-FROM: paddle.distribution.Geometric
Copy link
Collaborator

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

其他方法也这么修改

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 from后面的内容就怎么写。以 pmf(k) 为例,此处应该改成 COPY-FROM: paddle.distribution.Geometric.pmf

其他方法也这么修改

好的谢谢!已按照您的提示修改完毕!

请您再次审查一下,谢谢!@sunzhongkai588

@sunzhongkai588
Copy link
Collaborator

@sunzhongkai588 已经按照您提出的意见进行修改,请再次检查一下!

感谢!

目前看没太大问题。待英文文档的pr(PaddlePaddle/Paddle#51224 )合入后,我再做验证

@dasenCoding
Copy link
Contributor Author

@sunzhongkai588 已经按照您提出的意见进行修改,请再次检查一下!
感谢!

目前看没太大问题。待英文文档的pr(PaddlePaddle/Paddle#51224 )合入后,我再做验证

好的! 感谢!

Copy link
Collaborator

@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.

@dasenCoding 文档内容没问题,CI报了代码风格的错,原因是有出现中英文之间没加空格。
image

@luotao1
Copy link
Collaborator

luotao1 commented May 10, 2023

@dasenCoding CodeStyle 还木有过,辛苦修复一下

Copy link
Collaborator

@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

@dasenCoding
Copy link
Contributor Author

@luotao1 @sunzhongkai588 不好意思拖了几天,感谢!

@luotao1 luotao1 merged commit c21704e into PaddlePaddle:develop May 16, 2023
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