class_docstr: Abstract base class for Gradient Boosting.
class_docstr_tok: ["Abstract","base","class","for","Gradient","Boosting","."]
code: def _check_params(self):
      if self.loss == "log_loss":
          loss_class = (
              _gb_losses.MultinomialDeviance
              if len(self.classes_) > 2
              else _gb_losses.BinomialDeviance
          )
      else:
          loss_class = _gb_losses.LOSS_FUNCTIONS[self.loss]
  
      if is_classifier(self):
          self._loss = loss_class(self.n_classes_)
      elif self.loss in ("huber", "quantile"):
          self._loss = loss_class(self.alpha)
      else:
          self._loss = loss_class()
  
      if isinstance(self.max_features, str):
          if self.max_features == "auto":
              if is_classifier(self):
                  max_features = max(
                      1, int(np.sqrt(self.n_features_in_))
                  )
              else:
                  max_features = self.n_features_in_
          elif self.max_features == "sqrt":
              max_features = max(1, int(np.sqrt(self.n_features_in_)))
          else:  # self.max_features == "log2"
              max_features = max(1, int(np.log2(self.n_features_in_)))
      elif self.max_features is None:
          max_features = self.n_features_in_
      elif isinstance(self.max_features, Integral):
          max_features = self.max_features
      else:  # float
          max_features = max(
              1, int(self.max_features * self.n_features_in_)
          )
  
      self.max_features_ = max_features
  
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 4 for calling the BaseGradientBoosting obj's underlying member method code with example usage: obj._check_params() without return types