Class or Function Names plot_contour Example from optuna.visualization import plot_contour plot_contour(study) Others See the documentation for more details.
Class or Function Names plot_param_importances Example from optuna.visualization import plot_param_importances plot_param_importances(study) Others See the documentation for more details.
Class or Function Names plot_hypervolume_history Example from optuna.visualization import plot_hypervolume_history plot_hypervolume_history(study, reference_point) Others See the documentation for more details.
Class or Function Names plot_intermediate_values Example from optuna.visualization import plot_intermediate_values plot_intermediate_values(study) Others See the documentation for more details.
Class or Function Names plot_optimization_history Example from optuna.visualization import plot_optimization_history plot_optimization_history(study) Others See the documentation for more details.
Class or Function Names plot_parallel_coordinate Example from optuna.visualization import plot_parallel_coordinate plot_parallel_coordinate(study) Others See the documentation for more details.
Class or Function Names plot_pareto_front Example from optuna.visualization import plot_pareto_front plot_pareto_front(study) Others See the documentation for more details.
Class or Function Names plot_hypervolume_history Example mod = optunahub.load_module("visualization/plot_hypervolume_history_with_rp") mod.plot_hypervolume_history(study, reference_point) See example.py for more details. The example of generated image is as follows.
Class or Function Names plot_sampling_speed Installation This module requires the following dependencies:
matplotlib scipy Example A minimal example would be the following:
from collections import defaultdict import matplotlib.pyplot as plt import optuna import optunahub def objective(trial) -> float: return trial.suggest_float("x", -5, 5)**2 studies = defaultdict(lambda: []) for i in range(3): sampler = optuna.samplers.RandomSampler() study = optuna.create_study(sampler=sampler) study.optimize(objective, timeout=1.0) studies["Random"].append(study) sampler = optuna.samplers.TPESampler() study = optuna.create_study(sampler=sampler) study.optimize(objective, timeout=3.0) studies["TPE"].append(study) plot_sampling_speed = optunahub.
Class or Function Names plot_grid_archive_heatmap(study: optuna.Study, ax: plt.Axes, **kwargs)
study: Optuna study with a sampler that uses pyribs. This function will plot the result archive from the sampler’s scheduler. ax: Axes on which to plot the heatmap. If None, we retrieve the current axes. **kwargs: All remaining kwargs will be passed to grid_archive_heatmap. Installation $ pip install ribs[visualize] Example A minimal example would be the following:
import matplotlib.pyplot as plt import optuna import optunahub module = optunahub.
Class or Function Names plot_slice Example from optuna.visualization import plot_slice plot_slice(study) Others See the documentation for more details.
Class or Function Names plot_step_distribution Installation You should install plotly to use this visualization.
$ pip install plotly Example This plot shows how many steps (budget, epoch, iterations, etc.) were consumed before pruning occurred for each trial.
fig = plot_step_distribution(study) See example.py for a full example. The following figures are obtained from the analysis of the optimization.
Class or Function Names plot_terminator_improvement Example from optuna.visualization import plot_terminator_improvement plot_terminator_improvement(study) Others See the documentation for more details.
Class or Function Names plot_timeline Example from optuna.visualization import plot_timeline plot_timeline(study) Others See the documentation for more details.
Abstract This package is the TPE’s Acquisition Visualizer. It provides callback and plot functions.
APIs Class: TPEAcquisitionVisualizer TPEAcquisitionVisualizer() __call__(self, study: optuna.study.Study, trial: optuna.trial.FrozenTrial) -> None Callback function to collect tpe sampler’s acquisition information.
Args:
study (optuna.study.Study): The study object. trial (optuna.trial.FrozenTrial): The trial object for which the callback is called. Returns: None
plot(self, study: optuna.study.Study, trial_number: int, param_name: str,) -> plt.Figure Plots the TPE acquisition for a given trial and parameter.
Abstract Hyperparameter optimization is crucial to achieving high performance in deep learning. On top of the performance, other criteria such as inference time or memory requirement often need to be optimized due to some practical reasons. This motivates research on multi-objective optimization (MOO). However, Pareto fronts of MOO methods are often shown without considering the variability caused by random seeds, making the performance stability evaluation difficult. This package provides empirical attainment surface implementation based on the original implementation.