class_docstr: Refute an estimate by running it on a random sample of the data containing measurement error in the
  confounders. This allows us to find the ability of the estimator to find the effect of the
  treatment on the outcome.
  
  It supports additional parameters that can be specified in the refute_estimate() method.
  
  :param num_simulations: The number of simulations to be run, ``CausalRefuter.DEFAULT_NUM_SIMULATIONS`` by default
  :type num_simulations: int, optional
  
  :param sample_size: The size of each bootstrap sample and is the size of the original data by default
  :type sample_size: int, optional
  
  :param required_variables: The list of variables to be used as the input for ``y~f(W)``
    This is ``True`` by default, which in turn selects all variables leaving the treatment and the outcome
  :type required_variables: int, list, bool, optional
  
  1. An integer argument refers to how many variables will be used for estimating the value of the outcome
  2. A list explicitly refers to which variables will be used to estimate the outcome
     Furthermore, it gives the ability to explictly select or deselect the covariates present in the estimation of the
     outcome. This is done by either adding or explicitly removing variables from the list as shown below:
  
  .. note::
          * We need to pass required_variables = ``[W0,W1]`` if we want ``W0`` and ``W1``.
          * We need to pass required_variables = ``[-W0,-W1]`` if we want all variables excluding ``W0`` and ``W1``.
  
  3. If the value is True, we wish to include all variables to estimate the value of the outcome.
  
  .. warning:: A ``False`` value is ``INVALID`` and will result in an ``error``.
  
  :param noise: The standard deviation of the noise to be added to the data and is ``BootstrapRefuter.DEFAULT_STD_DEV`` by default
  :type noise: float, optional
  
  :param probability_of_change: It specifies the probability with which we change the data for a boolean or categorical variable
    It is ``noise`` by default, only if the value of ``noise`` is less than 1.
  :type probability_of_change: float, optional
  
  :param random_state: The seed value to be added if we wish to repeat the same random behavior. For this purpose, we repeat the same seed in the psuedo-random generator.
  :type random_state: int, RandomState, optional
class_docstr_tok: ["Refute","an","estimate","by","running","it","on","a","random","sample","of","the","data","containing","measurement","error","in","the","confounders",".","This","allows","us","to","find","the","ability","of","the","estimator","to","find","the","effect","of","the","treatment","on","the","outcome",".","It","supports","additional","parameters","that","can","be","specified","in","the","refute_estimate","(",")","method",".",":","param","num_simulations",":","The","number","of","simulations","to","be","run",",","``","CausalRefuter.DEFAULT_NUM_SIMULATIONS","``","by","default",":","type","num_simulations",":","int",",","optional",":","param","sample_size",":","The","size","of","each","bootstrap","sample","and","is","the","size","of","the","original","data","by","default",":","type","sample_size",":","int",",","optional",":","param","required_variables",":","The","list","of","variables","to","be","used","as","the","input","for","``","y~f","(","W",")","``","This","is","``","True","``","by","default",",","which","in","turn","selects","all","variables","leaving","the","treatment","and","the","outcome",":","type","required_variables",":","int",",","list",",","bool",",","optional","1",".","An","integer","argument","refers","to","how","many","variables","will","be","used","for","estimating","the","value","of","the","outcome","2",".","A","list","explicitly","refers","to","which","variables","will","be","used","to","estimate","the","outcome","Furthermore",",","it","gives","the","ability","to","explictly","select","or","deselect","the","covariates","present","in","the","estimation","of","the","outcome",".","This","is","done","by","either","adding","or","explicitly","removing","variables","from","the","list","as","shown","below",":","..","note",":",":","*","We","need","to","pass","required_variables","=","``","[","W0",",","W1","]","``","if","we","want","``","W0","``","and","``","W1","``",".","*","We","need","to","pass","required_variables","=","``","[","-W0",",","-W1","]","``","if","we","want","all","variables","excluding","``","W0","``","and","``","W1","``",".","3",".","If","the","value","is","True",",","we","wish","to","include","all","variables","to","estimate","the","value","of","the","outcome",".","..","warning",":",":","A","``","False","``","value","is","``","INVALID","``","and","will","result","in","an","``","error","``",".",":","param","noise",":","The","standard","deviation","of","the","noise","to","be","added","to","the","data","and","is","``","BootstrapRefuter.DEFAULT_STD_DEV","``","by","default",":","type","noise",":","float",",","optional",":","param","probability_of_change",":","It","specifies","the","probability","with","which","we","change","the","data","for","a","boolean","or","categorical","variable","It","is","``","noise","``","by","default",",","only","if","the","value","of","``","noise","``","is","less","than","1.",":","type","probability_of_change",":","float",",","optional",":","param","random_state",":","The","seed","value","to","be","added","if","we","wish","to","repeat","the","same","random","behavior",".","For","this","purpose",",","we","repeat","the","same","seed","in","the","psuedo-random","generator",".",":","type","random_state",":","int",",","RandomState",",","optional"]
code: def __init__(self, *args, **kwargs):
      super().__init__(*args, **kwargs)
      self._num_simulations = kwargs.pop(
          "num_simulations", CausalRefuter.DEFAULT_NUM_SIMULATIONS
      )
      self._sample_size = kwargs.pop("sample_size", len(self._data))
      self._required_variables = kwargs.pop("required_variables", True)
      self._noise = kwargs.pop(
          "noise", BootstrapRefuter.DEFAULT_STD_DEV
      )
      self._probability_of_change = kwargs.pop(
          "probability_of_change", None
      )
      self._random_state = kwargs.pop("random_state", None)
  
      self.logger = logging.getLogger(__name__)
  
file_path: dowhy/dowhy/causal_refuters/bootstrap_refuter.py
imports: import logging
  import random
  from typing import List, Optional, Union
  import numpy
  import pandas
  from joblib import Parallel, delayed
  from sklearn.utils import resample
  from tqdm.auto import tqdm
  from dowhy.causal_estimator import CausalEstimate
  from dowhy.causal_estimators.econml import Econml
  from dowhy.causal_identifier.identified_estimand import IdentifiedEstimand
  from dowhy.causal_refuter import CausalRefutation, CausalRefuter, choose_variables, test_significance
label_desc: Use image node_id 1 to create a new BootstrapRefuter object from inherited base classes: CausalRefuter with example: obj = BootstrapRefuter()