plot_parallel_coordinate
Generate parallel coordinate plots to visualize hyperparameter relationships in optimization studies, using specified parameters and target objectives for clear analysis.
Instructions
Return the parallel coordinate plot as an image.
Args:
params:
Parameter list to visualize. The default is all parameters.
target:
An index to specify the value to display. To plot nth objective value, set this to n.
Note that this is 0-indexed, i.e., to plot the first objective value, set this to 0.
target_name:
Target’s name to display on the axis label and the legend.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | ||
| target | No | ||
| target_name | No | Objective Value |
Implementation Reference
- optuna_mcp/server.py:507-530 (handler)The handler function for the 'plot_parallel_coordinate' tool. It generates a parallel coordinate visualization plot using Optuna's visualization module and converts it to a PNG image for return.@mcp.tool() def plot_parallel_coordinate( params: list[str] | None = None, target: int = 0, target_name: str = "Objective Value", ) -> Image: """Return the parallel coordinate plot as an image. Args: params: Parameter list to visualize. The default is all parameters. target: An index to specify the value to display. To plot nth objective value, set this to n. Note that this is 0-indexed, i.e., to plot the first objective value, set this to 0. target_name: Target’s name to display on the axis label and the legend. """ fig = optuna.visualization.plot_parallel_coordinate( mcp.study, params=params, target=lambda t: t.values[target], target_name=target_name, ) return Image(data=plotly.io.to_image(fig), format="png")