facet.simulation.viz.SimulationMatplotStyle#
- class facet.simulation.viz.SimulationMatplotStyle(*, ax=None, colors=None, font_family=None)[source]#
matplotlib style for simulation chart.
Along the range of simulated feature values on the x axis, plots the mean and confidence intervals of the simulated target value.
A bar chart below the plot shows a histogram of actually observed values near the simulated values.
- Bases
- Metaclasses
- Parameters
ax (
Optional
[Axes
]) – optional axes object to draw on; create a new figure if not specifiedcolors (
Optional
[MatplotColorScheme
]) – the color scheme to be used by this drawing style (default:FacetLightColorScheme()
)font_family (
Union
[str
,Iterable
[str
],None
]) – name of one or more fonts to use for all text, in descending order of preference; defaults to a monospaced font if undefined, or if none of the given fonts is available
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
Definitions
- apply_color_scheme(ax)#
- 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()#
- get_renderer()#
- start_drawing(*, title, **kwargs)#
- property ax: matplotlib.axes.Axes#
- property colors: pytools.viz.T_ColorScheme#