{"action":"opened","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6723","repository_url":"https://api.github.com/repos/scikit-learn/scikit-learn","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6723/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6723/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6723/events","html_url":"https://github.com/scikit-learn/scikit-learn/issues/6723","id":151260198,"number":6723,"title":"LabelBinarizer single label case","user":{"login":"MechCoder","id":1867024,"avatar_url":"https://avatars.githubusercontent.com/u/1867024?v=3","gravatar_id":"","url":"https://api.github.com/users/MechCoder","html_url":"https://github.com/MechCoder","followers_url":"https://api.github.com/users/MechCoder/followers","following_url":"https://api.github.com/users/MechCoder/following{/other_user}","gists_url":"https://api.github.com/users/MechCoder/gists{/gist_id}","starred_url":"https://api.github.com/users/MechCoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MechCoder/subscriptions","organizations_url":"https://api.github.com/users/MechCoder/orgs","repos_url":"https://api.github.com/users/MechCoder/repos","events_url":"https://api.github.com/users/MechCoder/events{/privacy}","received_events_url":"https://api.github.com/users/MechCoder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-26T23:07:40Z","updated_at":"2016-04-26T23:07:40Z","closed_at":null,"body":"1. It should be documented that in case of a single label, doing a `fit_transform` returns an array of negative labels, i.e the majority class is set to `neg_label` by default.\r\n2. Also\r\n\r\n        lb = LabelBinarizer()\r\n        lb.fit([0])\r\n        lb.transform([\"p\"])\r\n        array([[0]])\r\n\r\nthis seems to be a bug to me."}}