Skip to content

Documentation of label-binarizer and multi-label format #4639

Closed

Description

@amueller

From the docs I feel it is not entirely clear that using label indicators means doing multi-label classification.
I think this should be better documented in the multi-class narratives, the OneVsRestClassifier and the LabelBinarizer.
Applying a label-binarizer to your y will result in quite different results, which is obvious if you know that this will switch the problem to a multi-label problem, but is somewhat unintuitive for the uninitiated.

Activity

  1. added
    Easy
    on Apr 27, 2015
  2. dotsdl commented on Jul 12, 2015

    @dotsdl
    Contributor

    Working on this one now.

  3. dotsdl commented on Jul 22, 2015

    @dotsdl
    Contributor

    Releasing this one for someone else. Not working on it now.

  4. pieteradejong commented on Sep 8, 2015

    @pieteradejong
    Contributor

    Is there till a need for someone to take this on? If so, it seems like a great way to get started with scikit-learn - any pointers?

  5. amueller commented on Sep 8, 2015

    @amueller
    MemberAuthor

    @pieteradejong feel free to get started on this. Start by reading the multi-class and multi-label documentation and make sure to understand the differences between multi-class and multi-label.

  6. andylamb commented on Sep 20, 2015

    @andylamb

    @pieteradejong, are you still working on this?

  7. pieteradejong commented on Sep 22, 2015

    @pieteradejong
    Contributor

    @andylamb yes, am working on it.

    have run some searches for 'multi-class' and 'multi-label' in the source, would be happy to hear about any specific locations I should look at.

  8. pieteradejong commented on Oct 3, 2015

    @pieteradejong
    Contributor
  9. pieteradejong commented on Oct 3, 2015

    @pieteradejong
    Contributor

    @amueller there is a broken image in the URL mentioned in my previous comment;
    https://github.com/scikit-learn/scikit-learn/blob/master/doc/auto_examples/plot_multilabel.html

    I'd be happy to reproduce it and add it back in via PR; could you provide any instructions as to how that image was produced?

  10. amueller commented on Oct 12, 2015

    @amueller
    MemberAuthor

    multiclass.rst is the right place to look.
    Can you link to where the image is broken on the website?

  11. pieteradejong commented on Oct 24, 2015

    @pieteradejong
    Contributor

    @amueller Yes, I think that's the one. Glad to see there's an existing issue.
    Will propose some changes to multiclass.rst.

  12. pieteradejong commented on Nov 16, 2015

    @pieteradejong
    Contributor

    working on this now

  13. pieteradejong commented on Nov 17, 2015

    @pieteradejong
    Contributor

    @amueller does MultiLabelBinarizer also convert the other way, that is, from a binary matrix to a list of tuples? for example, from:
    array([[0, 0, 1, 1, 1],
    [0, 0, 1, 0, 0],
    [1, 1, 0, 1, 0],
    [1, 1, 1, 1, 1],
    [1, 1, 1, 0, 0]])

    to:
    y = [[2, 3, 4], [2], [0, 1, 3], [0, 1, 2, 3, 4], [0, 1, 2]]

  14. pieteradejong commented on Nov 17, 2015

    @pieteradejong
    Contributor

    @amueller are you looking for any comments to be added specifically to 1.12.1, 1.12.2 or both? It seems pretty clear in the former, that you're doing multi label classification since that is the title of the section?

    On the other hand, the multilabel section in OneVsRest could use some more comments perhaps?

  15. devashishd12 commented on Jan 14, 2016

    @devashishd12
    Contributor

    @pieteradejong are you still working on this? If you've already raised a pr can you please pin this issue? Thanks!

  16. pieteradejong commented on Jan 14, 2016

    @pieteradejong
    Contributor

    yes I am working on this

  17. devashishd12 commented on Jan 14, 2016

    @devashishd12
    Contributor

    @pieteradejong alright awesome! Waiting for a pr :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationEasy

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions