-
Notifications
You must be signed in to change notification settings - Fork 876
[Docathon][Add CN Doc No.23] #6372
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 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4413dbb
add_doc & fix_overview
zade23 2ebf8c5
Merge branch 'PaddlePaddle:develop' into en_doc_23
zade23 b3a51b4
fix doc
zade23 cc42dc6
Merge branch 'develop' of https://github.com/PaddlePaddle/docs into e…
zade23 d3b3fdb
Merge branch 'en_doc_23' of https://github.com/zade23/docs into en_do…
zade23 9ab463a
Merge branch 'PaddlePaddle:develop' into en_doc_23
zade23 0ed5eba
fix return type
zade23 03b2486
Merge branch 'develop' of https://github.com/PaddlePaddle/docs into e…
zade23 5ebc7ae
Update docs/api/paddle/static/ctr_metric_bundle_cn.rst
zade23 42c7786
Merge branch 'PaddlePaddle:develop' into en_doc_23
zade23 ba00a9b
rerun pre-commit
zade23 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
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,39 @@ | ||
| .. _cn_api_paddle_static_ctr_metric_bundle: | ||
|
|
||
| ctr_metric_bundle | ||
| ------------------------------- | ||
|
|
||
| .. py:function:: paddle.static.ctr_metric_bundle(input, label, ins_tag_weight=None) | ||
|
|
||
| CTR 相关度量层 | ||
|
|
||
| 此函数用于计算 CTR 相关指标:RMSE(均方根误差)、MAE(平均绝对误差)、predicted_ctr(预测点击率)、q 值。 | ||
|
|
||
| 为了计算这些指标的最终值,我们应该使用总实例数进行以下计算: | ||
| MAE = local_abserr / 实例数 | ||
| RMSE = sqrt(local_sqrerr / 实例数) | ||
| predicted_ctr = local_prob / 实例数 | ||
| q = local_q / 实例数 | ||
| 注意,如果您正在进行分布式作业,您应该首先对这些指标和实例数进行全局归约。 | ||
|
|
||
| 参数 | ||
| :::::::::::: | ||
| - **input** (Tensor) - 一个浮点数 2D 张量,值在[0, 1]范围内。每行按降序排列。这个输入应该是 topk 的输出。通常,这个张量表示每个标签的概率。 | ||
| - **label** (Tensor) - 表示训练数据标签的 2D 整数张量。高度为批量大小,宽度始终为 1。 | ||
| - **ins_tag_weight** (Tensor) - 表示训练数据的 ins_tag_weight 的 2D 整数张量。1 表示真实数据,0 表示假数据。类型为 float32 或 float64 的 LoDTensor 或 Tensor。 | ||
|
|
||
| 返回 | ||
| :::::::::::: | ||
| - **local_sqrerr** (Tensor) - 局部平方误差和 | ||
| - **local_abserr** (Tensor) - 局部绝对误差和 | ||
| - **local_prob** (Tensor) - 局部预测 CTR 和 | ||
| - **local_q** (Tensor) - 局部 q 值和 | ||
| - **local_pos_num** (Tensor) - 局部正例数 | ||
| - **local_ins_num** (Tensor) - 局部样本数 | ||
|
|
||
| tuple (local_sqrerr, local_abserr, local_prob, local_q, local_pos_num, local_ins_num): 包含局部平方误差和、局部绝对误差和、局部预测 CTR 和、局部 q 值和、局部正例数和局部样本数的元组。 | ||
|
|
||
| 代码示例: | ||
| :::::::::: | ||
|
|
||
| COPY-FROM: paddle.static.ctr_metric_bundle | ||
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.