facet.simulation.viz.SimulationReportStyle#
- class facet.simulation.viz.SimulationReportStyle(out=None, width=80)[source]#
Renders simulation results as a text report.
- Bases
- Metaclasses
- Parameters
out (
Optional
[TextIO
]) – the output stream this style instance writes to (defaults tosys.stdout
)width (
int
) – the maximum width available to render the text, defaults to 80
Method summary
Draw the histogram of observed value counts per partition.
Draw the simulation results as the mean simulated outputs with their confidence intervals.
Attribute summary
out
The output stream this style instance writes to.
width
The maximum width of the text to be produced.
Definitions
- draw_histogram(partitions, frequencies, is_categorical_feature)[source]#
Draw the histogram of observed value counts per partition.
- draw_uplift(feature_name, output_name, output_unit, outputs_mean, outputs_lower_bound, outputs_upper_bound, baseline, confidence_level, partitions, frequencies, is_categorical_feature)[source]#
Draw the simulation results as the mean simulated outputs with their confidence intervals.
- Parameters
feature_name (
str
) – name of the simulated featureoutput_name (
Union
[str
,Sequence
[str
]]) – name of the target for which output values were simulatedoutput_unit (
str
) – the unit of the output axisoutputs_lower_bound (
Sequence
[float
]) – the lower CI bounds of the simulated outputsoutputs_upper_bound (
Sequence
[float
]) – the upper CI bounds of the simulated outputsbaseline (
float
) – the baseline of the simulationconfidence_level (
float
) – the confidence level used to calculate the CI boundspartitions (
Sequence
[Any
]) – the central or categorical values representing the partitionsfrequencies (
Sequence
[int
]) – observed frequencies of the partitionsis_categorical_feature (
bool
) –True
if the simulated feature is categorical;False
otherwise
- Return type
- finalize_drawing(**kwargs)#
- classmethod get_default_style_name()#
- classmethod get_named_styles()#
- start_drawing(*, title, **kwargs)#