{"action":"created","comment":{"url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/pulls/comments/228828871","pull_request_review_id":169182690,"id":228828871,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODgyODg3MQ==","diff_hunk":"@@ -0,0 +1,49 @@\n+..  _api_guide_metrics:\n+\n+\n+评价指标\n+#########\n+在神经网络训练过程中或者训练完成后，需要评估模型的训练效果，评估的方法一般是计算全体预测值和全体真值(label)之间的距离，不同类型的任务会用不同的评价方法。\n+\n+分类任务评价\n+------------------\n+分类任务中最常用的是二分类，而多分类任务也可以转化为多个二分类任务的组合，二分类任务常用的评价指标有准确率、正确率、召回率、AUC和平均准确度。\n+\n+- 准确率: :code:`Precision` ，用来衡量二分类中召回真值和召回值的比例。\n+\n+  API Reference 请参考 :ref:`api_fluid_metrics_Precision` \n+\n+- 正确率: :code:`Accuracy` ，用来衡量二分类中召回真值和总样本数的比例。需要注意的是，准确率和正确率的定义是不同的，可以类比于误差分析中的 :code:`Variance` 和 :code:`Bias` 。\n+\n+  API Reference 请参考 :ref:`api_fluid_metrics_Accuracy` \n+\n+\n+- 召回率: :code:`Recall` ，用来衡量二分类中召回值和总样本数的比例。准确率和召回率的选取相互制约，实际模型中需要进行权衡，可以参考文档 `Precision_and_recall <https://en.wikipedia.org/wiki/Precision_and_recall>`_ 。\n+\n+  API Reference 请参考 :ref:`api_fluid_metrics_Recall` \n+\n+- AUC: :code:`Area Under Curve`， 适用于二分类的分类模型评估，用来计算 `ROC曲线的累积面积 <https://en.wikipedia.org/wiki/Receiver_operating_characteristic#Area_under_the_curve>`_。:code:`Auc` 通过python计算实现，如果关注性能，可以使用 :code:`fluid.layers.auc` 代替。\n+\n+  API Reference 请参考 :ref:`api_fluid_metrics_Auc` \n+\n+- 平均准确度: :code:`Average Precision` ，常用在Faster R-CNN和SSD等物体检测任务中。在不同召回条件下，计算了准确率的平均值，具体可以参考文档 `Average-precision <https://sanchom.wordpress.com/tag/average-precision/>`_ 和 `SSD: Single Shot MultiBox Detector <https://arxiv.org/abs/1512.02325>`_。\n+\n+  API Reference 请参考 :ref:`api_fluid_metrics_DetectionMAP`\n+\n+\n+\n+序列标注任务评价\n+------------------\n+序列标注任务中，模型的首要目标是将输入的token分组，称为语块(chunk)。\n+语块评估方法 :code:`ChunkEvaluator` ，接收 :code:`chunk_eval` 接口的输出，累积每一个minibatch的语块统计值，最后计算准确率、召回率和F1值。:code:`ChunkEvaluator` 支持IOB, IOE, IOBES和IO四种标注模式。可以参考文档 `Chunking with Support Vector Machines <https://aclanthology.info/pdf/N/N01/N01-1025.pdf>`_ ","path":"doc/fluid/api/api_guides/low_level/metrics.rst","position":38,"original_position":38,"commit_id":"55dab19fdab1cc99c5202fd675d8b4867e08d86e","original_commit_id":"55dab19fdab1cc99c5202fd675d8b4867e08d86e","user":{"login":"luotao1","id":6836917,"node_id":"MDQ6VXNlcjY4MzY5MTc=","avatar_url":"https://avatars0.githubusercontent.com/u/6836917?v=4","gravatar_id":"","url":"https://api.github.com/users/luotao1","html_url":"https://github.com/luotao1","followers_url":"https://api.github.com/users/luotao1/followers","following_url":"https://api.github.com/users/luotao1/following{/other_user}","gists_url":"https://api.github.com/users/luotao1/gists{/gist_id}","starred_url":"https://api.github.com/users/luotao1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luotao1/subscriptions","organizations_url":"https://api.github.com/users/luotao1/orgs","repos_url":"https://api.github.com/users/luotao1/repos","events_url":"https://api.github.com/users/luotao1/events{/privacy}","received_events_url":"https://api.github.com/users/luotao1/received_events","type":"User","site_admin":false},"body":"38行末尾缺句号","created_at":"2018-10-29T08:11:58Z","updated_at":"2018-10-29T08:12:04Z","html_url":"https://github.com/PaddlePaddle/FluidDoc/pull/236#discussion_r228828871","pull_request_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/pulls/236","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/PaddlePaddle/FluidDoc/pulls/comments/228828871"},"html":{"href":"https://github.com/PaddlePaddle/FluidDoc/pull/236#discussion_r228828871"},"pull_request":{"href":"https://api.github.com/repos/PaddlePaddle/FluidDoc/pulls/236"}}},"pull_request":{"url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/pulls/236","id":225972409,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1OTcyNDA5","html_url":"https://github.com/PaddlePaddle/FluidDoc/pull/236","diff_url":"https://github.com/PaddlePaddle/FluidDoc/pull/236.diff","patch_url":"https://github.com/PaddlePaddle/FluidDoc/pull/236.patch","issue_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/issues/236","number":236,"state":"open","locked":false,"title":"Add metrics api guide","user":{"login":"xuezhong","id":12216764,"node_id":"MDQ6VXNlcjEyMjE2NzY0","avatar_url":"https://avatars0.githubusercontent.com/u/12216764?v=4","gravatar_id":"","url":"https://api.github.com/users/xuezhong","html_url":"https://github.com/xuezhong","followers_url":"https://api.github.com/users/xuezhong/followers","following_url":"https://api.github.com/users/xuezhong/following{/other_user}","gists_url":"https://api.github.com/users/xuezhong/gists{/gist_id}","starred_url":"https://api.github.com/users/xuezhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xuezhong/subscriptions","organizations_url":"https://api.github.com/users/xuezhong/orgs","repos_url":"https://api.github.com/users/xuezhong/repos","events_url":"https://api.github.com/users/xuezhong/events{/privacy}","received_events_url":"https://api.github.com/users/xuezhong/received_events","type":"User","site_admin":false},"body":"add metrics.rst","created_at":"2018-10-26T04:23:32Z","updated_at":"2018-10-29T08:12:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7cf6bdb1ce979a889b30408be58747bc6d4170d8","assignee":null,"assignees":[],"requested_reviewers":[{"login":"shanyi15","id":35982308,"node_id":"MDQ6VXNlcjM1OTgyMzA4","avatar_url":"https://avatars1.githubusercontent.com/u/35982308?v=4","gravatar_id":"","url":"https://api.github.com/users/shanyi15","html_url":"https://github.com/shanyi15","followers_url":"https://api.github.com/users/shanyi15/followers","following_url":"https://api.github.com/users/shanyi15/following{/other_user}","gists_url":"https://api.github.com/users/shanyi15/gists{/gist_id}","starred_url":"https://api.github.com/users/shanyi15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shanyi15/subscriptions","organizations_url":"https://api.github.com/users/shanyi15/orgs","repos_url":"https://api.github.com/users/shanyi15/repos","events_url":"https://api.github.com/users/shanyi15/events{/privacy}","received_events_url":"https://api.github.com/users/shanyi15/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1088491885,"node_id":"MDU6TGFiZWwxMDg4NDkxODg1","url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/labels/API%20Guide","name":"API Guide","color":"cc0863","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/pulls/236/commits","review_comments_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/pulls/236/comments","review_comment_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/issues/236/comments","statuses_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/statuses/55dab19fdab1cc99c5202fd675d8b4867e08d86e","head":{"label":"xuezhong:add_metrics_api_guide","ref":"add_metrics_api_guide","sha":"55dab19fdab1cc99c5202fd675d8b4867e08d86e","user":{"login":"xuezhong","id":12216764,"node_id":"MDQ6VXNlcjEyMjE2NzY0","avatar_url":"https://avatars0.githubusercontent.com/u/12216764?v=4","gravatar_id":"","url":"https://api.github.com/users/xuezhong","html_url":"https://github.com/xuezhong","followers_url":"https://api.github.com/users/xuezhong/followers","following_url":"https://api.github.com/users/xuezhong/following{/other_user}","gists_url":"https://api.github.com/users/xuezhong/gists{/gist_id}","starred_url":"https://api.github.com/users/xuezhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xuezhong/subscriptions","organizations_url":"https://api.github.com/users/xuezhong/orgs","repos_url":"https://api.github.com/users/xuezhong/repos","events_url":"https://api.github.com/users/xuezhong/events{/privacy}","received_events_url":"https://api.github.com/users/xuezhong/received_events","type":"User","site_admin":false},"repo":{"id":154489578,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ0ODk1Nzg=","name":"FluidDoc","full_name":"xuezhong/FluidDoc","private":false,"owner":{"login":"xuezhong","id":12216764,"node_id":"MDQ6VXNlcjEyMjE2NzY0","avatar_url":"https://avatars0.githubusercontent.com/u/12216764?v=4","gravatar_id":"","url":"https://api.github.com/users/xuezhong","html_url":"https://github.com/xuezhong","followers_url":"https://api.github.com/users/xuezhong/followers","following_url":"https://api.github.com/users/xuezhong/following{/other_user}","gists_url":"https://api.github.com/users/xuezhong/gists{/gist_id}","starred_url":"https://api.github.com/users/xuezhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xuezhong/subscriptions","organizations_url":"https://api.github.com/users/xuezhong/orgs","repos_url":"https://api.github.com/users/xuezhong/repos","events_url":"https://api.github.com/users/xuezhong/events{/privacy}","received_events_url":"https://api.github.com/users/xuezhong/received_events","type":"User","site_admin":false},"html_url":"https://github.com/xuezhong/FluidDoc","description":null,"fork":true,"url":"https://api.github.com/repos/xuezhong/FluidDoc","forks_url":"https://api.github.com/repos/xuezhong/FluidDoc/forks","keys_url":"https://api.github.com/repos/xuezhong/FluidDoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xuezhong/FluidDoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xuezhong/FluidDoc/teams","hooks_url":"https://api.github.com/repos/xuezhong/FluidDoc/hooks","issue_events_url":"https://api.github.com/repos/xuezhong/FluidDoc/issues/events{/number}","events_url":"https://api.github.com/repos/xuezhong/FluidDoc/events","assignees_url":"https://api.github.com/repos/xuezhong/FluidDoc/assignees{/user}","branches_url":"https://api.github.com/repos/xuezhong/FluidDoc/branches{/branch}","tags_url":"https://api.github.com/repos/xuezhong/FluidDoc/tags","blobs_url":"https://api.github.com/repos/xuezhong/FluidDoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xuezhong/FluidDoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xuezhong/FluidDoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/xuezhong/FluidDoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xuezhong/FluidDoc/statuses/{sha}","languages_url":"https://api.github.com/repos/xuezhong/FluidDoc/languages","stargazers_url":"https://api.github.com/repos/xuezhong/FluidDoc/stargazers","contributors_url":"https://api.github.com/repos/xuezhong/FluidDoc/contributors","subscribers_url":"https://api.github.com/repos/xuezhong/FluidDoc/subscribers","subscription_url":"https://api.github.com/repos/xuezhong/FluidDoc/subscription","commits_url":"https://api.github.com/repos/xuezhong/FluidDoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/xuezhong/FluidDoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/xuezhong/FluidDoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/xuezhong/FluidDoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/xuezhong/FluidDoc/contents/{+path}","compare_url":"https://api.github.com/repos/xuezhong/FluidDoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xuezhong/FluidDoc/merges","archive_url":"https://api.github.com/repos/xuezhong/FluidDoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xuezhong/FluidDoc/downloads","issues_url":"https://api.github.com/repos/xuezhong/FluidDoc/issues{/number}","pulls_url":"https://api.github.com/repos/xuezhong/FluidDoc/pulls{/number}","milestones_url":"https://api.github.com/repos/xuezhong/FluidDoc/milestones{/number}","notifications_url":"https://api.github.com/repos/xuezhong/FluidDoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xuezhong/FluidDoc/labels{/name}","releases_url":"https://api.github.com/repos/xuezhong/FluidDoc/releases{/id}","deployments_url":"https://api.github.com/repos/xuezhong/FluidDoc/deployments","created_at":"2018-10-24T11:29:37Z","updated_at":"2018-10-26T04:20:32Z","pushed_at":"2018-10-29T07:57:24Z","git_url":"git://github.com/xuezhong/FluidDoc.git","ssh_url":"git@github.com:xuezhong/FluidDoc.git","clone_url":"https://github.com/xuezhong/FluidDoc.git","svn_url":"https://github.com/xuezhong/FluidDoc","homepage":null,"size":31527,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"PaddlePaddle:develop","ref":"develop","sha":"3aa36c44afe40f5fe66960068a757431b1d6b018","user":{"login":"PaddlePaddle","id":23534030,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTM0MDMw","avatar_url":"https://avatars3.githubusercontent.com/u/23534030?v=4","gravatar_id":"","url":"https://api.github.com/users/PaddlePaddle","html_url":"https://github.com/PaddlePaddle","followers_url":"https://api.github.com/users/PaddlePaddle/followers","following_url":"https://api.github.com/users/PaddlePaddle/following{/other_user}","gists_url":"https://api.github.com/users/PaddlePaddle/gists{/gist_id}","starred_url":"https://api.github.com/users/PaddlePaddle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaddlePaddle/subscriptions","organizations_url":"https://api.github.com/users/PaddlePaddle/orgs","repos_url":"https://api.github.com/users/PaddlePaddle/repos","events_url":"https://api.github.com/users/PaddlePaddle/events{/privacy}","received_events_url":"https://api.github.com/users/PaddlePaddle/received_events","type":"Organization","site_admin":false},"repo":{"id":136450404,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY0NTA0MDQ=","name":"FluidDoc","full_name":"PaddlePaddle/FluidDoc","private":false,"owner":{"login":"PaddlePaddle","id":23534030,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTM0MDMw","avatar_url":"https://avatars3.githubusercontent.com/u/23534030?v=4","gravatar_id":"","url":"https://api.github.com/users/PaddlePaddle","html_url":"https://github.com/PaddlePaddle","followers_url":"https://api.github.com/users/PaddlePaddle/followers","following_url":"https://api.github.com/users/PaddlePaddle/following{/other_user}","gists_url":"https://api.github.com/users/PaddlePaddle/gists{/gist_id}","starred_url":"https://api.github.com/users/PaddlePaddle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaddlePaddle/subscriptions","organizations_url":"https://api.github.com/users/PaddlePaddle/orgs","repos_url":"https://api.github.com/users/PaddlePaddle/repos","events_url":"https://api.github.com/users/PaddlePaddle/events{/privacy}","received_events_url":"https://api.github.com/users/PaddlePaddle/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/PaddlePaddle/FluidDoc","description":"Documentations for PaddlePaddle","fork":false,"url":"https://api.github.com/repos/PaddlePaddle/FluidDoc","forks_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/forks","keys_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/teams","hooks_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/hooks","issue_events_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/issues/events{/number}","events_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/events","assignees_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/assignees{/user}","branches_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/branches{/branch}","tags_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/tags","blobs_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/statuses/{sha}","languages_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/languages","stargazers_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/stargazers","contributors_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/contributors","subscribers_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/subscribers","subscription_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/subscription","commits_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/contents/{+path}","compare_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/merges","archive_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/downloads","issues_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/issues{/number}","pulls_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/pulls{/number}","milestones_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/milestones{/number}","notifications_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/labels{/name}","releases_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/releases{/id}","deployments_url":"https://api.github.com/repos/PaddlePaddle/FluidDoc/deployments","created_at":"2018-06-07T08:58:28Z","updated_at":"2018-10-29T07:57:41Z","pushed_at":"2018-10-29T07:57:38Z","git_url":"git://github.com/PaddlePaddle/FluidDoc.git","ssh_url":"git@github.com:PaddlePaddle/FluidDoc.git","clone_url":"https://github.com/PaddlePaddle/FluidDoc.git","svn_url":"https://github.com/PaddlePaddle/FluidDoc","homepage":"http://paddlepaddle.org/documentation/zh","size":31552,"stargazers_count":4,"watchers_count":4,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"archived":false,"open_issues_count":33,"license":null,"forks":31,"open_issues":33,"watchers":4,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/PaddlePaddle/FluidDoc/pulls/236"},"html":{"href":"https://github.com/PaddlePaddle/FluidDoc/pull/236"},"issue":{"href":"https://api.github.com/repos/PaddlePaddle/FluidDoc/issues/236"},"comments":{"href":"https://api.github.com/repos/PaddlePaddle/FluidDoc/issues/236/comments"},"review_comments":{"href":"https://api.github.com/repos/PaddlePaddle/FluidDoc/pulls/236/comments"},"review_comment":{"href":"https://api.github.com/repos/PaddlePaddle/FluidDoc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PaddlePaddle/FluidDoc/pulls/236/commits"},"statuses":{"href":"https://api.github.com/repos/PaddlePaddle/FluidDoc/statuses/55dab19fdab1cc99c5202fd675d8b4867e08d86e"}},"author_association":"NONE"}}
{"actor":{"display_login":"luotao1"}}