class_docstr: Wrapper class for estimators from the causalml library.
  
  Supports additional parameters as listed below. For specific
  parameters of each estimator, refer to the CausalML docs.
class_docstr_tok: ["Wrapper","class","for","estimators","from","the","causalml","library",".","Supports","additional","parameters","as","listed","below",".","For","specific","parameters","of","each","estimator",",","refer","to","the","CausalML","docs","."]
docstr: Fits the estimator with data for effect estimation
  :param data: data frame containing the data
  :param treatment: name of the treatment variable
  :param outcome: name of the outcome variable
  :param effect_modifiers: Variables on which to compute separate
              effects, or return a heterogeneous effect function. Not all
              methods support this currently.
docstr_tok: ["Fits","the","estimator","with","data","for","effect","estimation",":","param","data",":","data","frame","containing","the","data",":","param","treatment",":","name","of","the","treatment","variable",":","param","outcome",":","name","of","the","outcome","variable",":","param","effect_modifiers",":","Variables","on","which","to","compute","separate","effects",",","or","return","a","heterogeneous","effect","function",".","Not","all","methods","support","this","currently","."]
code: def fit(
      self,
      data: pd.DataFrame,
      effect_modifier_names: Optional[List[str]] = None,
  ):
      """
      Fits the estimator with data for effect estimation
      :param data: data frame containing the data
      :param treatment: name of the treatment variable
      :param outcome: name of the outcome variable
      :param effect_modifiers: Variables on which to compute separate
                  effects, or return a heterogeneous effect function. Not all
                  methods support this currently.
      """
      self._set_effect_modifiers(data, effect_modifier_names)
  
      # Check the backdoor variables being used
      self.logger.debug(
          "Back-door variables used:"
          + ",".join(self._target_estimand.get_backdoor_variables())
      )
  
      # Add the observed confounders and one hot encode the categorical variables
      self._observed_common_causes_names = (
          self._target_estimand.get_backdoor_variables()
      )
      if self._observed_common_causes_names:
          # Get the data of the unobserved confounders
          self._observed_common_causes = data[
              self._observed_common_causes_names
          ]
          # One hot encode the data if they are categorical
          self._observed_common_causes = pd.get_dummies(
              self._observed_common_causes, drop_first=True
          )
      else:
          self._observed_common_causes = []
  
      # Check the instrumental variables involved
      self.logger.debug(
          "Instrumental variables used:"
          + ",".join(self._target_estimand.instrumental_variables)
      )
  
      # Perform the same actions as the above
      self._instrumental_variable_names = (
          self._target_estimand.instrumental_variables
      )
      if self._instrumental_variable_names:
          self._instrumental_variables = data[
              self._instrumental_variable_names
          ]
          self._instrumental_variables = pd.get_dummies(
              self._instrumental_variables, drop_first=True
          )
      else:
          self._instrumental_variables = []
  
      self.symbolic_estimator = self.construct_symbolic_estimator(
          self._target_estimand
      )
      self.logger.info(self.symbolic_estimator)
  
      return self
  
file_path: dowhy/dowhy/causal_estimators/causalml.py
imports: import inspect
  import logging
  from importlib import import_module
  from typing import Any, List, Optional, Protocol, Union
  from warnings import warn
  import pandas
  from dowhy.causal_estimator import CausalEstimate, CausalEstimator
  from dowhy.causal_identifier import IdentifiedEstimand
label_desc: Use image node_id 2 for calling the Causalml obj's underlying member method code with example usage: obj.fit(data, effect_modifier_names) and returns: self