class_docstr: Compute effect of treatment using some regression function.
  
  Fits a regression model for estimating the outcome using treatment(s) and
  confounders.
  
  Base class for all regression models, inherited by
  LinearRegressionEstimator and GeneralizedLinearModelEstimator.
class_docstr_tok: ["Compute","effect","of","treatment","using","some","regression","function",".","Fits","a","regression","model","for","estimating","the","outcome","using","treatment","(","s",")","and","confounders",".","Base","class","for","all","regression","models",",","inherited","by","LinearRegressionEstimator","and","GeneralizedLinearModelEstimator","."]
docstr: Applies an intervention treatment_val to all rows in data_df, then uses self.model
  to predict outcomes. If data_df is None, will use self._data instead.
  If no model exists, one will be created. The outcomes of all samples are returned,
  allowing analysis of individual predictions in counterfactual treatment scenarios.
  :param data_df: data frame containing the data
  :param treatment_val: value for the treatment variable
  :returns: A list of outcome predictions.
docstr_tok: ["Applies","an","intervention","treatment_val","to","all","rows","in","data_df",",","then","uses","self.model","to","predict","outcomes",".","If","data_df","is","None",",","will","use","self._data","instead",".","If","no","model","exists",",","one","will","be","created",".","The","outcomes","of","all","samples","are","returned",",","allowing","analysis","of","individual","predictions","in","counterfactual","treatment","scenarios",".",":","param","data_df",":","data","frame","containing","the","data",":","param","treatment_val",":","value","for","the","treatment","variable",":","returns",":","A","list","of","outcome","predictions","."]
code: def interventional_outcomes(
      self, data_df: pd.DataFrame, treatment_val
  ):
      """
      Applies an intervention treatment_val to all rows in data_df, then uses self.model
      to predict outcomes. If data_df is None, will use self._data instead.
      If no model exists, one will be created. The outcomes of all samples are returned,
      allowing analysis of individual predictions in counterfactual treatment scenarios.
      :param data_df: data frame containing the data
      :param treatment_val: value for the treatment variable
      :returns: A list of outcome predictions.
      """
  
      if data_df is None:
          data_df = self._data.copy()
      else:
          data_df = data_df.copy()  # don't modify arg
  
      # Replace treatment values with value supplied; note: Don't change column datatype!
      original_type = data_df[
          self._target_estimand.treatment_variable
      ].dtypes
      data_df[self._target_estimand.treatment_variable] = treatment_val
      data_df[self._target_estimand.treatment_variable] = data_df[
          self._target_estimand.treatment_variable
      ].astype(original_type, copy=False)
  
      return self.predict(data_df)
  
file_path: dowhy/dowhy/causal_estimators/regression_estimator.py
imports: from typing import Any, List, Optional, Union
  import numpy
  import pandas
  import statsmodels.api
  from dowhy.causal_estimator import CausalEstimate, CausalEstimator, IdentifiedEstimand
  from dowhy.utils.encoding import one_hot_encode
label_desc: Use image node_id 9 for calling the RegressionEstimator obj's underlying member method code with example usage: obj.interventional_outcomes(data_df, treatment_val) and returns: self