{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/74108777","id":74108777,"diff_hunk":"@@ -1576,6 +1577,11 @@ def log_loss(y_true, y_pred, eps=1e-15, normalize=True, sample_weight=None):\n     sample_weight : array-like of shape = [n_samples], optional\n         Sample weights.\n \n+    .. versionadded:: 0.18","path":"sklearn/metrics/classification.py","position":14,"original_position":14,"commit_id":"bf5ce41354b2060f81009c341dbda3b581b8bdf5","original_commit_id":"bf5ce41354b2060f81009c341dbda3b581b8bdf5","user":{"login":"nelson-liu","id":7272031,"avatar_url":"https://avatars.githubusercontent.com/u/7272031?v=3","gravatar_id":"","url":"https://api.github.com/users/nelson-liu","html_url":"https://github.com/nelson-liu","followers_url":"https://api.github.com/users/nelson-liu/followers","following_url":"https://api.github.com/users/nelson-liu/following{/other_user}","gists_url":"https://api.github.com/users/nelson-liu/gists{/gist_id}","starred_url":"https://api.github.com/users/nelson-liu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nelson-liu/subscriptions","organizations_url":"https://api.github.com/users/nelson-liu/orgs","repos_url":"https://api.github.com/users/nelson-liu/repos","events_url":"https://api.github.com/users/nelson-liu/events{/privacy}","received_events_url":"https://api.github.com/users/nelson-liu/received_events","type":"User","site_admin":false},"body":"`versionadded` goes below the new thing, indented on the same level as `If not provided`.","created_at":"2016-08-09T17:48:56Z","updated_at":"2016-08-09T17:48:56Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/7166#discussion_r74108777","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7166","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/74108777"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7166#discussion_r74108777"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7166"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7166","id":80601373,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/7166","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/7166.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/7166.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7166","number":7166,"state":"open","locked":false,"title":"[MRG+1] Log loss bug fixed","user":{"login":"indianajensen","id":13773306,"avatar_url":"https://avatars.githubusercontent.com/u/13773306?v=3","gravatar_id":"","url":"https://api.github.com/users/indianajensen","html_url":"https://github.com/indianajensen","followers_url":"https://api.github.com/users/indianajensen/followers","following_url":"https://api.github.com/users/indianajensen/following{/other_user}","gists_url":"https://api.github.com/users/indianajensen/gists{/gist_id}","starred_url":"https://api.github.com/users/indianajensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indianajensen/subscriptions","organizations_url":"https://api.github.com/users/indianajensen/orgs","repos_url":"https://api.github.com/users/indianajensen/repos","events_url":"https://api.github.com/users/indianajensen/events{/privacy}","received_events_url":"https://api.github.com/users/indianajensen/received_events","type":"User","site_admin":false},"body":"all credit for this goes to @hongguangguo\r\nReference Issue\r\nmetrics.log_loss fails when any classes are missing in y_true #4033\r\nFix a bug, the result is wrong when use sklearn.metrics.log_loss with one class, #4546\r\nLog_loss is calculated incorrectly when only 1 class present #6703\r\n\r\nWhat does this implement/fix? Explain your changes.\r\nadded labels option. when length of unique y_true < number of columns for y_score/y_pred, should use labels so as to len(unique(labels)) eques y_pred.shap[1].","created_at":"2016-08-09T11:06:49Z","updated_at":"2016-08-09T17:48:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa6eb21da9fb7a2fb6f145b8381a2029654a7837","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7166/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7166/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/7166/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/bf5ce41354b2060f81009c341dbda3b581b8bdf5","head":{"label":"indianajensen:log_loss_bug_fixed3","ref":"log_loss_bug_fixed3","sha":"bf5ce41354b2060f81009c341dbda3b581b8bdf5","user":{"login":"indianajensen","id":13773306,"avatar_url":"https://avatars.githubusercontent.com/u/13773306?v=3","gravatar_id":"","url":"https://api.github.com/users/indianajensen","html_url":"https://github.com/indianajensen","followers_url":"https://api.github.com/users/indianajensen/followers","following_url":"https://api.github.com/users/indianajensen/following{/other_user}","gists_url":"https://api.github.com/users/indianajensen/gists{/gist_id}","starred_url":"https://api.github.com/users/indianajensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indianajensen/subscriptions","organizations_url":"https://api.github.com/users/indianajensen/orgs","repos_url":"https://api.github.com/users/indianajensen/repos","events_url":"https://api.github.com/users/indianajensen/events{/privacy}","received_events_url":"https://api.github.com/users/indianajensen/received_events","type":"User","site_admin":false},"repo":{"id":65144909,"name":"scikit-learn","full_name":"indianajensen/scikit-learn","owner":{"login":"indianajensen","id":13773306,"avatar_url":"https://avatars.githubusercontent.com/u/13773306?v=3","gravatar_id":"","url":"https://api.github.com/users/indianajensen","html_url":"https://github.com/indianajensen","followers_url":"https://api.github.com/users/indianajensen/followers","following_url":"https://api.github.com/users/indianajensen/following{/other_user}","gists_url":"https://api.github.com/users/indianajensen/gists{/gist_id}","starred_url":"https://api.github.com/users/indianajensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indianajensen/subscriptions","organizations_url":"https://api.github.com/users/indianajensen/orgs","repos_url":"https://api.github.com/users/indianajensen/repos","events_url":"https://api.github.com/users/indianajensen/events{/privacy}","received_events_url":"https://api.github.com/users/indianajensen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/indianajensen/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/indianajensen/scikit-learn","forks_url":"https://api.github.com/repos/indianajensen/scikit-learn/forks","keys_url":"https://api.github.com/repos/indianajensen/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/indianajensen/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/indianajensen/scikit-learn/teams","hooks_url":"https://api.github.com/repos/indianajensen/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/indianajensen/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/indianajensen/scikit-learn/events","assignees_url":"https://api.github.com/repos/indianajensen/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/indianajensen/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/indianajensen/scikit-learn/tags","blobs_url":"https://api.github.com/repos/indianajensen/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/indianajensen/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/indianajensen/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/indianajensen/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/indianajensen/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/indianajensen/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/indianajensen/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/indianajensen/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/indianajensen/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/indianajensen/scikit-learn/subscription","commits_url":"https://api.github.com/repos/indianajensen/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/indianajensen/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/indianajensen/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/indianajensen/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/indianajensen/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/indianajensen/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/indianajensen/scikit-learn/merges","archive_url":"https://api.github.com/repos/indianajensen/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/indianajensen/scikit-learn/downloads","issues_url":"https://api.github.com/repos/indianajensen/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/indianajensen/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/indianajensen/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/indianajensen/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/indianajensen/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/indianajensen/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/indianajensen/scikit-learn/deployments","created_at":"2016-08-07T17:11:45Z","updated_at":"2016-08-07T17:11:53Z","pushed_at":"2016-08-09T17:42:48Z","git_url":"git://github.com/indianajensen/scikit-learn.git","ssh_url":"git@github.com:indianajensen/scikit-learn.git","clone_url":"https://github.com/indianajensen/scikit-learn.git","svn_url":"https://github.com/indianajensen/scikit-learn","homepage":"http://scikit-learn.org","size":72647,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scikit-learn:master","ref":"master","sha":"a453cd0530da5107e65d1d66eab984befcc6f829","user":{"login":"scikit-learn","id":365630,"avatar_url":"https://avatars.githubusercontent.com/u/365630?v=3","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,"name":"scikit-learn","full_name":"scikit-learn/scikit-learn","owner":{"login":"scikit-learn","id":365630,"avatar_url":"https://avatars.githubusercontent.com/u/365630?v=3","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},"private":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":"2016-08-09T16:59:57Z","pushed_at":"2016-08-09T17:42:50Z","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":120989,"stargazers_count":12746,"watchers_count":12746,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7382,"mirror_url":null,"open_issues_count":1259,"forks":7382,"open_issues":1259,"watchers":12746,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7166"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7166"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7166"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7166/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7166/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/7166/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/bf5ce41354b2060f81009c341dbda3b581b8bdf5"}}}}
{"actor":{"display_login":"nelson-liu"}}