dowhy.interpreters package

Submodules

dowhy.interpreters.confounder_distribution_interpreter module

class dowhy.interpreters.confounder_distribution_interpreter.ConfounderDistributionInterpreter(estimate, fig_size, font_size, var_name, var_type, **kwargs)[source]

Bases: VisualInterpreter

Parameters
  • estimate – Causal estimate

  • fig_size – Size of the figure

  • font_size – Size of the font of the plot title

  • var_name – The confounding variable for which distribution changes should be compared

  • var_type – Type of the confounding variable; must be one of ‘continuous’ or ‘discrete’

SUPPORTED_ESTIMATORS = [<class 'dowhy.causal_estimators.propensity_score_weighting_estimator.PropensityScoreWeightingEstimator'>]
static discrete_dist_plot(labels, not_treated_counts, treated_counts, ax, title, var_name, font_size, width=0.35)[source]

Plot of the treated vs untreated.

interpret(data: DataFrame)[source]

Shows distribution changes for confounding variables before and after applying inverse propensity weights.

dowhy.interpreters.propensity_balance_interpreter module

class dowhy.interpreters.propensity_balance_interpreter.PropensityBalanceInterpreter(estimate, **kwargs)[source]

Bases: VisualInterpreter

Initialize an interpreter.

Parameters

instance – An object of type CausalModel, CausalEstimate or CausalRefutation.

SUPPORTED_ESTIMATORS = [<class 'dowhy.causal_estimators.propensity_score_stratification_estimator.PropensityScoreStratificationEstimator'>]
interpret(data: DataFrame)[source]

Balance plot that shows the change in standardized mean differences for each covariate after propensity score stratification.

dowhy.interpreters.textual_effect_interpreter module

class dowhy.interpreters.textual_effect_interpreter.TextualEffectInterpreter(instance, **kwargs)[source]

Bases: TextualInterpreter

Initialize an interpreter.

Parameters

instance – An object of type CausalModel, CausalEstimate or CausalRefutation.

SUPPORTED_ESTIMATORS = ['all']
interpret(data: DataFrame)[source]

Interpret causal effect by showing how much a unit change in treatment will cause change in the outcome.

dowhy.interpreters.textual_interpreter module

class dowhy.interpreters.textual_interpreter.TextualInterpreter(instance, **kwargs)[source]

Bases: Interpreter

Base class for interpreters that show text as output.

Initialize an interpreter.

Parameters

instance – An object of type CausalModel, CausalEstimate or CausalRefutation.

show(interpret_text)[source]

Display the interpretation.

Parameters

interpret_text – String containing the interpretation

Returns

None

dowhy.interpreters.visual_interpreter module

class dowhy.interpreters.visual_interpreter.VisualInterpreter(instance, **kwargs)[source]

Bases: Interpreter

Base class for interpreters that show plots or visualizations as output.

Initialize an interpreter.

Parameters

instance – An object of type CausalModel, CausalEstimate or CausalRefutation.

show(interpret_plot)[source]

Display the intepretation.

Parameters

interpret_plot – Plot object containing the interpretation

Returns

None

Module contents

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