bencher.results.holoview_results.band_result ============================================ .. py:module:: bencher.results.holoview_results.band_result Classes ------- .. autoapisummary:: bencher.results.holoview_results.band_result.BandResult Module Contents --------------- .. py:class:: BandResult(bench_cfg: bencher.bench_cfg.BenchCfg) Bases: :py:obj:`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. .. py:method:: to_plot(result_var: param.Parameter | None = None, override: bool = True, **kwargs) -> holoviews.Overlay | None .. py:method:: to_band(result_var: param.Parameter | None = None, override: bool = True, **kwargs) .. py:method:: 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. .. py:method:: _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. .. py:method:: _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. .. py:method:: _build_scatter_data(x_coords, values, **kwargs) -> tuple[numpy.ndarray | None, numpy.ndarray | None] :staticmethod: Build scatter arrays from the 2-D values grid, with optional downsampling. :param x_coords: 1-D array of x-axis coordinates. :param values: 2-D array of shape (n_x, n_samples). :param \*\*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. .. py:method:: _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 :staticmethod: Construct the overlay of Area bands + median Curve + scatter points. :param 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``).