{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/83493267","pull_request_review_id":4336894,"id":83493267,"diff_hunk":"@@ -333,7 +333,28 @@ def transform(self, y):\n                               pos_label=self.pos_label,\n                               neg_label=self.neg_label,\n                               sparse_output=self.sparse_output)\n+    \n+    def fit_transform(self, y):\n+        \"\"\"Fit label binarizer and transform multi-class labels to binary labels.\n+        \n+        The output of transform is sometimes referred to by some authors as the\n+        1-of-K coding scheme.\n \n+        Parameters\n+        ----------\n+        y : numpy array or sparse matrix of shape (n_samples,) or\n+            (n_samples, n_classes) Target values. The 2-d matrix should only\n+            contain 0 and 1, represents multilabel classification. Sparse\n+            matrix can be CSR, CSC, COO, DOK, or LIL.\n+\n+        Returns\n+        -------\n+        Y : numpy array or CSR matrix of shape [n_samples, n_classes]\n+            Shape will be [n_samples, 1] for binary problems.\n+        \"\"\"\n+        return super(fit_transform, self).fit_transform(y)","path":"sklearn/preprocessing/label.py","position":23,"original_position":23,"commit_id":"655e00cab3901ce1a7f5829444434b520b2335fd","original_commit_id":"655e00cab3901ce1a7f5829444434b520b2335fd","user":{"login":"amueller","id":449558,"avatar_url":"https://avatars.githubusercontent.com/u/449558?v=3","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"body":"``super(LabelBinarizer, self)``","created_at":"2016-10-14T20:14:52Z","updated_at":"2016-10-14T20:14:52Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/7670#discussion_r83493267","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7670","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/83493267"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7670#discussion_r83493267"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7670"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7670","id":89415967,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/7670","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/7670.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/7670.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7670","number":7670,"state":"open","locked":false,"title":"[WIP] Added override of fit_transform to LabelBinarizer","user":{"login":"kgilliam125","id":9299965,"avatar_url":"https://avatars.githubusercontent.com/u/9299965?v=3","gravatar_id":"","url":"https://api.github.com/users/kgilliam125","html_url":"https://github.com/kgilliam125","followers_url":"https://api.github.com/users/kgilliam125/followers","following_url":"https://api.github.com/users/kgilliam125/following{/other_user}","gists_url":"https://api.github.com/users/kgilliam125/gists{/gist_id}","starred_url":"https://api.github.com/users/kgilliam125/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgilliam125/subscriptions","organizations_url":"https://api.github.com/users/kgilliam125/orgs","repos_url":"https://api.github.com/users/kgilliam125/repos","events_url":"https://api.github.com/users/kgilliam125/events{/privacy}","received_events_url":"https://api.github.com/users/kgilliam125/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\n#7238 \r\n\r\n\r\n#### What does this implement/fix? Explain your changes.\r\nI added an override of the `fit_transform` method to the LabelBinarizer class and provided a\r\nnew docstring based on the `fit` and `transform` docstrings.\r\n\r\n#### Any other comments?\r\nTo keep the original behavior, I'm assuming I should call the base class\r\n`fit_transform` method? Let me know if you want it to do something else.\r\n\r\nAlso, I haven't had a chance to run tests on the change yet, but will do that when\r\nI get home this afternoon.\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-10-14T16:37:41Z","updated_at":"2016-10-14T20:14:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69e4fa8d1c6b5130eb874ff03e764061cc04cc45","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7670/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7670/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/7670/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/655e00cab3901ce1a7f5829444434b520b2335fd","head":{"label":"kgilliam125:labelbinarizer-fit-transform-doc","ref":"labelbinarizer-fit-transform-doc","sha":"655e00cab3901ce1a7f5829444434b520b2335fd","user":{"login":"kgilliam125","id":9299965,"avatar_url":"https://avatars.githubusercontent.com/u/9299965?v=3","gravatar_id":"","url":"https://api.github.com/users/kgilliam125","html_url":"https://github.com/kgilliam125","followers_url":"https://api.github.com/users/kgilliam125/followers","following_url":"https://api.github.com/users/kgilliam125/following{/other_user}","gists_url":"https://api.github.com/users/kgilliam125/gists{/gist_id}","starred_url":"https://api.github.com/users/kgilliam125/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgilliam125/subscriptions","organizations_url":"https://api.github.com/users/kgilliam125/orgs","repos_url":"https://api.github.com/users/kgilliam125/repos","events_url":"https://api.github.com/users/kgilliam125/events{/privacy}","received_events_url":"https://api.github.com/users/kgilliam125/received_events","type":"User","site_admin":false},"repo":{"id":70188433,"name":"scikit-learn","full_name":"kgilliam125/scikit-learn","owner":{"login":"kgilliam125","id":9299965,"avatar_url":"https://avatars.githubusercontent.com/u/9299965?v=3","gravatar_id":"","url":"https://api.github.com/users/kgilliam125","html_url":"https://github.com/kgilliam125","followers_url":"https://api.github.com/users/kgilliam125/followers","following_url":"https://api.github.com/users/kgilliam125/following{/other_user}","gists_url":"https://api.github.com/users/kgilliam125/gists{/gist_id}","starred_url":"https://api.github.com/users/kgilliam125/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgilliam125/subscriptions","organizations_url":"https://api.github.com/users/kgilliam125/orgs","repos_url":"https://api.github.com/users/kgilliam125/repos","events_url":"https://api.github.com/users/kgilliam125/events{/privacy}","received_events_url":"https://api.github.com/users/kgilliam125/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kgilliam125/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/kgilliam125/scikit-learn","forks_url":"https://api.github.com/repos/kgilliam125/scikit-learn/forks","keys_url":"https://api.github.com/repos/kgilliam125/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kgilliam125/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kgilliam125/scikit-learn/teams","hooks_url":"https://api.github.com/repos/kgilliam125/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/kgilliam125/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/kgilliam125/scikit-learn/events","assignees_url":"https://api.github.com/repos/kgilliam125/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/kgilliam125/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/kgilliam125/scikit-learn/tags","blobs_url":"https://api.github.com/repos/kgilliam125/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kgilliam125/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kgilliam125/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/kgilliam125/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kgilliam125/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/kgilliam125/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/kgilliam125/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/kgilliam125/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/kgilliam125/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/kgilliam125/scikit-learn/subscription","commits_url":"https://api.github.com/repos/kgilliam125/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/kgilliam125/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/kgilliam125/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/kgilliam125/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/kgilliam125/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/kgilliam125/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kgilliam125/scikit-learn/merges","archive_url":"https://api.github.com/repos/kgilliam125/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kgilliam125/scikit-learn/downloads","issues_url":"https://api.github.com/repos/kgilliam125/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/kgilliam125/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/kgilliam125/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/kgilliam125/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kgilliam125/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/kgilliam125/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/kgilliam125/scikit-learn/deployments","created_at":"2016-10-06T20:00:47Z","updated_at":"2016-10-06T20:00:56Z","pushed_at":"2016-10-14T16:40:44Z","git_url":"git://github.com/kgilliam125/scikit-learn.git","ssh_url":"git@github.com:kgilliam125/scikit-learn.git","clone_url":"https://github.com/kgilliam125/scikit-learn.git","svn_url":"https://github.com/kgilliam125/scikit-learn","homepage":"http://scikit-learn.org","size":75717,"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":"5e4f524f8408e5a0efb96f8128504f8ca747a95e","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-10-14T19:53:25Z","pushed_at":"2016-10-14T19:58:41Z","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":125943,"stargazers_count":14030,"watchers_count":14030,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7999,"mirror_url":null,"open_issues_count":1174,"forks":7999,"open_issues":1174,"watchers":14030,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7670"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7670"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7670"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7670/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7670/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/7670/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/655e00cab3901ce1a7f5829444434b520b2335fd"}}}}
{"actor":{"display_login":"amueller"}}