k4bench.analysis.plots.event_content¶
k4bench.analysis.plots.event_content ¶
A per-event cost against what each event holds: one point per event
(:func:plot_event_content, from :func:~k4bench.analysis.event_drivers.paired),
and what each algorithm cost in one of them (:func:plot_event_costs).
plot_event_content ¶
plot_event_content(pairs: DataFrame, *, x_label: str, y_label: str, line=None, above: DataFrame | None = None, log_y: bool = False, selected: int | None = None) -> Figure | None
Each event of pairs (x, y, indexed by event) as a point. With line (a
:class:~k4bench.analysis.event_drivers.Trend), the line is drawn and
the events of above ringed; the event selected is marked. Only the
points carry customdata, their event. None when there is nothing
to draw.
Source code in k4bench/analysis/plots/event_content.py
plot_event_costs ¶
plot_event_costs(costs: Series, typical: Series, *, title: str, highlight: str | None = None, top_n: int = 15, additive: bool = True) -> Figure | None
One event's cost of each algorithm of costs (indexed by name) as a
bar, the largest at the top: the top_n largest named, highlight among
them however small, the rest one "Other", their sum, or their largest
unless the costs are additive. Across each named bar a tick at its
typical cost; highlight's bar in red. The named bars carry their
algorithm's name as customdata[0], "Other" none. None when no
algorithm has a cost.
Source code in k4bench/analysis/plots/event_content.py
plot_association_matrix ¶
plot_association_matrix(rho: DataFrame, n: DataFrame, *, row_labels: dict[str, str], column_labels: dict[str, str], column_titles: dict[str, str] | None = None, selected: tuple[str, str] | None = None) -> Figure | None
Each pair of rho (costs down, quantities across) as a square whose
colour is the correlation and whose size is its strength, the quantities
named by column_labels and described on hover by column_titles; the
selected pair ringed. Each point's customdata is its cost, its
quantity, ρ and the events paired. None when there is nothing to draw.