{"action":"created","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4161","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4161/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4161/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4161/events","html_url":"https://github.com/scikit-learn/scikit-learn/pull/4161","id":55448403,"number":4161,"title":"[MRG] EnsembleClassifier implementation","user":{"login":"rasbt","id":5618407,"avatar_url":"https://avatars.githubusercontent.com/u/5618407?v=3","gravatar_id":"","url":"https://api.github.com/users/rasbt","html_url":"https://github.com/rasbt","followers_url":"https://api.github.com/users/rasbt/followers","following_url":"https://api.github.com/users/rasbt/following{/other_user}","gists_url":"https://api.github.com/users/rasbt/gists{/gist_id}","starred_url":"https://api.github.com/users/rasbt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasbt/subscriptions","organizations_url":"https://api.github.com/users/rasbt/orgs","repos_url":"https://api.github.com/users/rasbt/repos","events_url":"https://api.github.com/users/rasbt/events{/privacy}","received_events_url":"https://api.github.com/users/rasbt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":92,"created_at":"2015-01-26T05:39:41Z","updated_at":"2015-04-20T18:59:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4161","html_url":"https://github.com/scikit-learn/scikit-learn/pull/4161","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/4161.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/4161.patch"},"body":"This is an implementation of an estimator to combine scikit-learn classification estimators into an ensemble classifier for majority rule class label prediction or classification based on weighted probability averages.\r\n\r\nI added a section at the bottom of the ensemble.rst documentation with a more detailed description and examples.\r\n\r\nI'd be happy to make improvements or adjustments if necessary. Please let me know, I am happy to help!"},"comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments/94540877","html_url":"https://github.com/scikit-learn/scikit-learn/pull/4161#issuecomment-94540877","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4161","id":94540877,"user":{"login":"rasbt","id":5618407,"avatar_url":"https://avatars.githubusercontent.com/u/5618407?v=3","gravatar_id":"","url":"https://api.github.com/users/rasbt","html_url":"https://github.com/rasbt","followers_url":"https://api.github.com/users/rasbt/followers","following_url":"https://api.github.com/users/rasbt/following{/other_user}","gists_url":"https://api.github.com/users/rasbt/gists{/gist_id}","starred_url":"https://api.github.com/users/rasbt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasbt/subscriptions","organizations_url":"https://api.github.com/users/rasbt/orgs","repos_url":"https://api.github.com/users/rasbt/repos","events_url":"https://api.github.com/users/rasbt/events{/privacy}","received_events_url":"https://api.github.com/users/rasbt/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T18:59:08Z","updated_at":"2015-04-20T18:59:08Z","body":"Oh, okay, so instead of the current averaging approach in the \"soft\" voting would be:\r\n\r\n## a) (current)\r\n\r\nE.g., 3 classifiers would currently predict the probabilities that 1 sample belongs to class 0 or 1: \r\n\r\n    class0: (0.45, 0.56, 0.73) / 3 = 0.58\r\n    class1: (0.55, 0.44, 0.27) / 3  = 0.42\r\n\r\n    -> predict class 0\r\n\r\nand the proposed change for soft voting would then be something like:\r\n\r\n## b)\r\n\r\n\r\n    class0: (0.45, 0.56, 0.73)  -> 0, 1, 1\r\n    class1: (0.55, 0.44, 0.27)  -> 1, 0, 0\r\n\r\n    -> predict class 0\r\n\r\n\r\nWhen @amueller suggested\r\n\r\n> the user might count on predict being the argmax of predict_proba. I'm not sure we actually promise this, but is is a bit unintuitive if it is not true.\r\n\r\nI was thinking of something else. Now, I agree that the results between the currently implemented \"soft\" and \"hard\" voting can differ in certain situation -- I thought that it could be useful to have this option. If we change the implementation of \"soft\" to the scenario b), the hard and soft voting would be identical --- wouldn't \"soft\" voting become redundant in this case?"}}