dowhy.do_samplers package

Submodules

dowhy.do_samplers.kernel_density_sampler module

class dowhy.do_samplers.kernel_density_sampler.KernelDensitySampler(*args, **kwargs)[source]

Bases: dowhy.do_sampler.DoSampler

class dowhy.do_samplers.kernel_density_sampler.KernelSampler(outcome_upper_support, outcome_lower_support, outcome_names, treatment_names, backdoor_variables, data, dep_type, indep_type, bw, defaults)[source]

Bases: object

sample_point(x_z)[source]

dowhy.do_samplers.mcmc_sampler module

dowhy.do_samplers.multivariate_weighting_sampler module

class dowhy.do_samplers.multivariate_weighting_sampler.MultivariateWeightingSampler(data, *args, params=None, variable_types=None, num_cores=1, keep_original_treatment=False, causal_model=None, **kwargs)[source]

Bases: dowhy.do_sampler.DoSampler

compute_weights()[source]
disrupt_causes()[source]

Override this method to render treatment assignment conditionally ignorable :return:

make_treatment_effective(x)[source]

This is more likely the implementation you’d like to use, but some methods may require overriding this method to make the treatment effective. :param x: :return:

sample()[source]

By default, this expects a sampler to be built on class initialization which contains a sample method. Override this method if you want to use a different approach to sampling. :return:

dowhy.do_samplers.weighting_sampler module

class dowhy.do_samplers.weighting_sampler.WeightingSampler(data, *args, params=None, variable_types=None, num_cores=1, keep_original_treatment=False, causal_model=None, **kwargs)[source]

Bases: dowhy.do_sampler.DoSampler

compute_weights()[source]
disrupt_causes()[source]

Override this method to render treatment assignment conditionally ignorable :return:

make_treatment_effective(x)[source]

This is more likely the implementation you’d like to use, but some methods may require overriding this method to make the treatment effective. :param x: :return:

sample()[source]

By default, this expects a sampler to be built on class initialization which contains a sample method. Override this method if you want to use a different approach to sampling. :return:

Module contents

dowhy.do_samplers.get_class_object(method_name, *args, **kwargs)[source]