class_docstr: Transform between iterable of iterables and a multilabel format
  
  Although a list of sets or tuples is a very intuitive format for multilabel
  data, it is unwieldy to process. This transformer converts between this
  intuitive format and the supported multilabel format: a (samples x classes)
  binary matrix indicating the presence of a class label.
  
  Parameters
  ----------
  classes : array-like of shape [n_classes] (optional)
      Indicates an ordering for the class labels
  
  sparse_output : boolean (default: False),
      Set to true if output binary array is desired in CSR sparse format
  
  Attributes
  ----------
  classes_ : array of labels
      A copy of the `classes` parameter where provided,
      or otherwise, the sorted set of classes found when fitting.
  
  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([set(['sci-fi', 'thriller']), set(['comedy'])])
  array([[0, 1, 1],
         [1, 0, 0]])
  >>> list(mlb.classes_)
  ['comedy', 'sci-fi', 'thriller']
  
  See also
  --------
  sklearn.preprocessing.OneHotEncoder : encode categorical integer features
      using a one-hot aka one-of-K scheme.
class_docstr_tok: ["Transform","between","iterable","of","iterables","and","a","multilabel","format","Although","a","list","of","sets","or","tuples","is","a","very","intuitive","format","for","multilabel","data",",","it","is","unwieldy","to","process",".","This","transformer","converts","between","this","intuitive","format","and","the","supported","multilabel","format",":","a","(","samples","x","classes",")","binary","matrix","indicating","the","presence","of","a","class","label",".","Parameters","--","--","--","--","--","classes",":","array-like","of","shape","[","n_classes","]","(","optional",")","Indicates","an","ordering","for","the","class","labels","sparse_output",":","boolean","(","default",":","False",")",",","Set","to","true","if","output","binary","array","is","desired","in","CSR","sparse","format","Attributes","--","--","--","--","--","classes_",":","array","of","labels","A","copy","of","the","`","classes","`","parameter","where","provided",",","or","otherwise",",","the","sorted","set","of","classes","found","when","fitting",".","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","(","[","set","(","[","'sci-fi","'",",","'thriller","'","]",")",",","set","(","[","'comedy","'","]",")","]",")","array","(","[","[","0",",","1",",","1","]",",","[","1",",","0",",","0","]","]",")",">",">",">","list","(","mlb.classes_",")","[","'comedy","'",",","'sci-fi","'",",","'thriller","'","]","See","also","--","--","--","--","sklearn.preprocessing.OneHotEncoder",":","encode","categorical","integer","features","using","a","one-hot","aka","one-of-K","scheme","."]
docstr: Transforms the label sets with a given mapping
  
  Parameters
  ----------
  y : iterable of iterables
  class_mapping : Mapping
      Maps from label to column index in label indicator matrix
  
  Returns
  -------
  y_indicator : sparse CSR matrix, shape (n_samples, n_classes)
      Label indicator matrix
code: def _transform(self, y, class_mapping):
      """Transforms the label sets with a given mapping
  
      Parameters
      ----------
      y : iterable of iterables
      class_mapping : Mapping
          Maps from label to column index in label indicator matrix
  
      Returns
      -------
      y_indicator : sparse CSR matrix, shape (n_samples, n_classes)
          Label indicator matrix
      """
      indices = array.array("i")
      indptr = array.array("i", [0])
      for labels in y:
          indices.extend(set(class_mapping[label] for label in labels))
          indptr.append(len(indices))
      data = np.ones(len(indices), dtype=int)
  
      return sp.csr_matrix(
          (data, indices, indptr),
          shape=(len(indptr) - 1, len(class_mapping)),
      )
  
imports: from collections import defaultdict
  import itertools
  import array
  import numpy
  import scipy.sparse
  from ..base import BaseEstimator, TransformerMixin
  from ..utils.fixes import np_version
  from ..utils.fixes import sparse_min_max
  from ..utils.fixes import astype
  from ..utils.fixes import in1d
  from ..utils import column_or_1d
  from ..utils.validation import check_array
  from ..utils.validation import check_is_fitted
  from ..utils.validation import _num_samples
  from ..utils.multiclass import unique_labels
  from ..utils.multiclass import type_of_target
  from ..externals import six
label_desc: Use image node_id 5 for calling the MultiLabelBinarizer obj's underlying member method code with example usage: obj._transform(y, class_mapping) and returns: sp