optuna.multi_objective.visualization.plot_pareto_front

optuna.multi_objective.visualization.plot_pareto_front(study, names=None, include_dominated_trials=False, axis_order=None)[源代码]

Plot the pareto front of a study.

示例

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)

fig = optuna.multi_objective.visualization.plot_pareto_front(study)
fig.show()
参数
返回

A plotly.graph_objs.Figure object.

引发

ValueError – If the number of objectives of study isn’t 2 or 3.

返回类型

plotly.graph_objs._figure.Figure

警告

Deprecated in v2.4.0. This feature will be removed in the future. The removal of this feature is currently scheduled for v4.0.0, but this schedule is subject to change. See https://github.com/optuna/optuna/releases/tag/v2.4.0.