parameters: (self, X)
docstring: Predict class log-probabilities for X.
  
          The predicted class log-probabilities of an input sample is computed as
          the log of the mean predicted class probabilities of the base
          estimators in the ensemble.
  
          Parameters
          ----------
          X : {array-like, sparse matrix} of shape = [n_samples, n_features]
              The training input samples. Sparse matrices are accepted only if
              they are supported by the base estimator.
  
          Returns
          -------
          p : array of shape = [n_samples, n_classes]
              The class log-probabilities of the input samples. The order of the
              classes corresponds to that in the attribute `classes_`.
docstring_summary: Predict class log-probabilities for X.
docstring_tokens: Predict class log - probabilities for X .
function: def predict_log_proba(self, X):
          """Predict class log-probabilities for X.
  
          The predicted class log-probabilities of an input sample is computed as
          the log of the mean predicted class probabilities of the base
          estimators in the ensemble.
  
          Parameters
          ----------
          X : {array-like, sparse matrix} of shape = [n_samples, n_features]
              The training input samples. Sparse matrices are accepted only if
              they are supported by the base estimator.
  
          Returns
          -------
          p : array of shape = [n_samples, n_classes]
              The class log-probabilities of the input samples. The order of the
              classes corresponds to that in the attribute `classes_`.
          """
          check_is_fitted(self, "classes_")
          if hasattr(self.base_estimator_, "predict_log_proba"):
              # Check data
              X = check_array(X, accept_sparse=['csr', 'csc'])
  
              if self.n_features_ != X.shape[1]:
                  raise ValueError("Number of features of the model must "
                                   "match the input. Model n_features is {0} "
                                   "and input n_features is {1} "
                                   "".format(self.n_features_, X.shape[1]))
  
              # Parallel loop
              n_jobs, n_estimators, starts = _partition_estimators(
                  self.n_estimators, self.n_jobs)
  
              all_log_proba = Parallel(n_jobs=n_jobs, verbose=self.verbose)(
                  delayed(_parallel_predict_log_proba)(
                      self.estimators_[starts[i]:starts[i + 1]],
                      self.estimators_features_[starts[i]:starts[i + 1]],
                      X,
                      self.n_classes_)
                  for i in range(n_jobs))
  
              # Reduce
              log_proba = all_log_proba[0]
  
              for j in range(1, len(all_log_proba)):
                  log_proba = np.logaddexp(log_proba, all_log_proba[j])
  
              log_proba -= np.log(self.n_estimators)
  
              return log_proba
  
          else:
              return np.log(self.predict_proba(X))
function_tokens: def predict_log_proba ( self , X ) : check_is_fitted ( self , "classes_" ) if hasattr ( self . base_estimator_ , "predict_log_proba" ) : # Check data X = check_array ( X , accept_sparse = [ 'csr' , 'csc' ] ) if self . n_features_ != X . shape [ 1 ] : raise ValueError ( "Number of features of the model must " "match the input. Model n_features is {0} " "and input n_features is {1} " "" . format ( self . n_features_ , X . shape [ 1 ] ) ) # Parallel loop n_jobs , n_estimators , starts = _partition_estimators ( self . n_estimators , self . n_jobs ) all_log_proba = Parallel ( n_jobs = n_jobs , verbose = self . verbose ) ( delayed ( _parallel_predict_log_proba ) ( self . estimators_ [ starts [ i ] : starts [ i + 1 ] ] , self . estimators_features_ [ starts [ i ] : starts [ i + 1 ] ] , X , self . n_classes_ ) for i in range ( n_jobs ) ) # Reduce log_proba = all_log_proba [ 0 ] for j in range ( 1 , len ( all_log_proba ) ) : log_proba = np . logaddexp ( log_proba , all_log_proba [ j ] ) log_proba -= np . log ( self . n_estimators ) return log_proba else : return np . log ( self . predict_proba ( X ) )