benchmark_plotter

Benchmark plotter coordinator.

type pysatl_cpd.analysis.visualization.benchmarking.plotters.benchmark_plotter.MetricVisualizerName = str
type pysatl_cpd.analysis.visualization.benchmarking.plotters.benchmark_plotter.MetricPlotName = str
class pysatl_cpd.analysis.visualization.benchmarking.plotters.benchmark_plotter.BenchmarkPlotter[source]

Bases: object

Coordinate benchmark metric visualizers.

__init__()[source]
Return type:

None

property requirements: list[str]

Return the union of all required columns from registered metrics.

__getitem__(metric_name)[source]

Access a registered metric visualizer by name.

Parameters:

metric_name (str) – Name of the metric to retrieve.

Returns:

The registered metric visualizer.

Return type:

IMetricVisualizer

Raises:

KeyError – If the metric name is not registered.

set_benchmark_tables(benchmark_tables)[source]

Set benchmark result tables and propagate them to all metrics.

Parameters:

benchmark_tables (dict[Hashable, DataFrame]) – Benchmark result tables keyed by algorithm name.

Returns:

Returns self to allow method chaining.

Return type:

Self

set_metrics(metrics)[source]

Register metric visualizers and optionally propagate tables.

Parameters:

metrics (dict[str, IMetricVisualizer]) – Named metric visualizers to register.

Returns:

Returns self to allow method chaining.

Return type:

Self

set_entry_draw_opts(*, entry, **options)[source]

Set entry-wide line draw options on all registered metric visualizers.

Return type:

Self

Parameters:
set_entry_metric_draw_opts(*, entry, metric, **options)[source]

Set entry+metric line draw options on all registered metric visualizers.

Return type:

Self

Parameters:
draw(figure, axes)[source]

Coordinate drawing of all registered metric visualizers.

Parameters:
  • figure (Figure | Figure) – The figure to draw on.

  • axes (dict[str, Axes | tuple[int, int]]) – Mapping from metric names to their axes.

Returns:

The figure with all metric visuals drawn.

Return type:

Figure | Figure

Raises:

ValueError – If benchmark tables or metrics are not set, or required columns or axes are missing.