ggml_ot.pl.contour_hyperparams#
- ggml_ot.pl.contour_hyperparams(results_df, *, x='alpha', y='reg', fixed_params=None, value_col=('knn', 'mean'), log_axis=True, label_style='package', levels=20, cmap='RdBu_r', pad=True, show=None, save=None)[source]#
Contour plot of grid-search results over two hyperparameters.
- Parameters:
- results_df pandas.DataFrame
DataFrame produced by
ggml_ot.tune().- x str, default
"alpha" Hyperparameter for the horizontal axis.
- y str, default
"reg" Hyperparameter for the vertical axis.
- fixed_params dict or None, default None
Fix remaining hyperparameters to specific values. Keys with
Nonevalues are averaged across.- value_col str or tuple, default
("knn", "mean") Column selector for the metric to display.
- log_axis bool or
"x"or"y", default True Log10-transform axes (tick labels show original values).
- label_style
"package"or"paper", default"package" "package"uses raw parameter names (alpha, reg, …)."paper"uses LaTeX notation (α, λ_F, λ_MI, d).- levels int, default 20
Number of contour levels.
- cmap str, default
"RdBu_r" Matplotlib colourmap name.
- pad bool, default True
Pad the contour grid to avoid clipping at the edges.
- show bool or None, default None
Whether to display the plot.
None(default) automatically shows in interactive environments (notebooks, IPython) and suppresses in scripts.True/Falseoverride explicitly.- save str, bool, or None, default None
Whether to save the figure to disk.
None/Falseskip saving.Truesaves tosettings.figdir/contour_hyperparams.<figformat>; a str overrides the filename.
- Returns:
tuple[matplotlib.figure.Figure, matplotlib.axes.Axes] The figure and axes containing the contour plot.