class_docstr: Base class for an estimator of causal effect.
  
  Subclasses implement different estimation methods. All estimation methods are in the package "dowhy.causal_estimators"
class_docstr_tok: ["Base","class","for","an","estimator","of","causal","effect",".","Subclasses","implement","different","estimation","methods",".","All","estimation","methods","are","in","the","package","``","dowhy.causal_estimators","''"]
code: def _evaluate_effect_strength(
      self, data: pd.DataFrame, estimate, method="fraction-effect"
  ):
      supported_methods = ["fraction-effect"]
      if method not in supported_methods:
          raise NotImplementedError(
              "This method is not supported for evaluating effect strength"
          )
      if method == "fraction-effect":
          naive_obs_estimate = self.estimate_effect_naive(data)
          self.logger.debug(estimate.value, naive_obs_estimate.value)
          fraction_effect_explained = (
              estimate.value / naive_obs_estimate.value
          )
          return fraction_effect_explained
      # elif method == "r-squared":
      #    outcome_mean = np.mean(self._outcome)
      #    total_variance = np.sum(np.square(self._outcome - outcome_mean))
      # Assuming a linear model with one variable: the treatment
      # Currently only works for continuous y
      #    causal_model = outcome_mean + estimate.value*self._treatment
      #    squared_residual = np.sum(np.square(self._outcome - causal_model))
      #    r_squared = 1 - (squared_residual/total_variance)
      #    return r_squared
      else:
          return None
  
imports: import copy
  import logging
  from collections import namedtuple
  from typing import Dict, List, Optional, Union
  import numpy
  import pandas
  import sympy
  from sklearn.utils import resample
  import dowhy.interpreters
  from dowhy.causal_identifier.identified_estimand import IdentifiedEstimand
  from dowhy.utils.api import parse_state
label_desc: Use image node_id 22 for calling the CausalEstimator obj's underlying member method code with example usage: obj._evaluate_effect_strength(data, estimate, method) and returns: fraction_effect_explained, None