Plotting Utils#
Plotting utility functions
- boa.plotting.scheduler_to_df(scheduler: Union[Scheduler, PathLike, str], **kwargs) DataFrame[source]#
Transforms an scheduler’s experiment to a DataFrame with rows keyed by trial_index and arm_name, metrics pivoted into one row. If the pivot results in more than one row per arm (or one row per
arm * map_keyscombination ifmap_keysare present), results are omitted and warning is produced.Transforms an
Experimentinto apd.DataFrame.- Parameters:
- Returns:
A dataframe of inputs, metadata and metrics by trial and arm (and
map_keys, if present). If no trials are available, returns an emptydataframe.
- Return type:
- boa.plotting.plot_metrics_trace(schedulers: Union[list[boa.scheduler.Scheduler], list[os.PathLike, str], Scheduler, PathLike, str], metric_names: Optional[list[str]] = None, title: str = 'Metric Performance vs. # of Iterations', **kwargs)[source]#
Plots an optimization trace with mean and 2 SEMs
- Parameters:
schedulers (Union[list[boa.scheduler.Scheduler], list[os.PathLike, str], Scheduler, PathLike, str]) – List of initialized scheduler or path to scheduler.json file or single initialized scheduler or path to scheduler.json file
metric_names (Optional[list[str]]) – metric name or list of metric names to restrict dropdowns to. If None, will use all metric names.
title (str) – The title of plot
**kwargs – key word arguments to pass to AXs optimization_trace_single_method_plotly
- boa.plotting.plot_contours(scheduler: Union[Scheduler, PathLike, str], metric_names: Optional[list[str]] = None, title: str = 'Metric Contours Plot', **kwargs)[source]#
Plot predictions for a 2-d slice of the parameter space.
- Parameters:
scheduler (Union[Scheduler, PathLike, str]) – Initialized scheduler or path to scheduler.json file.
metric_names (Optional[list[str]]) – metric name or list of metric names to restrict dropdowns to. If None, will use all metric names.
title (str) – The title of plot
**kwargs – key word arguments to pass to AXs plot_contour_plotly
- boa.plotting.plot_slice(scheduler: Union[Scheduler, PathLike, str], **kwargs)[source]#
Create interactive plot with predictions for a 1-d slice of the parameter space.