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
【PaddlePaddle Hackathon 2】3、为 Paddle 新增 corrcoef(皮尔逊积矩相关系数) #4316
Merged
Merged
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
828b3a3
corrcoef_doc
liqitong-a e94096d
Merge branch 'develop' of https://github.com/PaddlePaddle/docs into d…
liqitong-a 7255d78
Merge branch 'PaddlePaddle:develop' into develop
liqitong-a a4a4b92
Update corrcoef_cn.rst
liqitong-a b2a9478
Update corrcoef_cn.rst
liqitong-a d70c75b
Update corrcoef_cn.rst
liqitong-a 711cd66
Merge branch 'PaddlePaddle:develop' into develop
liqitong-a 5121887
Update corrcoef_cn.rst
liqitong-a eee4f64
Merge branch 'PaddlePaddle:develop' into develop
liqitong-a ee93660
Update corrcoef_cn.rst
liqitong-a c901e1a
Merge branch 'PaddlePaddle:develop' into develop
liqitong-a 084779d
Update corrcoef_cn.rst
Ligoml File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.. _cn_api_linalg_corrcoef: | ||
|
||
corrcoef | ||
------------------------------- | ||
|
||
.. py:function:: paddle.linalg.corrcoef(x, rowvar=True, name=None) | ||
|
||
|
||
相关系数矩阵表示输入矩阵中每对变量的相关性。例如,对于N维样本X=[x1,x2,…xN]T,则相关系数矩阵 | ||
元素 `Rij` 是 `xi` 和 `xj` 的相关性。元素 `Rii` 是 `xi` 本身的协方差。 | ||
|
||
皮尔逊积矩相关系数 `R` 和协方差矩阵 `C` 的关系如下: | ||
|
||
.. math:: R_{ij} = \\frac{ C_{ij} } { \\sqrt{ C_{ii} * C_{jj} } } | ||
|
||
`R` 的值在-1到1之间。 | ||
|
||
参数 | ||
::::::::: | ||
- **x** (Tensor) - 一个N(N<=2)维矩阵,包含多个变量。默认矩阵的每行是一个观测变量,由参数rowvar设置。 | ||
- **rowvar** (bool,可选) - 若是True,则每行作为一个观测变量;若是False,则每列作为一个观测变量。默认True。 | ||
- **name** (str,可选) - 一般无需设置,默认值为None。用于为开发人员打印调试信息。具体用法请参见 :ref:`api_guide_Name`。 | ||
|
||
返回 | ||
::::::::: | ||
输入x的皮尔逊积矩相关系数矩阵。 | ||
|
||
代码示例 | ||
:::::::::: | ||
COPY-FROM: <paddle.linalg.corrcoef>:<code-example1> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
显示还是不对,把
\\
改成\
,另外可以自己查看预览链接核对,每次触发CI都会生成新的官网预览,文档参考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.
Done!