{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/36051279","id":36051279,"diff_hunk":"@@ -443,11 +444,12 @@ def test_ovr_multinomial_iris():\n     n_samples, n_features = train.shape\n \n     # Use pre-defined fold as folds generated for different y\n-    cv = StratifiedKFold(target, 3)\n-    clf = LogisticRegressionCV(cv=cv)\n+    cv = StratifiedKFold(3)\n+    predefined_folds = list(cv.split(train, target))","path":"sklearn/linear_model/tests/test_logistic.py","position":16,"original_position":21,"commit_id":"ab520f8833edafb43c9d84f149236b7ba2077d4d","original_commit_id":"3c44de6b8660a70c982c63bf083cfaf4f495b069","user":{"login":"rvraghav93","id":9487348,"avatar_url":"https://avatars.githubusercontent.com/u/9487348?v=3","gravatar_id":"","url":"https://api.github.com/users/rvraghav93","html_url":"https://github.com/rvraghav93","followers_url":"https://api.github.com/users/rvraghav93/followers","following_url":"https://api.github.com/users/rvraghav93/following{/other_user}","gists_url":"https://api.github.com/users/rvraghav93/gists{/gist_id}","starred_url":"https://api.github.com/users/rvraghav93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvraghav93/subscriptions","organizations_url":"https://api.github.com/users/rvraghav93/orgs","repos_url":"https://api.github.com/users/rvraghav93/repos","events_url":"https://api.github.com/users/rvraghav93/events{/privacy}","received_events_url":"https://api.github.com/users/rvraghav93/received_events","type":"User","site_admin":false},"body":"I changed it so to make it aligned with the comment... (which says predefined folds are used here...) \r\n\r\nDo I simply change the `cv=Stratified..` line alone here?","created_at":"2015-08-03T01:29:55Z","updated_at":"2015-08-03T01:29:55Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/4294#discussion_r36051279","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4294","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/36051279"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4294#discussion_r36051279"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4294"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4294","id":29984425,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/4294","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/4294.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/4294.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4294","number":4294,"state":"open","locked":false,"title":"[WIP] Reorganize grid_search, cross_validation and learning_curve into model_selection","user":{"login":"rvraghav93","id":9487348,"avatar_url":"https://avatars.githubusercontent.com/u/9487348?v=3","gravatar_id":"","url":"https://api.github.com/users/rvraghav93","html_url":"https://github.com/rvraghav93","followers_url":"https://api.github.com/users/rvraghav93/followers","following_url":"https://api.github.com/users/rvraghav93/following{/other_user}","gists_url":"https://api.github.com/users/rvraghav93/gists{/gist_id}","starred_url":"https://api.github.com/users/rvraghav93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvraghav93/subscriptions","organizations_url":"https://api.github.com/users/rvraghav93/orgs","repos_url":"https://api.github.com/users/rvraghav93/repos","events_url":"https://api.github.com/users/rvraghav93/events{/privacy}","received_events_url":"https://api.github.com/users/rvraghav93/received_events","type":"User","site_admin":false},"body":"fixes #1848, #2904 \r\n<hr>\r\n**TODO**\r\n- [x] Reorganize the classes / functions into the `model_selection` module.\r\n- [x] Remove all deprecation from new style classes.\r\n- [x] Use split in all the files that use cv ? (or fix `check_cv` so both old style and new style classes can be used)\r\n- [x] Refactor the tests.\r\n- [x] Fix all the imports\r\n- [x] Make all the general tests pass\r\n- [x] Make all the `model_selction` tests pass\r\n- [x] Clean up the old style classes to use as much from the new members as possible. (duplicate as little code as possible) - https://github.com/rvraghav93/scikit-learn/pull/2\r\n- [x]  Fix the examples - https://github.com/rvraghav93/scikit-learn/pull/3\r\n- [ ] Clean up the documentation - https://github.com/rvraghav93/scikit-learn/pull/4\r\n\r\n<hr>\r\n**MINOR**\r\n- [ ] Rename `p` to a better name.\r\n- [x] Rename `_check_is_partition`-->`_check_is_permutation`?\r\n- [x] Remove `_empty_mask`\r\n- [x] As Joel said [here](https://github.com/scikit-learn/scikit-learn/pull/4621/files#r33238307), use binomial coefficient instead of factorial.\r\n\r\n<hr>\r\n**NOTE:**\r\nThe current implementation will still not support nesting `EstimatorCV` inside `GridSearchCV`... This will become possible only after allowing `sample_properties` to pass from `GridSearchCV` to `EstimatorCV`...\r\n<hr>\r\n**PRs whose changes to g_s / c_v / l_c have been manually incorporated into this:**\r\n\r\n#4714 - Svm decision function shape - 1 commit\r\n#4829 - merge _check_cv into check_cv ... -  1 commit\r\n#4857 - Document missing attribute `random_state` in `RandomizedSearchCV` - 1 commit\r\n#4840 - FIX avoid memory cost when sampling from large parameter grids - 1 commit\r\n<hr>\r\nThis PR is slightly based upon @pignacio's work in #3340.\r\n<hr>\r\n\r\n**Other model selection issues to be tackled after this PR is merged**\r\n\r\n(I am just listing all the issues/improvements that are out of scope for this PR but related to the `model_selection`)\r\n\r\n* General tests for CV objects\r\n* Whether `_permutation_test_score` can be replaced by `cross_val_score`?","created_at":"2015-02-25T12:54:52Z","updated_at":"2015-08-03T01:29:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"523a485b66ec86472e3d31fae4b1dc652dca2ae4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4294/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4294/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/4294/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/ab520f8833edafb43c9d84f149236b7ba2077d4d","head":{"label":"rvraghav93:model_selection","ref":"model_selection","sha":"ab520f8833edafb43c9d84f149236b7ba2077d4d","user":{"login":"rvraghav93","id":9487348,"avatar_url":"https://avatars.githubusercontent.com/u/9487348?v=3","gravatar_id":"","url":"https://api.github.com/users/rvraghav93","html_url":"https://github.com/rvraghav93","followers_url":"https://api.github.com/users/rvraghav93/followers","following_url":"https://api.github.com/users/rvraghav93/following{/other_user}","gists_url":"https://api.github.com/users/rvraghav93/gists{/gist_id}","starred_url":"https://api.github.com/users/rvraghav93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvraghav93/subscriptions","organizations_url":"https://api.github.com/users/rvraghav93/orgs","repos_url":"https://api.github.com/users/rvraghav93/repos","events_url":"https://api.github.com/users/rvraghav93/events{/privacy}","received_events_url":"https://api.github.com/users/rvraghav93/received_events","type":"User","site_admin":false},"repo":{"id":26038110,"name":"scikit-learn","full_name":"rvraghav93/scikit-learn","owner":{"login":"rvraghav93","id":9487348,"avatar_url":"https://avatars.githubusercontent.com/u/9487348?v=3","gravatar_id":"","url":"https://api.github.com/users/rvraghav93","html_url":"https://github.com/rvraghav93","followers_url":"https://api.github.com/users/rvraghav93/followers","following_url":"https://api.github.com/users/rvraghav93/following{/other_user}","gists_url":"https://api.github.com/users/rvraghav93/gists{/gist_id}","starred_url":"https://api.github.com/users/rvraghav93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvraghav93/subscriptions","organizations_url":"https://api.github.com/users/rvraghav93/orgs","repos_url":"https://api.github.com/users/rvraghav93/repos","events_url":"https://api.github.com/users/rvraghav93/events{/privacy}","received_events_url":"https://api.github.com/users/rvraghav93/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rvraghav93/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/rvraghav93/scikit-learn","forks_url":"https://api.github.com/repos/rvraghav93/scikit-learn/forks","keys_url":"https://api.github.com/repos/rvraghav93/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rvraghav93/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rvraghav93/scikit-learn/teams","hooks_url":"https://api.github.com/repos/rvraghav93/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/rvraghav93/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/rvraghav93/scikit-learn/events","assignees_url":"https://api.github.com/repos/rvraghav93/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/rvraghav93/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/rvraghav93/scikit-learn/tags","blobs_url":"https://api.github.com/repos/rvraghav93/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rvraghav93/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rvraghav93/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/rvraghav93/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rvraghav93/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/rvraghav93/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/rvraghav93/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/rvraghav93/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/rvraghav93/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/rvraghav93/scikit-learn/subscription","commits_url":"https://api.github.com/repos/rvraghav93/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/rvraghav93/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/rvraghav93/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/rvraghav93/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/rvraghav93/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/rvraghav93/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rvraghav93/scikit-learn/merges","archive_url":"https://api.github.com/repos/rvraghav93/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rvraghav93/scikit-learn/downloads","issues_url":"https://api.github.com/repos/rvraghav93/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/rvraghav93/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/rvraghav93/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/rvraghav93/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rvraghav93/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/rvraghav93/scikit-learn/releases{/id}","created_at":"2014-11-01T00:56:31Z","updated_at":"2015-05-03T17:08:25Z","pushed_at":"2015-08-03T01:24:26Z","git_url":"git://github.com/rvraghav93/scikit-learn.git","ssh_url":"git@github.com:rvraghav93/scikit-learn.git","clone_url":"https://github.com/rvraghav93/scikit-learn.git","svn_url":"https://github.com/rvraghav93/scikit-learn","homepage":"http://scikit-learn.org","size":65174,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"scikit-learn:master","ref":"master","sha":"16337b2a2335badc0a541856fbadf77aed7e73da","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}","created_at":"2010-08-17T09:43:38Z","updated_at":"2015-08-02T19:59:25Z","pushed_at":"2015-08-03T01:24:28Z","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":130342,"stargazers_count":7012,"watchers_count":7012,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4158,"mirror_url":null,"open_issues_count":752,"forks":4158,"open_issues":752,"watchers":7012,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4294"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4294"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4294"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4294/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4294/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/4294/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/ab520f8833edafb43c9d84f149236b7ba2077d4d"}}}}