nannyml.stats.std.result module

Contains the results of the Simple Statistics Sum Calculator and provides plotting functionality.

class nannyml.stats.std.result.Result(results_data: DataFrame, column_names: List[str], simple_stats_metric: str, timestamp_column_name: Optional[str], chunker: Chunker)[source]

Bases: PerColumnResult, ResultCompareMixin

Summary Stats Standard Deviation Calculator Results object.

Initalize Summary Stats Standard Deviation Calculator Results object.

keys() List[Key][source]
plot(*args, **kwargs) Figure[source]

Plot Summary Stats Standard Deviation Calculator Results.

Returns:

fig – A Figure object containing the requested drift plot.

Can be saved to disk using the write_image() method or shown rendered on screen using the show() method.

Return type:

plotly.graph_objs._figure.Figure

Examples

>>> import nannyml as nml
>>> reference, analysis, _ = nml.load_synthetic_car_price_dataset()
>>> column_names = [col for col in reference.columns if col not in ['timestamp', 'y_pred', 'y_true']]
>>> calc = nml.MissingValuesCalculator(
...     column_names=column_names,
...     timestamp_column_name='timestamp',
... ).fit(reference)
>>> res = calc.calculate(analysis)
>>> for column_name in res.column_names:
...     res = res.filter(period='analysis', column_name=column_name).plot().show()