Skip to content

Commit

Permalink
Add a new section explaing how to customize figures
Browse files Browse the repository at this point in the history
  • Loading branch information
nzw0301 committed Jan 21, 2024
1 parent fd338d9 commit bfa1cab
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tutorial/10_key_features/005_visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,18 @@ def objective(trial):
###################################################################################################
# Visualize the optimization timeline of performed trials. See :func:`~optuna.visualization.plot_timeline` for the details.
plot_timeline(study)

###################################################################################################
# Customize generated figures
# ---------------------------
# In functions provided in :mod:`optuna.visualization` and :mod:`optuna.visualization.matplotlib`,
# a function returns an editable figure object; users can modify the generated figure for their demand
# by using API of the visualization library.
# The following example replaces figure titles drawn by Plotly-based :func:`~optuna.visualization.plot_intermediate_values` manually.
fig = plot_intermediate_values(study)

fig.update_layout(
title="Hyperparameter optimization for GBDT-based binary classification",
xaxis_title="Iteration",
yaxis_title="Validation AUC",
)

0 comments on commit bfa1cab

Please sign in to comment.