docstr: Builds tau models (using X to predict estimated/actual tau) for each treatment group.
docstr_tok: ["Builds","tau","models","(","using","X","to","predict","estimated\/actual","tau",")","for","each","treatment","group","."]
code: def build_new_tau_models(self):
      """
      Builds tau models (using X to predict estimated/actual tau) for each treatment group.
      """
      if self.method in ("permutation"):
          (
              self.X_train,
              self.X_test,
              self.tau_train,
              self.tau_test,
          ) = train_test_split(
              self.X,
              self.tau,
              test_size=self.test_size,
              random_state=self.random_state,
          )
      else:
          self.X_train, self.tau_train = self.X, self.tau
  
      if self.r_learners is not None:
          self.models_tau = deepcopy(self.r_learners)
      else:
          self.models_tau = {
              group: deepcopy(self.model_tau) for group in self.classes
          }
          for group, idx in self.classes.items():
              self.models_tau[group].fit(
                  self.X_train, self.tau_train[:, idx]
              )
  
imports: import pandas
  import shap
  import matplotlib.pyplot
  from lightgbm import LGBMRegressor
  from sklearn.inspection import permutation_importance
  from sklearn.model_selection import train_test_split
  from copy import deepcopy
  from causalml.inference.meta.utils import convert_pd_to_np
label_desc: Use image node_id 4 for calling the Explainer obj's underlying member method code with example usage: obj.build_new_tau_models() without return types