class_docstr: A Causal Tree regressor class.
  The Causal Tree is a decision tree regressor with a split criteria for treatment effects.
  Details are available at Athey and Imbens (2015) (https://arxiv.org/abs/1504.01132)
class_docstr_tok: ["A","Causal","Tree","regressor","class",".","The","Causal","Tree","is","a","decision","tree","regressor","with","a","split","criteria","for","treatment","effects",".","Details","are","available","at","Athey","and","Imbens","(","2015",")","(","https",":","\/\/arxiv.org\/abs\/1504.01132",")"]
docstr: Fit the Causal Tree model and predict treatment effects.
  
  Args:
      X (np.matrix): a feature matrix
      treatment (np.array): a treatment vector
      y (np.array): an outcome vector
      return_ci (bool): whether to return confidence intervals
      n_bootstraps (int): number of bootstrap iterations
      bootstrap_size (int): number of samples per bootstrap
      n_jobs (int): the number of jobs for bootstrap
      verbose (str): whether to output progress logs
  
  Returns:
     (tuple):
  
       - te (numpy.ndarray): Predictions of treatment effects.
       - te_lower (numpy.ndarray, optional): lower bounds of treatment effects
       - te_upper (numpy.ndarray, optional): upper bounds of treatment effects
docstr_tok: ["Fit","the","Causal","Tree","model","and","predict","treatment","effects",".","Args",":","X","(","np.matrix",")",":","a","feature","matrix","treatment","(","np.array",")",":","a","treatment","vector","y","(","np.array",")",":","an","outcome","vector","return_ci","(","bool",")",":","whether","to","return","confidence","intervals","n_bootstraps","(","int",")",":","number","of","bootstrap","iterations","bootstrap_size","(","int",")",":","number","of","samples","per","bootstrap","n_jobs","(","int",")",":","the","number","of","jobs","for","bootstrap","verbose","(","str",")",":","whether","to","output","progress","logs","Returns",":","(","tuple",")",":","-","te","(","numpy.ndarray",")",":","Predictions","of","treatment","effects",".","-","te_lower","(","numpy.ndarray",",","optional",")",":","lower","bounds","of","treatment","effects","-","te_upper","(","numpy.ndarray",",","optional",")",":","upper","bounds","of","treatment","effects"]
code: def fit_predict(
      self,
      X: np.ndarray,
      treatment: np.ndarray,
      y: np.ndarray,
      return_ci: bool = False,
      n_bootstraps: int = 1000,
      bootstrap_size: int = 10000,
      n_jobs: int = 1,
      verbose: bool = False,
  ) -> tuple:
      """Fit the Causal Tree model and predict treatment effects.
  
      Args:
          X (np.matrix): a feature matrix
          treatment (np.array): a treatment vector
          y (np.array): an outcome vector
          return_ci (bool): whether to return confidence intervals
          n_bootstraps (int): number of bootstrap iterations
          bootstrap_size (int): number of samples per bootstrap
          n_jobs (int): the number of jobs for bootstrap
          verbose (str): whether to output progress logs
  
      Returns:
         (tuple):
  
           - te (numpy.ndarray): Predictions of treatment effects.
           - te_lower (numpy.ndarray, optional): lower bounds of treatment effects
           - te_upper (numpy.ndarray, optional): upper bounds of treatment effects
      """
      self.fit(X=X, treatment=treatment, y=y)
      te = self.predict(X=X)
  
      if return_ci:
          te_bootstraps = self.bootstrap_pool(
              X=X,
              treatment=treatment,
              y=y,
              n_bootstraps=n_bootstraps,
              bootstrap_size=bootstrap_size,
              n_jobs=n_jobs,
              verbose=verbose,
          )
          te_lower = np.percentile(
              te_bootstraps, (self.alpha / 2) * 100, axis=0
          )
          te_upper = np.percentile(
              te_bootstraps, (1 - self.alpha / 2) * 100, axis=0
          )
          return te, te_lower, te_upper
      else:
          return te
  
imports: import logging
  import sys
  from typing import Union
  import tqdm
  import numpy
  from numpy import float32
  from pathos.pools import ProcessPool
  from scipy.stats import norm
  from sklearn.base import RegressorMixin
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_is_fitted
  from causalml.inference.meta.utils import check_treatment_vector
  from ._tree import BaseCausalDecisionTree
  from ..utils import get_tree_leaves_mask, timeit
label_desc: Use image node_id 4 for calling the CausalTreeRegressor obj's underlying member method code with example usage: obj.fit_predict(X, treatment, y, return_ci, n_bootstraps, bootstrap_size, n_jobs, verbose) and returns: te,  te_lower,  te_upper, te