class_docstr: Gradient boosted propensity score model with optional early stopping.
  
  Notes
  -----
  Please see the xgboost documentation for more information on gradient boosting tuning parameters:
  https://xgboost.readthedocs.io/en/latest/python/python_api.html
class_docstr_tok: ["Gradient","boosted","propensity","score","model","with","optional","early","stopping",".","Notes","--","--","-","Please","see","the","xgboost","documentation","for","more","information","on","gradient","boosting","tuning","parameters",":","https",":","\/\/xgboost.readthedocs.io\/en\/latest\/python\/python_api.html"]
docstr: Predict propensity scores.
  
  Args:
      X (numpy.ndarray): a feature matrix
  
  Returns:
      (numpy.ndarray): Propensity scores between 0 and 1.
docstr_tok: ["Predict","propensity","scores",".","Args",":","X","(","numpy.ndarray",")",":","a","feature","matrix","Returns",":","(","numpy.ndarray",")",":","Propensity","scores","between","0","and","1","."]
code: def predict(self, X):
      """
      Predict propensity scores.
  
      Args:
          X (numpy.ndarray): a feature matrix
  
      Returns:
          (numpy.ndarray): Propensity scores between 0 and 1.
      """
      if self.early_stop:
          return np.clip(
              self.model.predict_proba(X)[:, 1],
              *self.clip_bounds,
          )
      else:
          return super(GradientBoostedPropensityModel, self).predict(X)
  
imports: from abc import ABCMeta, abstractmethod
  import logging
  import numpy
  from pygam import LogisticGAM, s
  from sklearn.metrics import roc_auc_score
  from sklearn.linear_model import LogisticRegressionCV
  from sklearn.model_selection import StratifiedKFold, train_test_split
  import xgboost
label_desc: Use image node_id 4 for calling the GradientBoostedPropensityModel obj's underlying member method code with example usage: obj.predict(X) and returns: np, super