class_docstr: Base class for histogram-based gradient boosting estimators.
class_docstr_tok: ["Base","class","for","histogram-based","gradient","boosting","estimators","."]
docstr: Compute raw predictions of ``X`` for each iteration.
  
  This method allows monitoring (i.e. determine error on testing set)
  after each stage.
  
  Parameters
  ----------
  X : array-like of shape (n_samples, n_features)
      The input samples.
  
  Yields
  ------
  raw_predictions : generator of ndarray of shape             (n_samples, n_trees_per_iteration)
      The raw predictions of the input samples. The order of the
      classes corresponds to that in the attribute :term:`classes_`.
docstr_tok: ["Compute","raw","predictions","of","``","X","``","for","each","iteration",".","This","method","allows","monitoring","(","i.e",".","determine","error","on","testing","set",")","after","each","stage",".","Parameters","--","--","--","--","--","X",":","array-like","of","shape","(","n_samples",",","n_features",")","The","input","samples",".","Yields","--","--","--","raw_predictions",":","generator","of","ndarray","of","shape","(","n_samples",",","n_trees_per_iteration",")","The","raw","predictions","of","the","input","samples",".","The","order","of","the","classes","corresponds","to","that","in","the","attribute",":","term",":","`","classes_","`","."]
code: def _staged_raw_predict(self, X):
      """Compute raw predictions of ``X`` for each iteration.
  
          This method allows monitoring (i.e. determine error on testing set)
          after each stage.
  
          Parameters
          ----------
          X : array-like of shape (n_samples, n_features)
              The input samples.
  
          Yields
          ------
          raw_predictions : generator of ndarray of shape \
              (n_samples, n_trees_per_iteration)
              The raw predictions of the input samples. The order of the
              classes corresponds to that in the attribute :term:`classes_`.
          """
      X = self._validate_data(
          X, dtype=X_DTYPE, force_all_finite=False, reset=False
      )
      check_is_fitted(self)
      if X.shape[1] != self._n_features:
          raise ValueError(
              "X has {} features but this estimator was trained with "
              "{} features.".format(X.shape[1], self._n_features)
          )
      n_samples = X.shape[0]
      raw_predictions = np.zeros(
          shape=(n_samples, self.n_trees_per_iteration_),
          dtype=self._baseline_prediction.dtype,
          order="F",
      )
      raw_predictions += self._baseline_prediction
  
      # We intentionally decouple the number of threads used at prediction
      # time from the number of threads used at fit time because the model
      # can be deployed on a different machine for prediction purposes.
      n_threads = _openmp_effective_n_threads()
      for iteration in range(len(self._predictors)):
          self._predict_iterations(
              X,
              self._predictors[iteration : iteration + 1],
              raw_predictions,
              is_binned=False,
              n_threads=n_threads,
          )
          yield raw_predictions.copy()
  
imports: import itertools
  from abc import ABC, abstractmethod
  from functools import partial
  from numbers import Integral, Real
  from timeit import default_timer
  import numpy
  from ..._loss.loss import _LOSSES, BaseLoss, HalfBinomialLoss, HalfGammaLoss, HalfMultinomialLoss, HalfPoissonLoss, PinballLoss
  from ...base import BaseEstimator, ClassifierMixin, RegressorMixin, _fit_context, is_classifier
  from ...metrics import check_scoring
  from ...model_selection import train_test_split
  from ...preprocessing import LabelEncoder
  from ...utils import check_random_state, compute_sample_weight, resample
  from ...utils._openmp_helpers import _openmp_effective_n_threads
  from ...utils._param_validation import Interval, RealNotInt, StrOptions
  from ...utils.multiclass import check_classification_targets
  from ...utils.validation import _check_monotonic_cst, _check_sample_weight, check_consistent_length, check_is_fitted
  from ._gradient_boosting import _update_raw_predictions
  from .binning import _BinMapper
  from .common import G_H_DTYPE, X_DTYPE, Y_DTYPE
  from .grower import TreeGrower
label_desc: Use image node_id 17 for calling the BaseHistGradientBoosting obj's underlying member method code with example usage: obj._staged_raw_predict(X) without return types