class_docstr: Abstract base class for Gradient Boosting.
class_docstr_tok: ["Abstract","base","class","for","Gradient","Boosting","."]
docstr: The impurity-based feature importances.
  
  The higher, the more important the feature.
  The importance of a feature is computed as the (normalized)
  total reduction of the criterion brought by that feature.  It is also
  known as the Gini importance.
  
  Warning: impurity-based feature importances can be misleading for
  high cardinality features (many unique values). See
  :func:`sklearn.inspection.permutation_importance` as an alternative.
  
  Returns
  -------
  feature_importances_ : ndarray of shape (n_features,)
      The values of this array sum to 1, unless all trees are single node
      trees consisting of only the root node, in which case it will be an
      array of zeros.
code: def feature_importances_(self):
      """The impurity-based feature importances.
  
      The higher, the more important the feature.
      The importance of a feature is computed as the (normalized)
      total reduction of the criterion brought by that feature.  It is also
      known as the Gini importance.
  
      Warning: impurity-based feature importances can be misleading for
      high cardinality features (many unique values). See
      :func:`sklearn.inspection.permutation_importance` as an alternative.
  
      Returns
      -------
      feature_importances_ : ndarray of shape (n_features,)
          The values of this array sum to 1, unless all trees are single node
          trees consisting of only the root node, in which case it will be an
          array of zeros.
      """
      self._check_initialized()
  
      relevant_trees = [
          tree
          for stage in self.estimators_
          for tree in stage
          if tree.tree_.node_count > 1
      ]
      if not relevant_trees:
          # degenerate case where all trees have only one node
          return np.zeros(shape=self.n_features_in_, dtype=np.float64)
  
      relevant_feature_importances = [
          tree.tree_.compute_feature_importances(normalize=False)
          for tree in relevant_trees
      ]
      avg_feature_importances = np.mean(
          relevant_feature_importances, axis=0, dtype=np.float64
      )
      return avg_feature_importances / np.sum(avg_feature_importances)
  
imports: import warnings
  from abc import ABCMeta, abstractmethod
  from numbers import Integral, Real
  from time import time
  import numpy
  from scipy.sparse import csc_matrix, csr_matrix, issparse
  from ..base import ClassifierMixin, RegressorMixin, _fit_context, is_classifier
  from ..exceptions import NotFittedError
  from ..model_selection import train_test_split
  from ..tree import DecisionTreeRegressor
  from ..tree._tree import DOUBLE, DTYPE
  from ..utils import check_array, check_random_state, column_or_1d
  from ..utils._param_validation import HasMethods, Interval, StrOptions
  from ..utils.multiclass import check_classification_targets
  from ..utils.validation import _check_sample_weight, check_is_fitted
  from .None import _gb_losses
  from ._base import BaseEnsemble
  from ._gradient_boosting import _random_sample_mask, predict_stage, predict_stages
label_desc: Use image node_id 16 for calling the BaseGradientBoosting obj's underlying member method code with example usage: obj.feature_importances_() and returns: unknown, np