class_docstr: Encode labels with value between 0 and n_classes-1.
  
  Read more in the :ref:`User Guide <preprocessing_targets>`.
  
  Attributes
  ----------
  classes_ : array of shape (n_class,)
      Holds the label for each class.
  
  Examples
  --------
  `LabelEncoder` can be used to normalize labels.
  
  >>> from sklearn import preprocessing
  >>> le = preprocessing.LabelEncoder()
  >>> le.fit([1, 2, 2, 6])
  LabelEncoder()
  >>> le.classes_
  array([1, 2, 6])
  >>> le.transform([1, 1, 2, 6]) #doctest: +ELLIPSIS
  array([0, 0, 1, 2]...)
  >>> le.inverse_transform([0, 0, 1, 2])
  array([1, 1, 2, 6])
  
  It can also be used to transform non-numerical labels (as long as they are
  hashable and comparable) to numerical labels.
  
  >>> le = preprocessing.LabelEncoder()
  >>> le.fit(["paris", "paris", "tokyo", "amsterdam"])
  LabelEncoder()
  >>> list(le.classes_)
  ['amsterdam', 'paris', 'tokyo']
  >>> le.transform(["tokyo", "tokyo", "paris"]) #doctest: +ELLIPSIS
  array([2, 2, 1]...)
  >>> list(le.inverse_transform([2, 2, 1]))
  ['tokyo', 'tokyo', 'paris']
  
  See also
  --------
  sklearn.preprocessing.OneHotEncoder : encode categorical integer features
      using a one-hot aka one-of-K scheme.
class_docstr_tok: ["Encode","labels","with","value","between","0","and","n_classes-1",".","Read","more","in","the",":","ref",":","`","User","Guide","<","preprocessing_targets",">","`",".","Attributes","--","--","--","--","--","classes_",":","array","of","shape","(","n_class",",",")","Holds","the","label","for","each","class",".","Examples","--","--","--","--","`","LabelEncoder","`","can","be","used","to","normalize","labels",".",">",">",">","from","sklearn","import","preprocessing",">",">",">","le","=","preprocessing.LabelEncoder","(",")",">",">",">","le.fit","(","[","1",",","2",",","2",",","6","]",")","LabelEncoder","(",")",">",">",">","le.classes_","array","(","[","1",",","2",",","6","]",")",">",">",">","le.transform","(","[","1",",","1",",","2",",","6","]",")","#","doctest",":","+ELLIPSIS","array","(","[","0",",","0",",","1",",","2","]","...",")",">",">",">","le.inverse_transform","(","[","0",",","0",",","1",",","2","]",")","array","(","[","1",",","1",",","2",",","6","]",")","It","can","also","be","used","to","transform","non-numerical","labels","(","as","long","as","they","are","hashable","and","comparable",")","to","numerical","labels",".",">",">",">","le","=","preprocessing.LabelEncoder","(",")",">",">",">","le.fit","(","[","``","paris","''",",","``","paris","''",",","``","tokyo","''",",","``","amsterdam","''","]",")","LabelEncoder","(",")",">",">",">","list","(","le.classes_",")","[","'amsterdam","'",",","'paris","'",",","'tokyo","'","]",">",">",">","le.transform","(","[","``","tokyo","''",",","``","tokyo","''",",","``","paris","''","]",")","#","doctest",":","+ELLIPSIS","array","(","[","2",",","2",",","1","]","...",")",">",">",">","list","(","le.inverse_transform","(","[","2",",","2",",","1","]",")",")","[","'tokyo","'",",","'tokyo","'",",","'paris","'","]","See","also","--","--","--","--","sklearn.preprocessing.OneHotEncoder",":","encode","categorical","integer","features","using","a","one-hot","aka","one-of-K","scheme","."]
docstr: Transform labels to normalized encoding.
  
  Parameters
  ----------
  y : array-like of shape [n_samples]
      Target values.
  
  Returns
  -------
  y : array-like of shape [n_samples]
code: def transform(self, y):
      """Transform labels to normalized encoding.
  
      Parameters
      ----------
      y : array-like of shape [n_samples]
          Target values.
  
      Returns
      -------
      y : array-like of shape [n_samples]
      """
      check_is_fitted(self, "classes_")
      y = column_or_1d(y, warn=True)
  
      classes = np.unique(y)
      _check_numpy_unicode_bug(classes)
      if len(np.intersect1d(classes, self.classes_)) < len(classes):
          diff = np.setdiff1d(classes, self.classes_)
          raise ValueError("y contains new labels: %s" % str(diff))
      return np.searchsorted(self.classes_, y)
  
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 3 for calling the LabelEncoder obj's underlying member method code with example usage: obj.transform(y) and returns: np