parameters: (self, y)
return_statement: return label_binarize(y, self.classes_,
                                pos_label=self.pos_label,
                                neg_label=self.neg_label,
                                sparse_output=self.sparse_output)
docstring: Transform multi-class labels to binary labels
  
          The output of transform is sometimes referred to by some authors as the
          1-of-K coding scheme.
  
          Parameters
          ----------
          y : numpy array or sparse matrix of shape (n_samples,) or
              (n_samples, n_classes) Target values. The 2-d matrix should only
              contain 0 and 1, represents multilabel classification. Sparse
              matrix can be CSR, CSC, COO, DOK, or LIL.
  
          Returns
          -------
          Y : numpy array or CSR matrix of shape [n_samples, n_classes]
              Shape will be [n_samples, 1] for binary problems.
docstring_summary: Transform multi-class labels to binary labels
docstring_tokens: Transform multi - class labels to binary labels
function: def transform(self, y):
          """Transform multi-class labels to binary labels
  
          The output of transform is sometimes referred to by some authors as the
          1-of-K coding scheme.
  
          Parameters
          ----------
          y : numpy array or sparse matrix of shape (n_samples,) or
              (n_samples, n_classes) Target values. The 2-d matrix should only
              contain 0 and 1, represents multilabel classification. Sparse
              matrix can be CSR, CSC, COO, DOK, or LIL.
  
          Returns
          -------
          Y : numpy array or CSR matrix of shape [n_samples, n_classes]
              Shape will be [n_samples, 1] for binary problems.
          """
          check_is_fitted(self, 'classes_')
  
          y_is_multilabel = type_of_target(y).startswith('multilabel')
          if y_is_multilabel and not self.y_type_.startswith('multilabel'):
              raise ValueError("The object was not fitted with multilabel"
                               " input.")
  
          return label_binarize(y, self.classes_,
                                pos_label=self.pos_label,
                                neg_label=self.neg_label,
                                sparse_output=self.sparse_output)
function_tokens: def transform ( self , y ) : check_is_fitted ( self , 'classes_' ) y_is_multilabel = type_of_target ( y ) . startswith ( 'multilabel' ) if y_is_multilabel and not self . y_type_ . startswith ( 'multilabel' ) : raise ValueError ( "The object was not fitted with multilabel" " input." ) return label_binarize ( y , self . classes_ , pos_label = self . pos_label , neg_label = self . neg_label , sparse_output = self . sparse_output )