{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/91924997","pull_request_review_id":12433132,"id":91924997,"diff_hunk":"@@ -474,6 +476,18 @@ def _fit_and_predict(estimator, X, y, train, test, verbose, fit_params,\n         estimator.fit(X_train, y_train, **fit_params)\n     func = getattr(estimator, method)\n     predictions = func(X_test)\n+    if method in ['decision_function', 'predict_proba', 'predict_log_proba']:\n+        true_classes = np.unique(y)\n+        train_classes = np.unique(y_train)","path":"sklearn/model_selection/_validation.py","position":null,"original_position":17,"commit_id":"db0c86163eb5b61be64b140ba478ed460192f987","original_commit_id":"69f9207bf68341e5db081109eca3018025996808","user":{"login":"dalmia","id":13185699,"avatar_url":"https://avatars.githubusercontent.com/u/13185699?v=3","gravatar_id":"","url":"https://api.github.com/users/dalmia","html_url":"https://github.com/dalmia","followers_url":"https://api.github.com/users/dalmia/followers","following_url":"https://api.github.com/users/dalmia/following{/other_user}","gists_url":"https://api.github.com/users/dalmia/gists{/gist_id}","starred_url":"https://api.github.com/users/dalmia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalmia/subscriptions","organizations_url":"https://api.github.com/users/dalmia/orgs","repos_url":"https://api.github.com/users/dalmia/repos","events_url":"https://api.github.com/users/dalmia/events{/privacy}","received_events_url":"https://api.github.com/users/dalmia/received_events","type":"User","site_admin":false},"body":"Sorry, I just looked at the [documentation](http://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html) and made the note. I'll add the change.","created_at":"2016-12-12T10:59:03Z","updated_at":"2016-12-12T10:59:03Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/7889#discussion_r91924997","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7889","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/91924997"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7889#discussion_r91924997"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7889"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7889","id":93962444,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/7889","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/7889.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/7889.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7889","number":7889,"state":"open","locked":false,"title":"[MRG] Fix the cross_val_predict function for method='predict_proba'","user":{"login":"dalmia","id":13185699,"avatar_url":"https://avatars.githubusercontent.com/u/13185699?v=3","gravatar_id":"","url":"https://api.github.com/users/dalmia","html_url":"https://github.com/dalmia","followers_url":"https://api.github.com/users/dalmia/followers","following_url":"https://api.github.com/users/dalmia/following{/other_user}","gists_url":"https://api.github.com/users/dalmia/gists{/gist_id}","starred_url":"https://api.github.com/users/dalmia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalmia/subscriptions","organizations_url":"https://api.github.com/users/dalmia/orgs","repos_url":"https://api.github.com/users/dalmia/repos","events_url":"https://api.github.com/users/dalmia/events{/privacy}","received_events_url":"https://api.github.com/users/dalmia/received_events","type":"User","site_admin":false},"body":"#### Reference Issue\r\nFixes #7863 \r\n\r\n#### What does this implement/fix? Explain your changes.\r\ncross_val_predict() did not specify the order of the classes when method='predict_proba' was passed as the argument. So firstly, the change mentions in the documentation that the columns returned would be sorted. Secondly, for the estimators having a `classes_` attribute, it ensures that the predictions are returned in a sorted manner.\r\n\r\n#### Any other comments?\r\nCurrently, I haven't yet tested the code. Would be completing that within a day or so.\r\n\r\n","created_at":"2016-11-16T13:08:55Z","updated_at":"2016-12-12T10:59:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66c02d86b8c60d1416d6e21d0d3f481e6380eb64","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7889/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7889/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/7889/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/db0c86163eb5b61be64b140ba478ed460192f987","head":{"label":"dalmia:7863","ref":"7863","sha":"db0c86163eb5b61be64b140ba478ed460192f987","user":{"login":"dalmia","id":13185699,"avatar_url":"https://avatars.githubusercontent.com/u/13185699?v=3","gravatar_id":"","url":"https://api.github.com/users/dalmia","html_url":"https://github.com/dalmia","followers_url":"https://api.github.com/users/dalmia/followers","following_url":"https://api.github.com/users/dalmia/following{/other_user}","gists_url":"https://api.github.com/users/dalmia/gists{/gist_id}","starred_url":"https://api.github.com/users/dalmia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalmia/subscriptions","organizations_url":"https://api.github.com/users/dalmia/orgs","repos_url":"https://api.github.com/users/dalmia/repos","events_url":"https://api.github.com/users/dalmia/events{/privacy}","received_events_url":"https://api.github.com/users/dalmia/received_events","type":"User","site_admin":false},"repo":{"id":69615534,"name":"scikit-learn","full_name":"dalmia/scikit-learn","owner":{"login":"dalmia","id":13185699,"avatar_url":"https://avatars.githubusercontent.com/u/13185699?v=3","gravatar_id":"","url":"https://api.github.com/users/dalmia","html_url":"https://github.com/dalmia","followers_url":"https://api.github.com/users/dalmia/followers","following_url":"https://api.github.com/users/dalmia/following{/other_user}","gists_url":"https://api.github.com/users/dalmia/gists{/gist_id}","starred_url":"https://api.github.com/users/dalmia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalmia/subscriptions","organizations_url":"https://api.github.com/users/dalmia/orgs","repos_url":"https://api.github.com/users/dalmia/repos","events_url":"https://api.github.com/users/dalmia/events{/privacy}","received_events_url":"https://api.github.com/users/dalmia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dalmia/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/dalmia/scikit-learn","forks_url":"https://api.github.com/repos/dalmia/scikit-learn/forks","keys_url":"https://api.github.com/repos/dalmia/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dalmia/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dalmia/scikit-learn/teams","hooks_url":"https://api.github.com/repos/dalmia/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/dalmia/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/dalmia/scikit-learn/events","assignees_url":"https://api.github.com/repos/dalmia/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/dalmia/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/dalmia/scikit-learn/tags","blobs_url":"https://api.github.com/repos/dalmia/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dalmia/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dalmia/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dalmia/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dalmia/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/dalmia/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/dalmia/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/dalmia/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/dalmia/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/dalmia/scikit-learn/subscription","commits_url":"https://api.github.com/repos/dalmia/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dalmia/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dalmia/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dalmia/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dalmia/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/dalmia/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dalmia/scikit-learn/merges","archive_url":"https://api.github.com/repos/dalmia/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dalmia/scikit-learn/downloads","issues_url":"https://api.github.com/repos/dalmia/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/dalmia/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/dalmia/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/dalmia/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dalmia/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/dalmia/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/dalmia/scikit-learn/deployments","created_at":"2016-09-29T23:18:34Z","updated_at":"2016-09-29T23:18:42Z","pushed_at":"2016-12-12T08:01:25Z","git_url":"git://github.com/dalmia/scikit-learn.git","ssh_url":"git@github.com:dalmia/scikit-learn.git","clone_url":"https://github.com/dalmia/scikit-learn.git","svn_url":"https://github.com/dalmia/scikit-learn","homepage":"http://scikit-learn.org","size":77660,"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":"9dfe0189fae6edfe7be8e64296d4454547a7c1c4","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-12-12T08:39:50Z","pushed_at":"2016-12-12T10:57:43Z","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":130192,"stargazers_count":15264,"watchers_count":15264,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8580,"mirror_url":null,"open_issues_count":1162,"forks":8580,"open_issues":1162,"watchers":15264,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7889"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7889"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7889"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7889/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7889/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/7889/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/db0c86163eb5b61be64b140ba478ed460192f987"}}}}
{"actor":{"display_login":"dalmia"}}