{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/222275804","pull_request_review_id":161120557,"id":222275804,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjI3NTgwNA==","diff_hunk":"@@ -573,3 +574,37 @@ def r2_score(y_true, y_pred, sample_weight=None,\n         avg_weights = multioutput\n \n     return np.average(output_scores, weights=avg_weights)\n+\n+\n+def max_error(y_true, y_pred):","path":"sklearn/metrics/regression.py","position":16,"original_position":16,"commit_id":"237759afaaa2bd4930175bf9245b6018651209c4","original_commit_id":"237759afaaa2bd4930175bf9245b6018651209c4","user":{"login":"qinhanmin2014","id":12003569,"node_id":"MDQ6VXNlcjEyMDAzNTY5","avatar_url":"https://avatars2.githubusercontent.com/u/12003569?v=4","gravatar_id":"","url":"https://api.github.com/users/qinhanmin2014","html_url":"https://github.com/qinhanmin2014","followers_url":"https://api.github.com/users/qinhanmin2014/followers","following_url":"https://api.github.com/users/qinhanmin2014/following{/other_user}","gists_url":"https://api.github.com/users/qinhanmin2014/gists{/gist_id}","starred_url":"https://api.github.com/users/qinhanmin2014/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qinhanmin2014/subscriptions","organizations_url":"https://api.github.com/users/qinhanmin2014/orgs","repos_url":"https://api.github.com/users/qinhanmin2014/repos","events_url":"https://api.github.com/users/qinhanmin2014/events{/privacy}","received_events_url":"https://api.github.com/users/qinhanmin2014/received_events","type":"User","site_admin":false},"body":"I guess we can support sample_weight here, right?","created_at":"2018-10-03T11:37:10Z","updated_at":"2018-10-03T11:43:45Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/12232#discussion_r222275804","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12232","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/222275804"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/12232#discussion_r222275804"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12232"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12232","id":219330769,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5MzMwNzY5","html_url":"https://github.com/scikit-learn/scikit-learn/pull/12232","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/12232.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/12232.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/12232","number":12232,"state":"open","locked":false,"title":"[MRG] Add max_error to the existing set of metrics for regression","user":{"login":"whiletruelearn","id":1977850,"node_id":"MDQ6VXNlcjE5Nzc4NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1977850?v=4","gravatar_id":"","url":"https://api.github.com/users/whiletruelearn","html_url":"https://github.com/whiletruelearn","followers_url":"https://api.github.com/users/whiletruelearn/followers","following_url":"https://api.github.com/users/whiletruelearn/following{/other_user}","gists_url":"https://api.github.com/users/whiletruelearn/gists{/gist_id}","starred_url":"https://api.github.com/users/whiletruelearn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whiletruelearn/subscriptions","organizations_url":"https://api.github.com/users/whiletruelearn/orgs","repos_url":"https://api.github.com/users/whiletruelearn/repos","events_url":"https://api.github.com/users/whiletruelearn/events{/privacy}","received_events_url":"https://api.github.com/users/whiletruelearn/received_events","type":"User","site_admin":false},"body":"<!--\r\nThanks for contributing a pull request! Please ensure you have taken a look at\r\nthe contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist\r\n-->\r\n\r\n#### Reference Issues/PRs\r\n<!--\r\nExample: Fixes #1234. See also #3456.\r\nPlease use keywords (e.g., Fixes) to create link to the issues or pull requests\r\nyou resolved, so that they will automatically be closed when your pull request\r\nis merged. See https://github.com/blog/1506-closing-issues-via-pull-requests\r\n-->\r\n\r\nFixes #12231\r\n\r\n#### What does this implement/fix? Explain your changes.\r\n\r\nAdded a new metric for regression which is `max_error`. It  is the worst case error between the predicted value and the true value.\r\n\r\n```\r\n >>> from sklearn.metrics import max_error\r\n >>> y_true = [3.1, 2.4, 7.6, 1.9]\r\n >>> y_pred = [4.1, 2.3, 7.4, 1.7]\r\n >>> max_error(y_true, y_pred)\r\n    1.0\r\n```\r\n\r\n#### Any other comments?\r\n\r\n\r\n<!--\r\nPlease be aware that we are a loose team of volunteers so patience is\r\nnecessary; assistance handling other issues is very welcome. We value\r\nall user contributions, no matter how minor they are. If we are slow to\r\nreview, either the pull request needs some benchmarking, tinkering,\r\nconvincing, etc. or more likely the reviewers are simply busy. In either\r\ncase, we ask for your understanding during the review process.\r\nFor more information, see our FAQ on this topic:\r\nhttp://scikit-learn.org/dev/faq.html#why-is-my-pull-request-not-getting-any-attention.\r\n\r\nThanks for contributing!\r\n-->\r\n","created_at":"2018-10-01T10:40:42Z","updated_at":"2018-10-03T11:43:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54968f25c2d1f7423e4fc4dc629152075e1b404d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12232/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12232/comments","review_comment_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/12232/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/237759afaaa2bd4930175bf9245b6018651209c4","head":{"label":"whiletruelearn:master","ref":"master","sha":"237759afaaa2bd4930175bf9245b6018651209c4","user":{"login":"whiletruelearn","id":1977850,"node_id":"MDQ6VXNlcjE5Nzc4NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1977850?v=4","gravatar_id":"","url":"https://api.github.com/users/whiletruelearn","html_url":"https://github.com/whiletruelearn","followers_url":"https://api.github.com/users/whiletruelearn/followers","following_url":"https://api.github.com/users/whiletruelearn/following{/other_user}","gists_url":"https://api.github.com/users/whiletruelearn/gists{/gist_id}","starred_url":"https://api.github.com/users/whiletruelearn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whiletruelearn/subscriptions","organizations_url":"https://api.github.com/users/whiletruelearn/orgs","repos_url":"https://api.github.com/users/whiletruelearn/repos","events_url":"https://api.github.com/users/whiletruelearn/events{/privacy}","received_events_url":"https://api.github.com/users/whiletruelearn/received_events","type":"User","site_admin":false},"repo":{"id":151062464,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEwNjI0NjQ=","name":"scikit-learn","full_name":"whiletruelearn/scikit-learn","private":false,"owner":{"login":"whiletruelearn","id":1977850,"node_id":"MDQ6VXNlcjE5Nzc4NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1977850?v=4","gravatar_id":"","url":"https://api.github.com/users/whiletruelearn","html_url":"https://github.com/whiletruelearn","followers_url":"https://api.github.com/users/whiletruelearn/followers","following_url":"https://api.github.com/users/whiletruelearn/following{/other_user}","gists_url":"https://api.github.com/users/whiletruelearn/gists{/gist_id}","starred_url":"https://api.github.com/users/whiletruelearn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whiletruelearn/subscriptions","organizations_url":"https://api.github.com/users/whiletruelearn/orgs","repos_url":"https://api.github.com/users/whiletruelearn/repos","events_url":"https://api.github.com/users/whiletruelearn/events{/privacy}","received_events_url":"https://api.github.com/users/whiletruelearn/received_events","type":"User","site_admin":false},"html_url":"https://github.com/whiletruelearn/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/whiletruelearn/scikit-learn","forks_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/forks","keys_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/teams","hooks_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/events","assignees_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/tags","blobs_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/subscription","commits_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/merges","archive_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/downloads","issues_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/whiletruelearn/scikit-learn/deployments","created_at":"2018-10-01T09:11:03Z","updated_at":"2018-10-03T09:41:38Z","pushed_at":"2018-10-03T09:41:29Z","git_url":"git://github.com/whiletruelearn/scikit-learn.git","ssh_url":"git@github.com:whiletruelearn/scikit-learn.git","clone_url":"https://github.com/whiletruelearn/scikit-learn.git","svn_url":"https://github.com/whiletruelearn/scikit-learn","homepage":"http://scikit-learn.org","size":94457,"stargazers_count":0,"watchers_count":0,"language":"Python","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":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scikit-learn:master","ref":"master","sha":"e1c3c228b28c0fd1b1c6763a3da579d21bee63d1","user":{"login":"scikit-learn","id":365630,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTYzMA==","avatar_url":"https://avatars2.githubusercontent.com/u/365630?v=4","gravatar_id":"","url":"https://api.github.com/users/scikit-learn","html_url":"https://github.com/scikit-learn","followers_url":"https://api.github.com/users/scikit-learn/followers","following_url":"https://api.github.com/users/scikit-learn/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn/orgs","repos_url":"https://api.github.com/users/scikit-learn/repos","events_url":"https://api.github.com/users/scikit-learn/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn/received_events","type":"Organization","site_admin":false},"repo":{"id":843222,"node_id":"MDEwOlJlcG9zaXRvcnk4NDMyMjI=","name":"scikit-learn","full_name":"scikit-learn/scikit-learn","private":false,"owner":{"login":"scikit-learn","id":365630,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTYzMA==","avatar_url":"https://avatars2.githubusercontent.com/u/365630?v=4","gravatar_id":"","url":"https://api.github.com/users/scikit-learn","html_url":"https://github.com/scikit-learn","followers_url":"https://api.github.com/users/scikit-learn/followers","following_url":"https://api.github.com/users/scikit-learn/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn/orgs","repos_url":"https://api.github.com/users/scikit-learn/repos","events_url":"https://api.github.com/users/scikit-learn/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/scikit-learn/scikit-learn","description":"scikit-learn: machine learning in Python","fork":false,"url":"https://api.github.com/repos/scikit-learn/scikit-learn","forks_url":"https://api.github.com/repos/scikit-learn/scikit-learn/forks","keys_url":"https://api.github.com/repos/scikit-learn/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scikit-learn/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scikit-learn/scikit-learn/teams","hooks_url":"https://api.github.com/repos/scikit-learn/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/events","assignees_url":"https://api.github.com/repos/scikit-learn/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/scikit-learn/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/scikit-learn/scikit-learn/tags","blobs_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/scikit-learn/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/scikit-learn/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/scikit-learn/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/scikit-learn/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/scikit-learn/scikit-learn/subscription","commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/scikit-learn/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/scikit-learn/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scikit-learn/scikit-learn/merges","archive_url":"https://api.github.com/repos/scikit-learn/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scikit-learn/scikit-learn/downloads","issues_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/scikit-learn/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/scikit-learn/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/deployments","created_at":"2010-08-17T09:43:38Z","updated_at":"2018-10-03T09:42:42Z","pushed_at":"2018-10-03T11:09:21Z","git_url":"git://github.com/scikit-learn/scikit-learn.git","ssh_url":"git@github.com:scikit-learn/scikit-learn.git","clone_url":"https://github.com/scikit-learn/scikit-learn.git","svn_url":"https://github.com/scikit-learn/scikit-learn","homepage":"http://scikit-learn.org","size":95130,"stargazers_count":30867,"watchers_count":30867,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15253,"mirror_url":null,"archived":false,"open_issues_count":1743,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":15253,"open_issues":1743,"watchers":30867,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12232"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/12232"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/12232"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/12232/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12232/comments"},"review_comment":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12232/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/237759afaaa2bd4930175bf9245b6018651209c4"}},"author_association":"NONE"}}
{"actor":{"display_login":"qinhanmin2014"}}