-
Notifications
You must be signed in to change notification settings - Fork 878
【Hackathon 6th No.24】paddle.quantile/nanquantile 功能增强 -part #6353
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5eeac00
update quantile and add nanquantile
Asthestarsfalll 638acea
update
Asthestarsfalll 5c8edd4
update
Asthestarsfalll 0417f1a
merge upstream
Asthestarsfalll 04c78b6
fix conflict
Asthestarsfalll 4bcce28
fix conflict
Asthestarsfalll 9f26ee6
fix typo
Asthestarsfalll 60fc074
fix typo
Asthestarsfalll 15760b4
update
Asthestarsfalll File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,26 @@ | ||
| .. _cn_api_paddle_nanquantile: | ||
|
|
||
| nanquantile | ||
| ------------------------------- | ||
|
|
||
| .. py:function:: paddle.nanquantile(x, q, axis=None, keepdim=False, interpolatio='linear', name=None) | ||
| 沿给定的轴 ``axis`` 计算 ``x`` 中元素的分位数, 忽略元素中的 ``NaN`` 。 | ||
|
|
||
| 参数 | ||
| :::::::::: | ||
| - **x** (Tensor) - 输入的 Tensor,数据类型为:float32、float64。 | ||
| - **q** (int|float|list|Tensor) - 待计算的分位数,需要在符合取值范围[0, 1]。如果 ``q`` 是 List 或者 1-D Tensor,其中的每一个 q 分位数都会被计算,并且输出的首维大小与列表中元素的数量相同。 | ||
| - **axis** (int|list,可选) - 指定对 ``x`` 进行计算的轴。``axis`` 可以是 int 或内部元素为 int 类型的 list。``axis`` 值应该在范围[-D, D)内,D 是 ``x`` 的维度。如果 ``axis`` 或者其中的元素值小于 0,则等价于 :math:`axis + D`。如果 ``axis`` 是 list,对给定的轴上的所有元素计算分位数。如果 ``axis`` 是 None,则对 ``x`` 的全部元素计算分位数。默认值为 None。 | ||
| - **keepdim** (bool,可选) - 是否在输出 Tensor 中保留减小的维度。如果 ``keepdim`` 为 True,则输出 Tensor 和 ``x`` 具有相同的维度(减少的维度除外,减少的维度的大小为 1)。否则,输出 Tensor 的形状会在 ``axis`` 上进行 squeeze 操作。默认值为 False。 | ||
| - **interpolation** (str,可选) - 计算分位数的插值方法,可以是 ``linear`` , ``lower`` , ``higher`` , ``nearest`` 或者 ``midpoint`` 。 默认值为 liner。 | ||
Asthestarsfalll marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。 | ||
|
|
||
| 返回 | ||
| :::::::::: | ||
| ``Tensor``,沿着 ``axis`` 进行分位数计算的结果。如果 ``x`` 的数据类型为 float64,则返回值的数据类型为 float64,反之返回值数据类型为 float32。 | ||
Asthestarsfalll marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 代码示例 | ||
| :::::::::: | ||
|
|
||
| COPY-FROM: paddle.quantile | ||
This file contains hidden or 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
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.