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","''"]
docstr: Helper function to generate causal estimates over bootstrapped samples.
  
  :param num_bootstrap_simulations: Number of simulations for the bootstrap method.
  :param sample_size_fraction: Fraction of the dataset to be resampled.
  :returns: A collections.namedtuple containing a list of bootstrapped estimates and a dictionary containing parameters used for the bootstrap.
code: def _generate_bootstrap_estimates(
      self,
      data: pd.DataFrame,
      num_bootstrap_simulations,
      sample_size_fraction,
  ):
      """Helper function to generate causal estimates over bootstrapped samples.
  
      :param num_bootstrap_simulations: Number of simulations for the bootstrap method.
      :param sample_size_fraction: Fraction of the dataset to be resampled.
      :returns: A collections.namedtuple containing a list of bootstrapped estimates and a dictionary containing parameters used for the bootstrap.
      """
      # The array that stores the results of all estimations
      simulation_results = np.zeros(num_bootstrap_simulations)
  
      # Find the sample size the proportion with the population size
      sample_size = int(sample_size_fraction * len(data))
  
      if sample_size > len(data):
          self.logger.warning(
              "WARN: The sample size is greater than the data being sampled"
          )
  
      self.logger.info("INFO: The sample size: {}".format(sample_size))
      self.logger.info(
          "INFO: The number of simulations: {}".format(
              num_bootstrap_simulations
          )
      )
  
      # Perform the set number of simulations
      for index in range(num_bootstrap_simulations):
          new_data = resample(data, n_samples=sample_size)
          new_estimator = self.get_new_estimator_object(
              self._target_estimand,
              # names of treatment and outcome
              test_significance=False,
              evaluate_effect_strength=False,
              confidence_intervals=False,
          )
          new_estimator.fit(
              new_data,
              effect_modifier_names=self._effect_modifier_names,
          )
          new_effect = new_estimator.estimate_effect(
              new_data,
              treatment_value=self._treatment_value,
              control_value=self._control_value,
              target_units=self._target_units,
          )
          simulation_results[index] = new_effect.value
  
      estimates = CausalEstimator.BootstrapEstimates(
          simulation_results,
          {
              "num_simulations": num_bootstrap_simulations,
              "sample_size_fraction": sample_size_fraction,
          },
      )
      return estimates
  
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 11 for calling the CausalEstimator obj's underlying member method code with example usage: obj._generate_bootstrap_estimates(data, num_bootstrap_simulations, sample_size_fraction) and returns: estimates