Note
Go to the end to download the full example code.
plot_hypervolume_history
- optuna.visualization.matplotlib.plot_hypervolume_history(study, reference_point)[source]
スタディ内の全トライアルのハイパーボリューム履歴を Matplotlib でプロットします。
Note
plt.tight_layout()
またはplt.savefig(IMAGE_NAME, bbox_inches='tight')
を使用して、 プロットのサイズを手動で調整する必要があります。- Parameters:
- Returns:
matplotlib.axes.Axes
オブジェクト。- Return type:
Note
v3.3.0 で実験的機能として追加されました。新しいバージョンでは予告なく インターフェースが変更される可能性があります。詳細は https://github.com/optuna/optuna/releases/tag/v3.3.0 を参照してください。
The following code snippet shows how to plot optimization history.

/mnt/nfs-mnj-hot-99-home/mshibata/sandbox/optuna-documentation-plamo-ja/optuna-doc-plamo-translation/tmp-optuna/docs/visualization_matplotlib_examples/optuna.visualization.matplotlib.hypervolume_history.py:29: ExperimentalWarning:
plot_hypervolume_history is experimental (supported from v3.3.0). The interface can change in the future.
import optuna
import matplotlib.pyplot as plt
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.create_study(directions=["minimize", "minimize"])
study.optimize(objective, n_trials=50)
reference_point=[100, 50]
optuna.visualization.matplotlib.plot_hypervolume_history(study, reference_point)
plt.tight_layout()
Total running time of the script: (0 minutes 0.117 seconds)