imetric_visualizer

Abstract benchmark metric visualizer.

type pysatl_cpd.analysis.visualization.abstracts.imetric_visualizer.BenchmarkEntryKey = Hashable
class pysatl_cpd.analysis.visualization.abstracts.imetric_visualizer.IMetricVisualizer(backend=DrawBackend.MATPLOTLIB)[source]

Bases: IVisualizer

Base class for benchmark metric visualizers.

A metric visualizer draws a single benchmark result subplot and can be composed by plotters through the shared IVisualizer interface.

Parameters:

backend (DrawBackend | str)

__init__(backend=DrawBackend.MATPLOTLIB)[source]
Parameters:

backend (DrawBackend | str)

Return type:

None

property axes: set[str]

Return required axis names.

Returns:

Single-axis requirement used by benchmark plotters.

Return type:

axes

abstract property requirements: list[str]

Return required benchmark table columns.

Returns:

Required column names.

Return type:

requirements

Raises:

NotImplementedError – Subclasses must implement this property.

set_benchmark_tables(benchmark_tables)[source]

Store benchmark tables keyed by algorithm name.

Parameters:

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

Returns:

Current visualizer for method chaining.

Return type:

Self

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

Set line draw options for all metrics of one benchmark entry.

Return type:

Self

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

Set line draw options for one metric of one benchmark entry.

Return type:

Self

Parameters:
draw(*, figure, axes)[source]

Draw the metric on provided axes.

Parameters:
  • figure (Figure | Figure) – Target figure.

  • axes (dict[str, Axes] | dict[str, tuple[int, int]]) – IVisualizer axes mapping containing the metric axis.

Returns:

Figure with the metric visualizers drawn.

Return type:

Figure | Figure