{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/48679205","id":48679205,"diff_hunk":"@@ -409,6 +476,46 @@ def fit(self, X, y):\n \n         return self\n \n+    def partial_fit(self, X, y, classes=None):\n+        \"\"\"Partially fit underlying estimators \n+        \n+        Should be used when memory is inefficient to train all data. Chunks \n+        of data can be passed in several iteration, where the first call \n+        should have an array of all target variables.\n+\n+\n+        Parameters\n+        ----------\n+        X : (sparse) array-like, shape = [n_samples, n_features]\n+            Data.\n+\n+        y : array-like, shape = [n_samples]\n+            Multi-class targets.\n+\n+        Returns\n+        -------\n+        self\n+        \"\"\"\n+        if self._first_partial_run:\n+            if classes is None:\n+                raise ValueError(\"Must contain all classes of target\")","path":"sklearn/multiclass.py","position":155,"original_position":155,"commit_id":"fb3574d71962e840201c8ea7c5b73368319cab3b","original_commit_id":"fb3574d71962e840201c8ea7c5b73368319cab3b","user":{"login":"GaelVaroquaux","id":208217,"avatar_url":"https://avatars.githubusercontent.com/u/208217?v=3","gravatar_id":"","url":"https://api.github.com/users/GaelVaroquaux","html_url":"https://github.com/GaelVaroquaux","followers_url":"https://api.github.com/users/GaelVaroquaux/followers","following_url":"https://api.github.com/users/GaelVaroquaux/following{/other_user}","gists_url":"https://api.github.com/users/GaelVaroquaux/gists{/gist_id}","starred_url":"https://api.github.com/users/GaelVaroquaux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GaelVaroquaux/subscriptions","organizations_url":"https://api.github.com/users/GaelVaroquaux/orgs","repos_url":"https://api.github.com/users/GaelVaroquaux/repos","events_url":"https://api.github.com/users/GaelVaroquaux/events{/privacy}","received_events_url":"https://api.github.com/users/GaelVaroquaux/received_events","type":"User","site_admin":false},"body":"Same remark about dostring of the function and error message. This error message is a bit hard to understand outside of the context.","created_at":"2016-01-01T18:01:48Z","updated_at":"2016-01-01T18:01:48Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/6087#discussion_r48679205","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6087","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/48679205"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/6087#discussion_r48679205"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6087"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6087","id":54589302,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/6087","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/6087.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/6087.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6087","number":6087,"state":"open","locked":false,"title":"Added partial fit method for OvR and OvO.","user":{"login":"kaichogami","id":6412770,"avatar_url":"https://avatars.githubusercontent.com/u/6412770?v=3","gravatar_id":"","url":"https://api.github.com/users/kaichogami","html_url":"https://github.com/kaichogami","followers_url":"https://api.github.com/users/kaichogami/followers","following_url":"https://api.github.com/users/kaichogami/following{/other_user}","gists_url":"https://api.github.com/users/kaichogami/gists{/gist_id}","starred_url":"https://api.github.com/users/kaichogami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaichogami/subscriptions","organizations_url":"https://api.github.com/users/kaichogami/orgs","repos_url":"https://api.github.com/users/kaichogami/repos","events_url":"https://api.github.com/users/kaichogami/events{/privacy}","received_events_url":"https://api.github.com/users/kaichogami/received_events","type":"User","site_admin":false},"body":"* Works only on condition if all target classes dataset chunks are passed in each iteration. In case any class in some iteration is missing, we would get incorrect results. \r\n* This can be overcome if we store each `estimator` in dictionary and train the relevant `estimator` in each iteration. \r\n\r\nI am new to scikit and machine learning in general, so please go easy on me and let me know what could be done! \r\nThank you! ","created_at":"2015-12-25T15:20:31Z","updated_at":"2016-01-01T18:01:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92c23868e67c67d171bbd16350a69404564cade6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6087/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6087/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/6087/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/fb3574d71962e840201c8ea7c5b73368319cab3b","head":{"label":"kaichogami:binary_partial_fit","ref":"binary_partial_fit","sha":"fb3574d71962e840201c8ea7c5b73368319cab3b","user":{"login":"kaichogami","id":6412770,"avatar_url":"https://avatars.githubusercontent.com/u/6412770?v=3","gravatar_id":"","url":"https://api.github.com/users/kaichogami","html_url":"https://github.com/kaichogami","followers_url":"https://api.github.com/users/kaichogami/followers","following_url":"https://api.github.com/users/kaichogami/following{/other_user}","gists_url":"https://api.github.com/users/kaichogami/gists{/gist_id}","starred_url":"https://api.github.com/users/kaichogami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaichogami/subscriptions","organizations_url":"https://api.github.com/users/kaichogami/orgs","repos_url":"https://api.github.com/users/kaichogami/repos","events_url":"https://api.github.com/users/kaichogami/events{/privacy}","received_events_url":"https://api.github.com/users/kaichogami/received_events","type":"User","site_admin":false},"repo":{"id":16459729,"name":"scikit-learn","full_name":"kaichogami/scikit-learn","owner":{"login":"kaichogami","id":6412770,"avatar_url":"https://avatars.githubusercontent.com/u/6412770?v=3","gravatar_id":"","url":"https://api.github.com/users/kaichogami","html_url":"https://github.com/kaichogami","followers_url":"https://api.github.com/users/kaichogami/followers","following_url":"https://api.github.com/users/kaichogami/following{/other_user}","gists_url":"https://api.github.com/users/kaichogami/gists{/gist_id}","starred_url":"https://api.github.com/users/kaichogami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaichogami/subscriptions","organizations_url":"https://api.github.com/users/kaichogami/orgs","repos_url":"https://api.github.com/users/kaichogami/repos","events_url":"https://api.github.com/users/kaichogami/events{/privacy}","received_events_url":"https://api.github.com/users/kaichogami/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kaichogami/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/kaichogami/scikit-learn","forks_url":"https://api.github.com/repos/kaichogami/scikit-learn/forks","keys_url":"https://api.github.com/repos/kaichogami/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaichogami/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaichogami/scikit-learn/teams","hooks_url":"https://api.github.com/repos/kaichogami/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/kaichogami/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/kaichogami/scikit-learn/events","assignees_url":"https://api.github.com/repos/kaichogami/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/kaichogami/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/kaichogami/scikit-learn/tags","blobs_url":"https://api.github.com/repos/kaichogami/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaichogami/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaichogami/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaichogami/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaichogami/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/kaichogami/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/kaichogami/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/kaichogami/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/kaichogami/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/kaichogami/scikit-learn/subscription","commits_url":"https://api.github.com/repos/kaichogami/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaichogami/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaichogami/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaichogami/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaichogami/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/kaichogami/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaichogami/scikit-learn/merges","archive_url":"https://api.github.com/repos/kaichogami/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaichogami/scikit-learn/downloads","issues_url":"https://api.github.com/repos/kaichogami/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/kaichogami/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/kaichogami/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/kaichogami/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaichogami/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/kaichogami/scikit-learn/releases{/id}","created_at":"2014-02-02T18:05:57Z","updated_at":"2015-12-16T06:28:32Z","pushed_at":"2016-01-01T07:50:45Z","git_url":"git://github.com/kaichogami/scikit-learn.git","ssh_url":"git@github.com:kaichogami/scikit-learn.git","clone_url":"https://github.com/kaichogami/scikit-learn.git","svn_url":"https://github.com/kaichogami/scikit-learn","homepage":"http://scikit-learn.org","size":70112,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"scikit-learn:master","ref":"master","sha":"4afbccedd3ced50e9b4019a2509df8eacdc1c7ba","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":"2016-01-01T16:52:23Z","pushed_at":"2016-01-01T17:26:14Z","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":104602,"stargazers_count":9008,"watchers_count":9008,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5322,"mirror_url":null,"open_issues_count":989,"forks":5322,"open_issues":989,"watchers":9008,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6087"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/6087"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6087"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6087/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6087/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/6087/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/fb3574d71962e840201c8ea7c5b73368319cab3b"}}}}