bencher.results.holoview_results.band_result

Classes

BandResult

Percentile band plot showing distribution spread over a continuous axis.

Module Contents

class bencher.results.holoview_results.band_result.BandResult(bench_cfg: bencher.bench_cfg.BenchCfg)

Bases: bencher.results.holoview_results.holoview_result.HoloviewResult

Percentile band plot showing distribution spread over a continuous axis.

Displays nested shaded bands (e.g. 10th-90th and 25th-75th percentiles) with a median line and individual scatter points, giving a richer view of the distribution than mean +/- std. Particularly useful with agg_over_dims to show how a high-dimensional sweep’s distribution evolves over time.

to_plot(result_var: param.Parameter | None = None, override: bool = True, **kwargs) holoviews.Overlay | None
to_band(result_var: param.Parameter | None = None, override: bool = True, **kwargs)
to_band_ds(dataset: xarray.Dataset, result_var: param.Parameter, **kwargs) holoviews.Overlay | None

Create a percentile band plot from the provided dataset.

Flattens all dimensions except the continuous axis (typically over_time) into a sample pool and computes percentiles across those samples.

_band_over_time(dataset: xarray.Dataset, var: str, title: str | None, units: str = '', **kwargs) holoviews.Overlay | None

Build percentile bands with time on x-axis.

_band_static(dataset: xarray.Dataset, var: str, title: str | None, agg_over_dims: list[str] | None, units: str = '', **kwargs) holoviews.Overlay | None

Build percentile bands over a non-time continuous axis.

static _build_scatter_data(x_coords, values, **kwargs) tuple[numpy.ndarray | None, numpy.ndarray | None]

Build scatter arrays from the 2-D values grid, with optional downsampling.

Parameters:
  • x_coords – 1-D array of x-axis coordinates.

  • values – 2-D array of shape (n_x, n_samples).

  • **kwargs – Optional max_scatter_points (int, default 50_000) to cap the number of scatter points, and enable_scatter (bool, default True) to disable the scatter layer entirely.

Returns:

(scatter_x, scatter_y) arrays, or (None, None) when scatter is disabled.

static _build_band_overlay(x_coords, p10, p25, p50, p75, p90, scatter_x, scatter_y, var: str, title: str, x_dim: str = 'x', units: str = '', **_kwargs) holoviews.Overlay

Construct the overlay of Area bands + median Curve + scatter points.

Parameters:

x_dim – Name of the x-axis dimension, used as the kdim label so that axis labels reflect the original coordinate (e.g. over_time).