class_docstr: Wrapper for boosting models which limits the number of estimators being used in the prediction.
docstr: Construct wrapper for model with `predict` and `predict_proba` methods.
  
  Parameters
  ----------
  model
      boosting model to wrap.
  step
      Number of iterations/estimators to limit the model on predictions.
docstr_tok: ["Construct","wrapper","for","model","with","`","predict","`","and","`","predict_proba","`","methods",".","Parameters","--","--","--","--","--","model","boosting","model","to","wrap",".","step","Number","of","iterations\/estimators","to","limit","the","model","on","predictions","."]
code: def __init__(self, model, step):
      """Construct wrapper for model with `predict` and `predict_proba` methods.
  
      Parameters
      ----------
      model
          boosting model to wrap.
      step
          Number of iterations/estimators to limit the model on predictions.
      """
      self.model_class = get_model_of_pipeline(model).__class__.__name__
      self.step = step
      if self.model_class in [
          "AdaBoostClassifier",
          "GradientBoostingClassifier",
          "AdaBoostRegressor",
          "GradientBoostingRegressor",
      ]:
          self.model = deepcopy(model)
          if isinstance(model, Pipeline):
              internal_estimator = get_model_of_pipeline(self.model)
              internal_estimator.estimators_ = (
                  internal_estimator.estimators_[: self.step]
              )
          else:
              self.model.estimators_ = self.model.estimators_[
                  : self.step
              ]
      else:
          self.model = model
  
imports: from copy import deepcopy
  from typing import TYPE_CHECKING, Callable, Tuple, Union
  import numpy
  import plotly.graph_objects
  from sklearn.pipeline import Pipeline
  from deepchecks.core import CheckResult, ConditionCategory, ConditionResult
  from deepchecks.core.errors import DeepchecksValueError, ModelValidationError
  from deepchecks.tabular import Context, TrainTestCheck
  from deepchecks.utils.docref import doclink
  from deepchecks.utils.model import get_model_of_pipeline
  from deepchecks.utils.strings import format_percent
label_desc: Use image node_id 1 to create a new PartialBoostingModel object  with example: obj = PartialBoostingModel(model, step)