parameters: (self, Y, threshold=None)
return_statement: return y_inv
docstring: Transform binary labels back to multi-class labels
  
          Parameters
          ----------
          Y : numpy array or sparse matrix with shape [n_samples, n_classes]
              Target values. All sparse matrices are converted to CSR before
              inverse transformation.
  
          threshold : float or None
              Threshold used in the binary and multi-label cases.
  
              Use 0 when ``Y`` contains the output of decision_function
              (classifier).
              Use 0.5 when ``Y`` contains the output of predict_proba.
  
              If None, the threshold is assumed to be half way between
              neg_label and pos_label.
  
          Returns
          -------
          y : numpy array or CSR matrix of shape [n_samples] Target values.
  
          Notes
          -----
          In the case when the binary labels are fractional
          (probabilistic), inverse_transform chooses the class with the
          greatest value. Typically, this allows to use the output of a
          linear model's decision_function method directly as the input
          of inverse_transform.
docstring_summary: Transform binary labels back to multi-class labels
docstring_tokens: Transform binary labels back to multi - class labels
function: def inverse_transform(self, Y, threshold=None):
          """Transform binary labels back to multi-class labels
  
          Parameters
          ----------
          Y : numpy array or sparse matrix with shape [n_samples, n_classes]
              Target values. All sparse matrices are converted to CSR before
              inverse transformation.
  
          threshold : float or None
              Threshold used in the binary and multi-label cases.
  
              Use 0 when ``Y`` contains the output of decision_function
              (classifier).
              Use 0.5 when ``Y`` contains the output of predict_proba.
  
              If None, the threshold is assumed to be half way between
              neg_label and pos_label.
  
          Returns
          -------
          y : numpy array or CSR matrix of shape [n_samples] Target values.
  
          Notes
          -----
          In the case when the binary labels are fractional
          (probabilistic), inverse_transform chooses the class with the
          greatest value. Typically, this allows to use the output of a
          linear model's decision_function method directly as the input
          of inverse_transform.
          """
          check_is_fitted(self)
  
          if threshold is None:
              threshold = (self.pos_label + self.neg_label) / 2.
  
          if self.y_type_ == "multiclass":
              y_inv = _inverse_binarize_multiclass(Y, self.classes_)
          else:
              y_inv = _inverse_binarize_thresholding(Y, self.y_type_,
                                                     self.classes_, threshold)
  
          if self.sparse_input_:
              y_inv = sp.csr_matrix(y_inv)
          elif sp.issparse(y_inv):
              y_inv = y_inv.toarray()
  
          return y_inv
function_tokens: def inverse_transform ( self , Y , threshold = None ) : check_is_fitted ( self ) if threshold is None : threshold = ( self . pos_label + self . neg_label ) / 2. if self . y_type_ == "multiclass" : y_inv = _inverse_binarize_multiclass ( Y , self . classes_ ) else : y_inv = _inverse_binarize_thresholding ( Y , self . y_type_ , self . classes_ , threshold ) if self . sparse_input_ : y_inv = sp . csr_matrix ( y_inv ) elif sp . issparse ( y_inv ) : y_inv = y_inv . toarray ( ) return y_inv