original_docstring: Predict class probabilities for X.
  
          NOTE: We need to override parent method's predict() so we can
          allow for Kotlowski and Slowinski style monotone ensembling.
  
          NOTE: because these probabilities are calculated from the component
          binary classifiers, sometimes small negative numbers can result.
          The predicted class probabilities of an input sample are computed as
          the mean predicted class probabilities of the trees in the forest. The
          class probability of a single tree is the fraction of samples of the
          same class in a leaf.
  
          Parameters
          ----------
          X : array-like or sparse matrix of shape = [n_samples, n_features]
              The input samples. Internally, its dtype will be converted to
              ``dtype=np.float32``. If a sparse matrix is provided, it will be
              converted into a sparse ``csr_matrix``.
  
          Returns
          -------
          p : array of shape = [n_samples, n_classes], or a list of n_outputs
              such arrays if n_outputs > 1.
              The class probabilities of the input samples. The order of the
              classes corresponds to that in the attribute `classes_`.
          
docstring: Predict class probabilities for X.
  NOTE: We need to override parent method's predict() so we can
  allow for Kotlowski and Slowinski style monotone ensembling.
  
  because these probabilities are calculated from the component
  binary classifiers, sometimes small negative numbers can result.
  The predicted class probabilities of an input sample are computed as
  the mean predicted class probabilities of the trees in the forest. The
  class probability of a single tree is the fraction of samples of the
  same class in a leaf.
  
  Parameters
  
  X : array-like or sparse matrix of shape = [n_samples, n_features]
  The input samples. Internally, its dtype will be converted to
  ``dtype=np.float32``. If a sparse matrix is provided, it will be
  converted into a sparse ``csr_matrix``.
  
  Returns
  
  p : array of shape = [n_samples, n_classes], or a list of n_outputs
  such arrays if n_outputs > 1.
  The class probabilities of the input samples. The order of the
  classes corresponds to that in the attribute `classes_`.
docstring_tokens: Predict class probabilities for X . NOTE : We need to override parent method ' s predict () so we can allow for Kotlowski and Slowinski style monotone ensembling . because these probabilities are calculated from the component binary classifiers sometimes small negative numbers can result . The predicted class probabilities of an input sample are computed as the mean predicted class probabilities of the trees in the forest . The class probability of a single tree is the fraction of samples of the same class in a leaf . Parameters X : array - like or sparse matrix of shape = [ n_samples n_features ] The input samples . Internally its dtype will be converted to ` ` dtype = np . float32 ` ` . If a sparse matrix is provided it will be converted into a sparse ` ` csr_matrix ` ` . Returns p : array of shape = [ n_samples n_classes ] or a list of n_outputs such arrays if n_outputs > 1 . The class probabilities of the input samples . The order of the classes corresponds to that in the attribute ` classes_ ` .
code: def predict_proba(self, X):
          """Predict class probabilities for X.
  
          NOTE: We need to override parent method's predict() so we can
          allow for Kotlowski and Slowinski style monotone ensembling.
  
          NOTE: because these probabilities are calculated from the component
          binary classifiers, sometimes small negative numbers can result.
          The predicted class probabilities of an input sample are computed as
          the mean predicted class probabilities of the trees in the forest. The
          class probability of a single tree is the fraction of samples of the
          same class in a leaf.
  
          Parameters
          ----------
          X : array-like or sparse matrix of shape = [n_samples, n_features]
              The input samples. Internally, its dtype will be converted to
              ``dtype=np.float32``. If a sparse matrix is provided, it will be
              converted into a sparse ``csr_matrix``.
  
          Returns
          -------
          p : array of shape = [n_samples, n_classes], or a list of n_outputs
              such arrays if n_outputs > 1.
              The class probabilities of the input samples. The order of the
              classes corresponds to that in the attribute `classes_`.
          """
          proba = super().predict_proba(X)
          # if self.n_classes_ > 2:
          #     proba_cum = self.predict_cum_proba(X)
          #     proba = np.zeros([X.shape[0], self.n_classes_])
          #     for i in range(self.n_classes_):
          #         if i==0:
          #             proba[:,i] = 1.-proba_cum[:,i]
          #         elif i==self.n_classes_-1:
          #             proba[:,i] = proba_cum[:,i-1]
          #         else:
          #             proba[:,i] = proba_cum[:,i-1]-proba_cum[:,i]
          # else: # binary
          #     proba = super().predict_proba(X)
  
          return proba
code_tokens: def predict_proba ( self , X ) : proba = super ( ) . predict_proba ( X ) return proba
short_docstring: Predict class probabilities for X.
short_docstring_tokens: Predict class probabilities for X .
comment: """Predict class probabilities for X.
  
          NOTE: We need to override parent method's predict() so we can
          allow for Kotlowski and Slowinski style monotone ensembling.
  
          NOTE: because these probabilities are calculated from the component
          binary classifiers, sometimes small negative numbers can result.
          The predicted class probabilities of an input sample are computed as
          the mean predicted class probabilities of the trees in the forest. The
          class probability of a single tree is the fraction of samples of the
          same class in a leaf.
  
          Parameters
          ----------
          X : array-like or sparse matrix of shape = [n_samples, n_features]
              The input samples. Internally, its dtype will be converted to
              ``dtype=np.float32``. If a sparse matrix is provided, it will be
              converted into a sparse ``csr_matrix``.
  
          Returns
          -------
          p : array of shape = [n_samples, n_classes], or a list of n_outputs
              such arrays if n_outputs > 1.
              The class probabilities of the input samples. The order of the
              classes corresponds to that in the attribute `classes_`.
          """$SEP$# if self.n_classes_ > 2:$SEP$#     proba_cum = self.predict_cum_proba(X)$SEP$#     proba = np.zeros([X.shape[0], self.n_classes_])$SEP$#     for i in range(self.n_classes_):$SEP$#         if i==0:$SEP$#             proba[:,i] = 1.-proba_cum[:,i]$SEP$#         elif i==self.n_classes_-1:$SEP$#             proba[:,i] = proba_cum[:,i-1]$SEP$#         else:$SEP$#             proba[:,i] = proba_cum[:,i-1]-proba_cum[:,i]$SEP$# else: # binary$SEP$#     proba = super().predict_proba(X)