{"action":"created","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4621","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4621/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4621/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4621/events","html_url":"https://github.com/scikit-learn/scikit-learn/pull/4621","id":69430280,"number":4621,"title":"[MRG + 1 ] consistent setting of train_size and test_size in ShuffleSplit [Fix Bug #4618 ]","user":{"login":"SnakeHunt2012","id":2970920,"avatar_url":"https://avatars.githubusercontent.com/u/2970920?v=3","gravatar_id":"","url":"https://api.github.com/users/SnakeHunt2012","html_url":"https://github.com/SnakeHunt2012","followers_url":"https://api.github.com/users/SnakeHunt2012/followers","following_url":"https://api.github.com/users/SnakeHunt2012/following{/other_user}","gists_url":"https://api.github.com/users/SnakeHunt2012/gists{/gist_id}","starred_url":"https://api.github.com/users/SnakeHunt2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnakeHunt2012/subscriptions","organizations_url":"https://api.github.com/users/SnakeHunt2012/orgs","repos_url":"https://api.github.com/users/SnakeHunt2012/repos","events_url":"https://api.github.com/users/SnakeHunt2012/events{/privacy}","received_events_url":"https://api.github.com/users/SnakeHunt2012/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2015-04-19T14:28:58Z","updated_at":"2015-06-25T22:49:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4621","html_url":"https://github.com/scikit-learn/scikit-learn/pull/4621","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/4621.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/4621.patch"},"body":"cross_validation.ShuffleSplit setting train_size without setting test_size, the sum of train_size and test_size is not equal to 1. Now the sum of them is 0.1(default value of test_size) + train_size.\r\n\r\nWhen setting test_size without setting train_size, the train_size is autocomputed by 1 - test_size, so we hope when setting train_size, the test_size is autocomputed by 1 - train_size as well, not defualt value 0.1.\r\n\r\nhttps://github.com/scikit-learn/scikit-learn/issues/4618"},"comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments/115422884","html_url":"https://github.com/scikit-learn/scikit-learn/pull/4621#issuecomment-115422884","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4621","id":115422884,"user":{"login":"jnothman","id":78827,"avatar_url":"https://avatars.githubusercontent.com/u/78827?v=3","gravatar_id":"","url":"https://api.github.com/users/jnothman","html_url":"https://github.com/jnothman","followers_url":"https://api.github.com/users/jnothman/followers","following_url":"https://api.github.com/users/jnothman/following{/other_user}","gists_url":"https://api.github.com/users/jnothman/gists{/gist_id}","starred_url":"https://api.github.com/users/jnothman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnothman/subscriptions","organizations_url":"https://api.github.com/users/jnothman/orgs","repos_url":"https://api.github.com/users/jnothman/repos","events_url":"https://api.github.com/users/jnothman/events{/privacy}","received_events_url":"https://api.github.com/users/jnothman/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T22:49:39Z","updated_at":"2015-06-25T22:49:39Z","body":"And, yes, the asymmetry is a bit *surprising*. But as long as the documentation is clear that `test_size` should be altered rather than `train_size` in a complete partition case (that does not intend a fixed integer training size and dataset-dependent test size), I really see no problem with the current behaviour. They are, after all, mere complements, and any user of scikit-learn is sufficiently numerate to set the `train_size` in such a case by setting `test_size`, and doesn't need the crutch of it working the other way."}}