causallib.evaluation.plots.data_extractors module
Plot data extractors.
The responsibility of these classes is to extract the data from the EvaluationResults objects to match the requested plot.
- class causallib.evaluation.plots.data_extractors.BaseEvaluationPlotDataExtractor(evaluation_results: causallib.evaluation.results.EvaluationResults)[source]
Bases:
abc.ABC
Extractor to get plot data from EvaluationResults.
Subclasses also have a plot_names property.
- class causallib.evaluation.plots.data_extractors.BinaryOutcomePlotDataExtractor(evaluation_results: causallib.evaluation.results.EvaluationResults)[source]
Bases:
causallib.evaluation.plots.data_extractors.BaseEvaluationPlotDataExtractor
Extractor to get plot data from OutcomeEvaluatorPredictions.
Note that the available plots are different if the outcome predictions are binary/classification or continuous/regression.
- get_data_for_plot(plot_name, phase='train')[source]
Retrieve the data needed for each provided plot. Plot interfaces are at the plots module.
- plot_names = frozenset({'calibration', 'pr_curve', 'roc_curve'})
- class causallib.evaluation.plots.data_extractors.ContinuousOutcomePlotDataExtractor(evaluation_results: causallib.evaluation.results.EvaluationResults)[source]
Bases:
causallib.evaluation.plots.data_extractors.BaseEvaluationPlotDataExtractor
Extractor to get plot data from OutcomeEvaluatorPredictions.
Note that the available plots are different if the outcome predictions are binary/classification or continuous/regression.
- get_data_for_plot(plot_name, phase='train')[source]
Retrieve the data needed for each provided plot. Plot interfaces are at the plots module.
- plot_names = frozenset({'common_support', 'continuous_accuracy', 'residuals'})
- class causallib.evaluation.plots.data_extractors.PropensityPlotDataExtractor(evaluation_results: causallib.evaluation.results.EvaluationResults)[source]
Bases:
causallib.evaluation.plots.data_extractors.WeightPlotDataExtractor
Extractor to get plot data from PropensityEvaluatorPredictions.
- get_data_for_plot(plot_name, phase='train')[source]
Retrieve the data needed for each provided plot. Plot interfaces are at the plots.py module.
- plot_names = frozenset({'calibration', 'covariate_balance_love', 'covariate_balance_slope', 'pr_curve', 'roc_curve', 'weight_distribution'})
- class causallib.evaluation.plots.data_extractors.WeightPlotDataExtractor(evaluation_results: causallib.evaluation.results.EvaluationResults)[source]
Bases:
causallib.evaluation.plots.data_extractors.BaseEvaluationPlotDataExtractor
Extractor to get plot data from WeightEvaluatorPredictions.
- get_data_for_plot(plot_name, phase='train')[source]
Retrieve the data needed for each provided plot.
Plot functions are in plots module.
- plot_names = frozenset({'covariate_balance_love', 'covariate_balance_slope', 'weight_distribution'})