class_docstr: Tree-based GAM classifier.
  Uses cyclical boosting to fit a GAM with small trees.
  Simplified version of the explainable boosting machine described in https://github.com/interpretml/interpret
  Only works for binary classification.
  Fits a scalar bias to the mean.
code: def fit(self, X, y, sample_weight=None):
      X, y = check_X_y(X, y, accept_sparse=False, multi_output=False)
      if isinstance(self, ClassifierMixin):
          check_classification_targets(y)
          self.classes_, y = np.unique(y, return_inverse=True)
  
      sample_weight = _check_sample_weight(sample_weight, X, dtype=None)
  
      # split into train and validation for early stopping
      (
          X_train,
          X_val,
          y_train,
          y_val,
          sample_weight_train,
          sample_weight_val,
      ) = train_test_split(
          X,
          y,
          sample_weight,
          test_size=self.validation_frac,
          random_state=self.random_state,
          stratify=y if isinstance(self, ClassifierMixin) else None,
      )
  
      self.estimators_ = []
      self.bias_ = np.mean(y)
  
      self._cyclic_boost(
          X_train,
          y_train,
          sample_weight_train,
          X_val,
          y_val,
          sample_weight_val,
      )
  
      self.mse_val_ = self._calc_mse(X_val, y_val, sample_weight_val)
  
      return self
  
imports: from copy import deepcopy
  import numpy
  import pandas
  from sklearn.base import BaseEstimator
  from sklearn.tree import DecisionTreeRegressor
  from sklearn.utils.validation import check_is_fitted
  from sklearn.utils import check_array
  from sklearn.utils.multiclass import check_classification_targets
  from sklearn.utils.validation import check_X_y
  from sklearn.utils.validation import _check_sample_weight
  from sklearn.model_selection import train_test_split
  from sklearn.metrics import accuracy_score, roc_auc_score
  from tqdm import tqdm
  import imodels
  from sklearn.base import RegressorMixin, ClassifierMixin
label_desc: Use image node_id 2 for calling the TreeGAMSimple obj's underlying member method code with example usage: obj.fit(X, y, sample_weight) and returns: self