class_docstr: Base class for forest of trees-based classifiers.
  
  Warning: This class should not be used directly. Use derived classes
  instead.
class_docstr_tok: ["Base","class","for","forest","of","trees-based","classifiers",".","Warning",":","This","class","should","not","be","used","directly",".","Use","derived","classes","instead","."]
docstr: Predict class for X.
  
  The predicted class of an input sample is a vote by the trees in
  the forest, weighted by their probability estimates. That is,
  the predicted class is the one with highest mean probability
  estimate across the trees.
  
  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
  -------
  y : array of shape = [n_samples] or [n_samples, n_outputs]
      The predicted classes.
docstr_tok: ["Predict","class","for","X",".","The","predicted","class","of","an","input","sample","is","a","vote","by","the","trees","in","the","forest",",","weighted","by","their","probability","estimates",".","That","is",",","the","predicted","class","is","the","one","with","highest","mean","probability","estimate","across","the","trees",".","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","--","--","--","-","y",":","array","of","shape","=","[","n_samples","]","or","[","n_samples",",","n_outputs","]","The","predicted","classes","."]
code: def predict(self, X):
      """Predict class for X.
  
      The predicted class of an input sample is a vote by the trees in
      the forest, weighted by their probability estimates. That is,
      the predicted class is the one with highest mean probability
      estimate across the trees.
  
      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
      -------
      y : array of shape = [n_samples] or [n_samples, n_outputs]
          The predicted classes.
      """
      proba = self.predict_proba(X)
  
      if self.n_outputs_ == 1:
          return self.classes_.take(np.argmax(proba, axis=1), axis=0)
  
      else:
          n_samples = proba[0].shape[0]
          predictions = np.zeros((n_samples, self.n_outputs_))
  
          for k in range(self.n_outputs_):
              predictions[:, k] = self.classes_[k].take(
                  np.argmax(proba[k], axis=1), axis=0
              )
  
          return predictions
  
imports: from __future__ import division
  import warnings
  from warnings import warn
  from abc import ABCMeta, abstractmethod
  import numpy
  from scipy.sparse import issparse
  from scipy.sparse import hstack
  from ..base import ClassifierMixin, RegressorMixin
  from ..externals.joblib import Parallel, delayed
  from ..externals import six
  from ..feature_selection.from_model import _LearntSelectorMixin
  from ..metrics import r2_score
  from ..preprocessing import OneHotEncoder
  from ..tree import DecisionTreeClassifier, DecisionTreeRegressor, ExtraTreeClassifier, ExtraTreeRegressor
  from ..tree._tree import DTYPE, DOUBLE
  from ..utils import check_random_state, check_array, compute_sample_weight
  from ..exceptions import DataConversionWarning, NotFittedError
  from .base import BaseEnsemble, _partition_estimators
  from ..utils.fixes import bincount, parallel_helper
  from ..utils.multiclass import check_classification_targets
label_desc: Use image node_id 4 for calling the ForestClassifier obj's underlying member method code with example usage: obj.predict(X) and returns: self, predictions