{"action":"closed","number":319,"pull_request":{"url":"https://api.github.com/repos/dmlc/xgboost/pulls/319","id":35563456,"html_url":"https://github.com/dmlc/xgboost/pull/319","diff_url":"https://github.com/dmlc/xgboost/pull/319.diff","patch_url":"https://github.com/dmlc/xgboost/pull/319.patch","issue_url":"https://api.github.com/repos/dmlc/xgboost/issues/319","number":319,"state":"closed","locked":false,"title":"Add classes_ attribute to scikit-learn wrapper","user":{"login":"jdwittenauer","id":1591142,"avatar_url":"https://avatars.githubusercontent.com/u/1591142?v=3","gravatar_id":"","url":"https://api.github.com/users/jdwittenauer","html_url":"https://github.com/jdwittenauer","followers_url":"https://api.github.com/users/jdwittenauer/followers","following_url":"https://api.github.com/users/jdwittenauer/following{/other_user}","gists_url":"https://api.github.com/users/jdwittenauer/gists{/gist_id}","starred_url":"https://api.github.com/users/jdwittenauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdwittenauer/subscriptions","organizations_url":"https://api.github.com/users/jdwittenauer/orgs","repos_url":"https://api.github.com/users/jdwittenauer/repos","events_url":"https://api.github.com/users/jdwittenauer/events{/privacy}","received_events_url":"https://api.github.com/users/jdwittenauer/received_events","type":"User","site_admin":false},"body":"Scikit-learn's ensemble methods (bagging in particular) require that the base estimators implement a classes_ attribute in addition to n_classes_.  This information is already being captured in the \"fit\" method of xgboost's scikit-learn wrapper class as a local variable.  I simply modified it to save the list of classes in an instance attribute.  This change allows xgboost models to be used in a bagging ensemble.","created_at":"2015-05-16T01:51:18Z","updated_at":"2015-05-16T05:03:18Z","closed_at":"2015-05-16T05:03:18Z","merged_at":"2015-05-16T05:03:18Z","merge_commit_sha":"fc2c27f5cbcb04fc741aabd11634a014be31979e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dmlc/xgboost/pulls/319/commits","review_comments_url":"https://api.github.com/repos/dmlc/xgboost/pulls/319/comments","review_comment_url":"https://api.github.com/repos/dmlc/xgboost/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dmlc/xgboost/issues/319/comments","statuses_url":"https://api.github.com/repos/dmlc/xgboost/statuses/4e080928a8b6d62e57f5a08e7637790f26b76ace","head":{"label":"jdwittenauer:master","ref":"master","sha":"4e080928a8b6d62e57f5a08e7637790f26b76ace","user":{"login":"jdwittenauer","id":1591142,"avatar_url":"https://avatars.githubusercontent.com/u/1591142?v=3","gravatar_id":"","url":"https://api.github.com/users/jdwittenauer","html_url":"https://github.com/jdwittenauer","followers_url":"https://api.github.com/users/jdwittenauer/followers","following_url":"https://api.github.com/users/jdwittenauer/following{/other_user}","gists_url":"https://api.github.com/users/jdwittenauer/gists{/gist_id}","starred_url":"https://api.github.com/users/jdwittenauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdwittenauer/subscriptions","organizations_url":"https://api.github.com/users/jdwittenauer/orgs","repos_url":"https://api.github.com/users/jdwittenauer/repos","events_url":"https://api.github.com/users/jdwittenauer/events{/privacy}","received_events_url":"https://api.github.com/users/jdwittenauer/received_events","type":"User","site_admin":false},"repo":{"id":35703467,"name":"xgboost","full_name":"jdwittenauer/xgboost","owner":{"login":"jdwittenauer","id":1591142,"avatar_url":"https://avatars.githubusercontent.com/u/1591142?v=3","gravatar_id":"","url":"https://api.github.com/users/jdwittenauer","html_url":"https://github.com/jdwittenauer","followers_url":"https://api.github.com/users/jdwittenauer/followers","following_url":"https://api.github.com/users/jdwittenauer/following{/other_user}","gists_url":"https://api.github.com/users/jdwittenauer/gists{/gist_id}","starred_url":"https://api.github.com/users/jdwittenauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdwittenauer/subscriptions","organizations_url":"https://api.github.com/users/jdwittenauer/orgs","repos_url":"https://api.github.com/users/jdwittenauer/repos","events_url":"https://api.github.com/users/jdwittenauer/events{/privacy}","received_events_url":"https://api.github.com/users/jdwittenauer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jdwittenauer/xgboost","description":"Gradient Boosting (GBDT, GBRT or GBM) Library for large-scale  and distributed machine learning, on single node, hadoop yarn and more.","fork":true,"url":"https://api.github.com/repos/jdwittenauer/xgboost","forks_url":"https://api.github.com/repos/jdwittenauer/xgboost/forks","keys_url":"https://api.github.com/repos/jdwittenauer/xgboost/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jdwittenauer/xgboost/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jdwittenauer/xgboost/teams","hooks_url":"https://api.github.com/repos/jdwittenauer/xgboost/hooks","issue_events_url":"https://api.github.com/repos/jdwittenauer/xgboost/issues/events{/number}","events_url":"https://api.github.com/repos/jdwittenauer/xgboost/events","assignees_url":"https://api.github.com/repos/jdwittenauer/xgboost/assignees{/user}","branches_url":"https://api.github.com/repos/jdwittenauer/xgboost/branches{/branch}","tags_url":"https://api.github.com/repos/jdwittenauer/xgboost/tags","blobs_url":"https://api.github.com/repos/jdwittenauer/xgboost/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jdwittenauer/xgboost/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jdwittenauer/xgboost/git/refs{/sha}","trees_url":"https://api.github.com/repos/jdwittenauer/xgboost/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jdwittenauer/xgboost/statuses/{sha}","languages_url":"https://api.github.com/repos/jdwittenauer/xgboost/languages","stargazers_url":"https://api.github.com/repos/jdwittenauer/xgboost/stargazers","contributors_url":"https://api.github.com/repos/jdwittenauer/xgboost/contributors","subscribers_url":"https://api.github.com/repos/jdwittenauer/xgboost/subscribers","subscription_url":"https://api.github.com/repos/jdwittenauer/xgboost/subscription","commits_url":"https://api.github.com/repos/jdwittenauer/xgboost/commits{/sha}","git_commits_url":"https://api.github.com/repos/jdwittenauer/xgboost/git/commits{/sha}","comments_url":"https://api.github.com/repos/jdwittenauer/xgboost/comments{/number}","issue_comment_url":"https://api.github.com/repos/jdwittenauer/xgboost/issues/comments{/number}","contents_url":"https://api.github.com/repos/jdwittenauer/xgboost/contents/{+path}","compare_url":"https://api.github.com/repos/jdwittenauer/xgboost/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jdwittenauer/xgboost/merges","archive_url":"https://api.github.com/repos/jdwittenauer/xgboost/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jdwittenauer/xgboost/downloads","issues_url":"https://api.github.com/repos/jdwittenauer/xgboost/issues{/number}","pulls_url":"https://api.github.com/repos/jdwittenauer/xgboost/pulls{/number}","milestones_url":"https://api.github.com/repos/jdwittenauer/xgboost/milestones{/number}","notifications_url":"https://api.github.com/repos/jdwittenauer/xgboost/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jdwittenauer/xgboost/labels{/name}","releases_url":"https://api.github.com/repos/jdwittenauer/xgboost/releases{/id}","created_at":"2015-05-16T00:36:57Z","updated_at":"2015-05-16T01:54:41Z","pushed_at":"2015-05-16T01:20:29Z","git_url":"git://github.com/jdwittenauer/xgboost.git","ssh_url":"git@github.com:jdwittenauer/xgboost.git","clone_url":"https://github.com/jdwittenauer/xgboost.git","svn_url":"https://github.com/jdwittenauer/xgboost","homepage":"","size":20629,"stargazers_count":1,"watchers_count":1,"language":"C++","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":"dmlc:master","ref":"master","sha":"9c52fc8e22d15c29af476ffd07303591c892024c","user":{"login":"dmlc","id":11508361,"avatar_url":"https://avatars.githubusercontent.com/u/11508361?v=3","gravatar_id":"","url":"https://api.github.com/users/dmlc","html_url":"https://github.com/dmlc","followers_url":"https://api.github.com/users/dmlc/followers","following_url":"https://api.github.com/users/dmlc/following{/other_user}","gists_url":"https://api.github.com/users/dmlc/gists{/gist_id}","starred_url":"https://api.github.com/users/dmlc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmlc/subscriptions","organizations_url":"https://api.github.com/users/dmlc/orgs","repos_url":"https://api.github.com/users/dmlc/repos","events_url":"https://api.github.com/users/dmlc/events{/privacy}","received_events_url":"https://api.github.com/users/dmlc/received_events","type":"Organization","site_admin":false},"repo":{"id":16587283,"name":"xgboost","full_name":"dmlc/xgboost","owner":{"login":"dmlc","id":11508361,"avatar_url":"https://avatars.githubusercontent.com/u/11508361?v=3","gravatar_id":"","url":"https://api.github.com/users/dmlc","html_url":"https://github.com/dmlc","followers_url":"https://api.github.com/users/dmlc/followers","following_url":"https://api.github.com/users/dmlc/following{/other_user}","gists_url":"https://api.github.com/users/dmlc/gists{/gist_id}","starred_url":"https://api.github.com/users/dmlc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmlc/subscriptions","organizations_url":"https://api.github.com/users/dmlc/orgs","repos_url":"https://api.github.com/users/dmlc/repos","events_url":"https://api.github.com/users/dmlc/events{/privacy}","received_events_url":"https://api.github.com/users/dmlc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dmlc/xgboost","description":"Gradient Boosting (GBDT, GBRT or GBM) Library for large-scale  and distributed machine learning, on single node, hadoop yarn and more.","fork":false,"url":"https://api.github.com/repos/dmlc/xgboost","forks_url":"https://api.github.com/repos/dmlc/xgboost/forks","keys_url":"https://api.github.com/repos/dmlc/xgboost/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmlc/xgboost/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmlc/xgboost/teams","hooks_url":"https://api.github.com/repos/dmlc/xgboost/hooks","issue_events_url":"https://api.github.com/repos/dmlc/xgboost/issues/events{/number}","events_url":"https://api.github.com/repos/dmlc/xgboost/events","assignees_url":"https://api.github.com/repos/dmlc/xgboost/assignees{/user}","branches_url":"https://api.github.com/repos/dmlc/xgboost/branches{/branch}","tags_url":"https://api.github.com/repos/dmlc/xgboost/tags","blobs_url":"https://api.github.com/repos/dmlc/xgboost/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmlc/xgboost/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmlc/xgboost/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmlc/xgboost/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmlc/xgboost/statuses/{sha}","languages_url":"https://api.github.com/repos/dmlc/xgboost/languages","stargazers_url":"https://api.github.com/repos/dmlc/xgboost/stargazers","contributors_url":"https://api.github.com/repos/dmlc/xgboost/contributors","subscribers_url":"https://api.github.com/repos/dmlc/xgboost/subscribers","subscription_url":"https://api.github.com/repos/dmlc/xgboost/subscription","commits_url":"https://api.github.com/repos/dmlc/xgboost/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmlc/xgboost/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmlc/xgboost/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmlc/xgboost/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmlc/xgboost/contents/{+path}","compare_url":"https://api.github.com/repos/dmlc/xgboost/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmlc/xgboost/merges","archive_url":"https://api.github.com/repos/dmlc/xgboost/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmlc/xgboost/downloads","issues_url":"https://api.github.com/repos/dmlc/xgboost/issues{/number}","pulls_url":"https://api.github.com/repos/dmlc/xgboost/pulls{/number}","milestones_url":"https://api.github.com/repos/dmlc/xgboost/milestones{/number}","notifications_url":"https://api.github.com/repos/dmlc/xgboost/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmlc/xgboost/labels{/name}","releases_url":"https://api.github.com/repos/dmlc/xgboost/releases{/id}","created_at":"2014-02-06T17:28:03Z","updated_at":"2015-05-16T03:48:51Z","pushed_at":"2015-05-16T05:03:18Z","git_url":"git://github.com/dmlc/xgboost.git","ssh_url":"git@github.com:dmlc/xgboost.git","clone_url":"https://github.com/dmlc/xgboost.git","svn_url":"https://github.com/dmlc/xgboost","homepage":"","size":20629,"stargazers_count":789,"watchers_count":789,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":426,"mirror_url":null,"open_issues_count":32,"forks":426,"open_issues":32,"watchers":789,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dmlc/xgboost/pulls/319"},"html":{"href":"https://github.com/dmlc/xgboost/pull/319"},"issue":{"href":"https://api.github.com/repos/dmlc/xgboost/issues/319"},"comments":{"href":"https://api.github.com/repos/dmlc/xgboost/issues/319/comments"},"review_comments":{"href":"https://api.github.com/repos/dmlc/xgboost/pulls/319/comments"},"review_comment":{"href":"https://api.github.com/repos/dmlc/xgboost/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dmlc/xgboost/pulls/319/commits"},"statuses":{"href":"https://api.github.com/repos/dmlc/xgboost/statuses/4e080928a8b6d62e57f5a08e7637790f26b76ace"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"tqchen","id":2577440,"avatar_url":"https://avatars.githubusercontent.com/u/2577440?v=3","gravatar_id":"","url":"https://api.github.com/users/tqchen","html_url":"https://github.com/tqchen","followers_url":"https://api.github.com/users/tqchen/followers","following_url":"https://api.github.com/users/tqchen/following{/other_user}","gists_url":"https://api.github.com/users/tqchen/gists{/gist_id}","starred_url":"https://api.github.com/users/tqchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tqchen/subscriptions","organizations_url":"https://api.github.com/users/tqchen/orgs","repos_url":"https://api.github.com/users/tqchen/repos","events_url":"https://api.github.com/users/tqchen/events{/privacy}","received_events_url":"https://api.github.com/users/tqchen/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}