class_docstr: A parent class for DR-learner regressor classes.
  
  A DR-learner estimates treatment effects with machine learning models.
  
  Details of DR-learner are available at Kennedy (2020) (https://arxiv.org/abs/2004.14497).
class_docstr_tok: ["A","parent","class","for","DR-learner","regressor","classes",".","A","DR-learner","estimates","treatment","effects","with","machine","learning","models",".","Details","of","DR-learner","are","available","at","Kennedy","(","2020",")","(","https",":","\/\/arxiv.org\/abs\/2004.14497",")","."]
docstr: Initialize a DR-learner.
  
  Args:
      learner (optional): a model to estimate outcomes and treatment effects in both the control and treatment
          groups
      control_outcome_learner (optional): a model to estimate outcomes in the control group
      treatment_outcome_learner (optional): a model to estimate outcomes in the treatment group
      treatment_effect_learner (optional): a model to estimate treatment effects in the treatment group
      ate_alpha (float, optional): the confidence level alpha of the ATE estimate
      control_name (str or int, optional): name of control group
docstr_tok: ["Initialize","a","DR-learner",".","Args",":","learner","(","optional",")",":","a","model","to","estimate","outcomes","and","treatment","effects","in","both","the","control","and","treatment","groups","control_outcome_learner","(","optional",")",":","a","model","to","estimate","outcomes","in","the","control","group","treatment_outcome_learner","(","optional",")",":","a","model","to","estimate","outcomes","in","the","treatment","group","treatment_effect_learner","(","optional",")",":","a","model","to","estimate","treatment","effects","in","the","treatment","group","ate_alpha","(","float",",","optional",")",":","the","confidence","level","alpha","of","the","ATE","estimate","control_name","(","str","or","int",",","optional",")",":","name","of","control","group"]
code: def __init__(
      self,
      learner=None,
      control_outcome_learner=None,
      treatment_outcome_learner=None,
      treatment_effect_learner=None,
      ate_alpha=0.05,
      control_name=0,
  ):
      """Initialize a DR-learner.
  
      Args:
          learner (optional): a model to estimate outcomes and treatment effects in both the control and treatment
              groups
          control_outcome_learner (optional): a model to estimate outcomes in the control group
          treatment_outcome_learner (optional): a model to estimate outcomes in the treatment group
          treatment_effect_learner (optional): a model to estimate treatment effects in the treatment group
          ate_alpha (float, optional): the confidence level alpha of the ATE estimate
          control_name (str or int, optional): name of control group
      """
      assert (learner is not None) or (
          (control_outcome_learner is not None)
          and (treatment_outcome_learner is not None)
          and (treatment_effect_learner is not None)
      )
  
      if control_outcome_learner is None:
          self.model_mu_c = deepcopy(learner)
      else:
          self.model_mu_c = control_outcome_learner
  
      if treatment_outcome_learner is None:
          self.model_mu_t = deepcopy(learner)
      else:
          self.model_mu_t = treatment_outcome_learner
  
      if treatment_effect_learner is None:
          self.model_tau = deepcopy(learner)
      else:
          self.model_tau = treatment_effect_learner
  
      self.ate_alpha = ate_alpha
      self.control_name = control_name
  
      self.propensity = None
  
imports: from copy import deepcopy
  import logging
  import numpy
  import pandas
  from scipy.stats import norm
  from sklearn.model_selection import cross_val_predict, KFold
  from tqdm import tqdm
  from xgboost import XGBRegressor
  from causalml.inference.meta.base import BaseLearner
  from causalml.inference.meta.utils import check_treatment_vector, check_p_conditions, convert_pd_to_np
  from causalml.metrics import regression_metrics, classification_metrics
  from causalml.propensity import compute_propensity_score
label_desc: Use image node_id 1 to create a new BaseDRLearner object from inherited base classes: BaseLearner with example: obj = BaseDRLearner(learner, control_outcome_learner, treatment_outcome_learner, treatment_effect_learner, ate_alpha, control_name)