facet.simulation.viz.SimulationStyle#

class facet.simulation.viz.SimulationStyle[source]#

Base class of styles used by SimulationDrawer.

Bases

DrawingStyle

Metaclasses

ABCMeta

Method summary

draw_histogram

Draw the histogram of observed value counts per partition.

draw_uplift

Draw the simulation results as the mean simulated outputs with their confidence intervals.

finalize_drawing

See pytools.viz.DrawingStyle.finalize_drawing()

get_default_style_name

See pytools.viz.DrawingStyle.get_default_style_name()

get_named_styles

See pytools.viz.DrawingStyle.get_named_styles()

start_drawing

See pytools.viz.DrawingStyle.start_drawing()

Definitions

abstract draw_histogram(partitions, frequencies, is_categorical_feature)[source]#

Draw the histogram of observed value counts per partition.

Parameters
  • partitions (Sequence[Any]) – the partitioning (center values) of the simulated feature

  • frequencies (Sequence[int]) – observed frequencies for each partition

  • is_categorical_feature (bool) – True if the simulated feature is categorical, False otherwise

Return type

None

abstract 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 feature

  • output_name (Union[str, Sequence[str]]) – name of the target for which output values were simulated

  • output_unit (str) – the unit of the output axis

  • outputs_mean (Sequence[float]) – the mean simulated outputs

  • outputs_lower_bound (Sequence[float]) – the lower CI bounds of the simulated outputs

  • outputs_upper_bound (Sequence[float]) – the upper CI bounds of the simulated outputs

  • baseline (float) – the baseline of the simulation

  • confidence_level (float) – the confidence level used to calculate the CI bounds

  • partitions (Sequence[Any]) – the central or categorical values representing the partitions

  • frequencies (Sequence[int]) – observed frequencies of the partitions

  • is_categorical_feature (bool) – True if the simulated feature is categorical; False otherwise

Return type

None

finalize_drawing(**kwargs)#

See pytools.viz.DrawingStyle.finalize_drawing()

abstract classmethod get_default_style_name()#

See pytools.viz.DrawingStyle.get_default_style_name()

classmethod get_named_styles()#

See pytools.viz.DrawingStyle.get_named_styles()

start_drawing(*, title, **kwargs)#

See pytools.viz.DrawingStyle.start_drawing()