{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/92965691","pull_request_review_id":13486613,"id":92965691,"diff_hunk":"@@ -37,12 +39,90 @@ def _fit_estimator(estimator, X, y, sample_weight=None):\n     return estimator\n \n \n+def _partial_fit_estimator(estimator, X, y, classes=None, sample_weight=None,\n+                           first_time=True):\n+    if first_time:\n+        estimator = clone(estimator)\n+    else:\n+        estimator = copy.copy(estimator)\n+\n+    if sample_weight is not None:\n+        if classes is not None:\n+            estimator.partial_fit(X, y, classes=classes,\n+                                  sample_weight=sample_weight)\n+        else:\n+            estimator.partial_fit(X, y, sample_weight=sample_weight)\n+    else:\n+        if classes is not None:\n+            estimator.partial_fit(X, y, classes=classes)\n+        else:\n+            estimator.partial_fit(X, y)\n+    return estimator\n+\n+\n class MultiOutputEstimator(six.with_metaclass(ABCMeta, BaseEstimator)):\n \n     def __init__(self, estimator, n_jobs=1):\n         self.estimator = estimator\n         self.n_jobs = n_jobs\n \n+    @if_delegate_has_method('estimator')\n+    def partial_fit(self, X, y, classes=None, sample_weight=None):\n+        \"\"\" Fit linear model with Stochastic Gradient Descent..\n+        Fit a separate model for each output variable.\n+\n+        Parameters\n+        ----------\n+        X : (sparse) array-like, shape (n_samples, n_features)\n+            Data.\n+\n+        y : (sparse) array-like, shape (n_samples, n_outputs)\n+            Multi-output targets. An indicator matrix turns on multilabel\n+            estimation.\n+\n+        classes : array, shape (n_classes, n_outputs)","path":"sklearn/multioutput.py","position":61,"original_position":61,"commit_id":"b7988c4d2e564dba3a9e7c215601827acf4bb857","original_commit_id":"10595f617f426dcd37ef91c7e31c9e878a973cc2","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},"body":"Should specify, \"of int or string\" and perhaps should not be array to allow for different numbers of classes in each output.","created_at":"2016-12-19T04:00:35Z","updated_at":"2016-12-19T04:00:46Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/8054#discussion_r92965691","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/8054","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/92965691"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/8054#discussion_r92965691"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/8054"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/8054","id":98003462,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/8054","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/8054.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/8054.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/8054","number":8054,"state":"open","locked":false,"title":"add partial_fit to multioupt module","user":{"login":"yupbank","id":741544,"avatar_url":"https://avatars.githubusercontent.com/u/741544?v=3","gravatar_id":"","url":"https://api.github.com/users/yupbank","html_url":"https://github.com/yupbank","followers_url":"https://api.github.com/users/yupbank/followers","following_url":"https://api.github.com/users/yupbank/following{/other_user}","gists_url":"https://api.github.com/users/yupbank/gists{/gist_id}","starred_url":"https://api.github.com/users/yupbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yupbank/subscriptions","organizations_url":"https://api.github.com/users/yupbank/orgs","repos_url":"https://api.github.com/users/yupbank/repos","events_url":"https://api.github.com/users/yupbank/events{/privacy}","received_events_url":"https://api.github.com/users/yupbank/received_events","type":"User","site_admin":false},"body":"<!--\r\nThanks for contributing a pull request! Please ensure you have taken a look at\r\nthe contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#Contributing-Pull-Requests\r\n-->\r\n#### Reference Issue\r\n<!-- Example: Fixes #1234 -->\r\nFixes: #8053\r\n\r\n#### What does this implement/fix? Explain your changes.\r\nadd partial_fit \r\n\r\n#### Any other comments?\r\n\r\n\r\n<!--\r\nPlease be aware that we are a loose team of volunteers so patience is\r\nnecessary; assistance handling other issues is very welcome. We value\r\nall user contributions, no matter how minor they are. If we are slow to\r\nreview, either the pull request needs some benchmarking, tinkering,\r\nconvincing, etc. or more likely the reviewers are simply busy. In either\r\ncase, we ask for your understanding during the review process.\r\nFor more information, see our FAQ on this topic:\r\nhttp://scikit-learn.org/dev/faq.html#why-is-my-pull-request-not-getting-any-attention.\r\n\r\nThanks for contributing!\r\n-->\r\n\r\n","created_at":"2016-12-14T17:58:14Z","updated_at":"2016-12-19T04:00:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f3432cc5812d6c4a70840ab25542d388e2746e36","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/8054/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/8054/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/8054/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/b7988c4d2e564dba3a9e7c215601827acf4bb857","head":{"label":"yupbank:add-partial-fit-to-multioutout","ref":"add-partial-fit-to-multioutout","sha":"b7988c4d2e564dba3a9e7c215601827acf4bb857","user":{"login":"yupbank","id":741544,"avatar_url":"https://avatars.githubusercontent.com/u/741544?v=3","gravatar_id":"","url":"https://api.github.com/users/yupbank","html_url":"https://github.com/yupbank","followers_url":"https://api.github.com/users/yupbank/followers","following_url":"https://api.github.com/users/yupbank/following{/other_user}","gists_url":"https://api.github.com/users/yupbank/gists{/gist_id}","starred_url":"https://api.github.com/users/yupbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yupbank/subscriptions","organizations_url":"https://api.github.com/users/yupbank/orgs","repos_url":"https://api.github.com/users/yupbank/repos","events_url":"https://api.github.com/users/yupbank/events{/privacy}","received_events_url":"https://api.github.com/users/yupbank/received_events","type":"User","site_admin":false},"repo":{"id":76481495,"name":"scikit-learn","full_name":"yupbank/scikit-learn","owner":{"login":"yupbank","id":741544,"avatar_url":"https://avatars.githubusercontent.com/u/741544?v=3","gravatar_id":"","url":"https://api.github.com/users/yupbank","html_url":"https://github.com/yupbank","followers_url":"https://api.github.com/users/yupbank/followers","following_url":"https://api.github.com/users/yupbank/following{/other_user}","gists_url":"https://api.github.com/users/yupbank/gists{/gist_id}","starred_url":"https://api.github.com/users/yupbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yupbank/subscriptions","organizations_url":"https://api.github.com/users/yupbank/orgs","repos_url":"https://api.github.com/users/yupbank/repos","events_url":"https://api.github.com/users/yupbank/events{/privacy}","received_events_url":"https://api.github.com/users/yupbank/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yupbank/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/yupbank/scikit-learn","forks_url":"https://api.github.com/repos/yupbank/scikit-learn/forks","keys_url":"https://api.github.com/repos/yupbank/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yupbank/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yupbank/scikit-learn/teams","hooks_url":"https://api.github.com/repos/yupbank/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/yupbank/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/yupbank/scikit-learn/events","assignees_url":"https://api.github.com/repos/yupbank/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/yupbank/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/yupbank/scikit-learn/tags","blobs_url":"https://api.github.com/repos/yupbank/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yupbank/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yupbank/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/yupbank/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yupbank/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/yupbank/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/yupbank/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/yupbank/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/yupbank/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/yupbank/scikit-learn/subscription","commits_url":"https://api.github.com/repos/yupbank/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/yupbank/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/yupbank/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/yupbank/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/yupbank/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/yupbank/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yupbank/scikit-learn/merges","archive_url":"https://api.github.com/repos/yupbank/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yupbank/scikit-learn/downloads","issues_url":"https://api.github.com/repos/yupbank/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/yupbank/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/yupbank/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/yupbank/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yupbank/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/yupbank/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/yupbank/scikit-learn/deployments","created_at":"2016-12-14T17:24:12Z","updated_at":"2016-12-14T17:24:21Z","pushed_at":"2016-12-18T10:06:24Z","git_url":"git://github.com/yupbank/scikit-learn.git","ssh_url":"git@github.com:yupbank/scikit-learn.git","clone_url":"https://github.com/yupbank/scikit-learn.git","svn_url":"https://github.com/yupbank/scikit-learn","homepage":"http://scikit-learn.org","size":77856,"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":"3162f980a901c5057b77dc94f97bd4787b9ff1ff","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-19T02:22:36Z","pushed_at":"2016-12-18T23:16:03Z","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":78544,"stargazers_count":15380,"watchers_count":15380,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8652,"mirror_url":null,"open_issues_count":1170,"forks":8652,"open_issues":1170,"watchers":15380,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/8054"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/8054"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/8054"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/8054/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/8054/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/8054/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/b7988c4d2e564dba3a9e7c215601827acf4bb857"}}}}
{"actor":{"display_login":"jnothman"}}