ng the presence of a class label.

Parameters
----------
classes : array-like of shape (n_classes,), default=None
    Indicates an ordering for the class labels.
    All entries should be unique (cannot contain duplicate classes).

sparse_output : bool, default=False
    Set to True if output binary array is desired in CSR sparse format.

Attributes
----------
classes_ : ndarray of shape (n_classes,)
    A copy of the `classes` parameter when provided.
    Otherwise it corresponds to the sorted set of classes found
    when fitting.

See Also
--------
OneHotEncoder : Encode categorical features using a one-hot aka one-of-K
    scheme.

Examples
--------
>>> from sklearn.preprocessing import MultiLabelBinarizer
>>> mlb = MultiLabelBinarizer()
>>> mlb.fit_transform([(1, 2), (3,)])
array([[1, 1, 0],
       [0, 0, 1]])
>>> mlb.classes_
array([1, 2, 3])

>>> mlb.fit_transform([{'sci-fi', 'thriller'}, {'comedy'}])
array([[0, 1, 1],
       [1, 0, 0]])
>>> list(mlb.classes_)
['comedy', 'sci-fi', 'thriller']

A common mistake is to pass in a list, which leads to the following issue:

>>> mlb = MultiLabelBinarizer()
>>> mlb.fit(['sci-fi', 'thriller', 'comedy'])
MultiLabelBinarizer()
>>> mlb.classes_
array(['-', 'c', 'd', 'e', 'f', 'h', 'i', 'l', 'm', 'o', 'r', 's', 't',
    'y'], dtype=object)

To correct this, the list of labels should be passed in as:

>>> mlb = MultiLabelBinarizer()
>>> mlb.fit([['sci-fi', 'thriller', 'comedy']])
MultiLabelBinarizer()
>>> mlb.classes_
array(['comedy', 'sci-fi', 'thriller'], dtype=object)
rŠ