optuna.multi_objective.visualization.plot_pareto_front¶
- optuna.multi_objective.visualization.plot_pareto_front(study: optuna.multi_objective.study.MultiObjectiveStudy, names: Optional[List[str]] = None) go.Figure [source]¶
Plot the pareto front of a study.
Example
The following code snippet shows how to plot the pareto front of a study.
import optuna def objective(trial): x = trial.suggest_float("x", 0, 5) y = trial.suggest_float("y", 0, 3) v0 = (4 * x) ** 2 + (4 * y) ** 2 v1 = (x - 5) ** 2 + (y - 5) ** 2 return v0, v1 study = optuna.multi_objective.create_study(["minimize", "minimize"]) study.optimize(objective, n_trials=50) optuna.multi_objective.visualization.plot_pareto_front(study)
- Parameters
study – A
MultiObjectiveStudy
object whose trials are plotted for their objective values.names – Objective name list used as the axis titles. If
None
is specified, “Objective {objective_index}” is used instead.
- Returns
A
plotly.graph_objs.Figure
object.- Raises
ValueError – If the number of objectives of
study
isn’t 2 or 3.
Note
Added in v2.0.0 as an experimental feature. The interface may change in newer versions without prior notice. See https://github.com/optuna/optuna/releases/tag/v2.0.0.