class_docstr: Abstract base class for Gradient Boosting.
class_docstr_tok: ["Abstract","base","class","for","Gradient","Boosting","."]
docstr: Add additional ``n_estimators`` entries to all attributes.
code: def _resize_state(self):
      """Add additional ``n_estimators`` entries to all attributes."""
      # self.n_estimators is the number of additional est to fit
      total_n_estimators = self.n_estimators
      if total_n_estimators < self.estimators_.shape[0]:
          raise ValueError(
              "resize with smaller n_estimators %d < %d"
              % (total_n_estimators, self.estimators_[0])
          )
  
      self.estimators_ = np.resize(
          self.estimators_, (total_n_estimators, self._loss.K)
      )
      self.train_score_ = np.resize(
          self.train_score_, total_n_estimators
      )
      if self.subsample < 1 or hasattr(self, "oob_improvement_"):
          # if do oob resize arrays or create new if not available
          if hasattr(self, "oob_improvement_"):
              self.oob_improvement_ = np.resize(
                  self.oob_improvement_, total_n_estimators
              )
              self.oob_scores_ = np.resize(
                  self.oob_scores_, total_n_estimators
              )
              self.oob_score_ = np.nan
          else:
              self.oob_improvement_ = np.zeros(
                  (total_n_estimators,), dtype=np.float64
              )
              self.oob_scores_ = np.zeros(
                  (total_n_estimators,), dtype=np.float64
              )
              self.oob_score_ = np.nan
  
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 7 for calling the BaseGradientBoosting obj's underlying member method code with example usage: obj._resize_state() without return types