class_docstr: A Learner that learns a treatment assignment policy with observational data using doubly robust estimator of causal
  effect for binary treatment.
  
  Details of the policy learner are available at Athey and Wager (2018) (https://arxiv.org/abs/1702.02896).
class_docstr_tok: ["A","Learner","that","learns","a","treatment","assignment","policy","with","observational","data","using","doubly","robust","estimator","of","causal","effect","for","binary","treatment",".","Details","of","the","policy","learner","are","available","at","Athey","and","Wager","(","2018",")","(","https",":","\/\/arxiv.org\/abs\/1702.02896",")","."]
code: def _outcome_estimate(self, X, w, y):
      self._y_pred = np.zeros(len(y))
      self._tau_pred = np.zeros(len(y))
  
      for train_index, test_index in self.cv.split(y):
          X_train, X_test = X[train_index], X[test_index]
          w_train, w_test = w[train_index], w[test_index]
          y_train, y_test = y[train_index], y[test_index]
  
          self.model_mu.fit(
              np.concatenate([X_train, w_train.reshape(-1, 1)], axis=1),
              y_train,
          )
          self._y_pred[test_index] = self.model_mu.predict(
              np.concatenate([X_test, w_test.reshape(-1, 1)], axis=1)
          )
          self._tau_pred[test_index] = self.model_mu.predict(
              np.concatenate(
                  [X_test, np.ones((len(w_test), 1))], axis=1
              )
          ) - self.model_mu.predict(
              np.concatenate(
                  [X_test, np.zeros((len(w_test), 1))], axis=1
              )
          )
  
file_path: causalml/causalml/optimize/policylearner.py
imports: import logging
  import numpy
  from causalml.propensity import compute_propensity_score
  from sklearn.ensemble import GradientBoostingRegressor, GradientBoostingClassifier
  from sklearn.model_selection import cross_val_predict, KFold
  from sklearn.tree import DecisionTreeClassifier
label_desc: Use image node_id 3 for calling the PolicyLearner obj's underlying member method code with example usage: obj._outcome_estimate(X, w, y) without return types