dowhy.interpreters 包#

子模块#

dowhy.interpreters.confounder_distribution_interpreter 模块#

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

基类: VisualInterpreter

参数:
  • estimate – 因果估计

  • fig_size – 图形大小

  • font_size – 图形标题字体大小

  • var_name – 应比较其分布变化的混杂变量

  • var_type – 混杂变量的类型;必须是 'continuous' 或 '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]#

绘制治疗组与未治疗组的对比图。

interpret(data: DataFrame)[source]#

显示在应用逆倾向得分权重之前和之后,混杂变量的分布变化。

dowhy.interpreters.propensity_balance_interpreter 模块#

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

基类: VisualInterpreter

初始化一个解释器。

参数:

instance – CausalModel, CausalEstimate 或 CausalRefutation 类型的对象。

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

平衡图,显示倾向得分分层后,每个协变量标准化均差的变化。

dowhy.interpreters.textual_effect_interpreter 模块#

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

基类: TextualInterpreter

初始化一个解释器。

参数:

instance – CausalModel, CausalEstimate 或 CausalRefutation 类型的对象。

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

通过显示处理的单位变化将导致结果多大变化来解释因果效应。

dowhy.interpreters.textual_interpreter 模块#

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

基类: Interpreter

显示文本作为输出的解释器的基类。

初始化一个解释器。

参数:

instance – CausalModel, CausalEstimate 或 CausalRefutation 类型的对象。

show(interpret_text)[source]#

显示解释。

参数:

interpret_text – 包含解释的字符串

返回值:

None

dowhy.interpreters.visual_interpreter 模块#

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

基类: Interpreter

显示图表或可视化结果作为输出的解释器的基类。

初始化一个解释器。

参数:

instance – CausalModel, CausalEstimate 或 CausalRefutation 类型的对象。

show(interpret_plot)[source]#

显示解释。

参数:

interpret_plot – 包含解释的图表对象

返回值:

None

模块内容#

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