{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/49904075","id":49904075,"diff_hunk":"@@ -0,0 +1,214 @@\n+\"\"\"\n+MultiOneVsRestClassifier\n+===========================\n+This module includes several classes that extend base estimators to\n+multi-target estimators.\n+\n+Most sklearn estimators use a response matrix to train a target function\n+with a single output variable.  I.e. typical estimators use the\n+training set X to estimate a target function f(X) that\n+predicts a single Y.  The purpose of this class is to extend estimators\n+to be able to estimate a series of target functions (f1,f2,f3...,fn)\n+that are trained on a single X predictor matrix to predict a series\n+of reponses (y1,y2,y3...,yn).\n+\"\"\"\n+\n+# Author: Hugo Bowne-Anderson <hugobowne@gmail.com>\n+# Author: Chris Rivera <chris.richard.rivera@gmail.com>\n+# Author: Michael Williamson\n+# Author: James Ashton Nichols <james.ashton.nichols@gmail.com>\n+\n+# License: BSD 3 clause\n+\n+import array\n+import numpy as np\n+import warnings\n+import scipy.sparse as sp\n+\n+from .base import ClassifierMixin\n+from .base import clone, is_classifier\n+from .base import MetaEstimatorMixin, is_regressor\n+from .preprocessing import LabelBinarizer\n+from .metrics.pairwise import euclidean_distances\n+from .utils import check_random_state\n+from .utils.validation import _num_samples\n+from .utils.validation import check_consistent_length\n+from .utils.validation import check_is_fitted\n+from .externals.joblib import Parallel\n+from .externals.joblib import delayed\n+from .externals import six\n+\n+from sklearn.multiclass import OneVsRestClassifier\n+\n+\n+class MultiOneVsRestClassifier(ClassifierMixin):\n+    \"\"\"\n+    Converts any classifer estimator into a multi-target classifier estimator.\n+\n+    This class fits and predicts a series of one-versus-all models\n+    to response matrix Y, which has n_samples and p_target variables,\n+    on the predictor Matrix X with n_samples and m_feature variables.\n+    This allows for multiple target variable classifications. For each\n+    target variable (column in Y), a separate OneVsRestClassifier is fit.\n+    See the base OneVsRestClassifier Class in sklearn.multiclass\n+    for more details.\n+\n+    Parameters\n+    ----------\n+    estimator : estimator object\n+        An estimator object implementing `fit` and `predict_proba`.\n+\n+    n_jobs : int, optional, default: 1\n+        The number of jobs to use for the computation. If -1 all CPUs are used.\n+        If 1 is given, no parallel computing code is used at all, which is\n+        useful for debugging. For n_jobs below -1, (n_cpus + 1 + n_jobs) are\n+        used. Thus for n_jobs = -2, all CPUs but one are used.\n+        The number of jobs to use for the computation.\n+\n+        Note that parallel processing only occurs if there are multiple classes\n+        within each target variable. It does each target variable in y in series.\n+\n+    Attributes\n+    __________\n+    estimator: Sklearn estimator:\n+        The base estimator used to construct the model.\n+\n+    \"\"\"\n+\n+    def __init__(self, estimator=None, n_jobs=1):\n+\n+        self.estimator = estimator","path":"sklearn/multioutput.py","position":80,"original_position":80,"commit_id":"02baa33e54f5a7cfe55f47960b2a4611b224ca6b","original_commit_id":"02baa33e54f5a7cfe55f47960b2a4611b224ca6b","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":"Oh sorry, please ignore the 2 comments","created_at":"2016-01-15T20:56:10Z","updated_at":"2016-01-15T20:56:10Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/6127#discussion_r49904075","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6127","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/49904075"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/6127#discussion_r49904075"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6127"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6127","id":55291330,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/6127","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/6127.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/6127.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6127","number":6127,"state":"open","locked":false,"title":"[MRG] added MultiOneVsRest classifier & testing suite (Meta-estimators for multi-output learning #5824)","user":{"login":"hugobowne","id":4182382,"avatar_url":"https://avatars.githubusercontent.com/u/4182382?v=3","gravatar_id":"","url":"https://api.github.com/users/hugobowne","html_url":"https://github.com/hugobowne","followers_url":"https://api.github.com/users/hugobowne/followers","following_url":"https://api.github.com/users/hugobowne/following{/other_user}","gists_url":"https://api.github.com/users/hugobowne/gists{/gist_id}","starred_url":"https://api.github.com/users/hugobowne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugobowne/subscriptions","organizations_url":"https://api.github.com/users/hugobowne/orgs","repos_url":"https://api.github.com/users/hugobowne/repos","events_url":"https://api.github.com/users/hugobowne/events{/privacy}","received_events_url":"https://api.github.com/users/hugobowne/received_events","type":"User","site_admin":false},"body":"this is my 1st coding pull request here on sklearn fyi !","created_at":"2016-01-07T02:02:53Z","updated_at":"2016-01-15T20:56:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"faa81a36015d8353e94d6781d660e6aa2276e1ad","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6127/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6127/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/6127/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/02baa33e54f5a7cfe55f47960b2a4611b224ca6b","head":{"label":"hugobowne:MultiOneVsRestClassifier","ref":"MultiOneVsRestClassifier","sha":"02baa33e54f5a7cfe55f47960b2a4611b224ca6b","user":{"login":"hugobowne","id":4182382,"avatar_url":"https://avatars.githubusercontent.com/u/4182382?v=3","gravatar_id":"","url":"https://api.github.com/users/hugobowne","html_url":"https://github.com/hugobowne","followers_url":"https://api.github.com/users/hugobowne/followers","following_url":"https://api.github.com/users/hugobowne/following{/other_user}","gists_url":"https://api.github.com/users/hugobowne/gists{/gist_id}","starred_url":"https://api.github.com/users/hugobowne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugobowne/subscriptions","organizations_url":"https://api.github.com/users/hugobowne/orgs","repos_url":"https://api.github.com/users/hugobowne/repos","events_url":"https://api.github.com/users/hugobowne/events{/privacy}","received_events_url":"https://api.github.com/users/hugobowne/received_events","type":"User","site_admin":false},"repo":{"id":43388900,"name":"scikit-learn","full_name":"hugobowne/scikit-learn","owner":{"login":"hugobowne","id":4182382,"avatar_url":"https://avatars.githubusercontent.com/u/4182382?v=3","gravatar_id":"","url":"https://api.github.com/users/hugobowne","html_url":"https://github.com/hugobowne","followers_url":"https://api.github.com/users/hugobowne/followers","following_url":"https://api.github.com/users/hugobowne/following{/other_user}","gists_url":"https://api.github.com/users/hugobowne/gists{/gist_id}","starred_url":"https://api.github.com/users/hugobowne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugobowne/subscriptions","organizations_url":"https://api.github.com/users/hugobowne/orgs","repos_url":"https://api.github.com/users/hugobowne/repos","events_url":"https://api.github.com/users/hugobowne/events{/privacy}","received_events_url":"https://api.github.com/users/hugobowne/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hugobowne/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/hugobowne/scikit-learn","forks_url":"https://api.github.com/repos/hugobowne/scikit-learn/forks","keys_url":"https://api.github.com/repos/hugobowne/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hugobowne/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hugobowne/scikit-learn/teams","hooks_url":"https://api.github.com/repos/hugobowne/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/hugobowne/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/hugobowne/scikit-learn/events","assignees_url":"https://api.github.com/repos/hugobowne/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/hugobowne/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/hugobowne/scikit-learn/tags","blobs_url":"https://api.github.com/repos/hugobowne/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hugobowne/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hugobowne/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/hugobowne/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hugobowne/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/hugobowne/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/hugobowne/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/hugobowne/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/hugobowne/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/hugobowne/scikit-learn/subscription","commits_url":"https://api.github.com/repos/hugobowne/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/hugobowne/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/hugobowne/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/hugobowne/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/hugobowne/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/hugobowne/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hugobowne/scikit-learn/merges","archive_url":"https://api.github.com/repos/hugobowne/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hugobowne/scikit-learn/downloads","issues_url":"https://api.github.com/repos/hugobowne/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/hugobowne/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/hugobowne/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/hugobowne/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hugobowne/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/hugobowne/scikit-learn/releases{/id}","created_at":"2015-09-29T19:15:54Z","updated_at":"2015-09-29T19:16:08Z","pushed_at":"2016-01-15T19:47:42Z","git_url":"git://github.com/hugobowne/scikit-learn.git","ssh_url":"git@github.com:hugobowne/scikit-learn.git","clone_url":"https://github.com/hugobowne/scikit-learn.git","svn_url":"https://github.com/hugobowne/scikit-learn","homepage":"http://scikit-learn.org","size":70687,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scikit-learn:master","ref":"master","sha":"ac2ff4a76f9ba75fc8a23d0327af86782039953e","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-15T20:12:17Z","pushed_at":"2016-01-15T20:31:40Z","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":104901,"stargazers_count":9228,"watchers_count":9228,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5430,"mirror_url":null,"open_issues_count":1000,"forks":5430,"open_issues":1000,"watchers":9228,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6127"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/6127"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6127"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6127/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6127/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/6127/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/02baa33e54f5a7cfe55f47960b2a4611b224ca6b"}}}}