ncem.train.GridSearchContainer.plot_best_model_by_hyperparam
- GridSearchContainer.plot_best_model_by_hyperparam(graph_model_class, baseline_model_class, partition_show='test', metric_show='r_squared_linreg', partition_select='val', metric_select='r_squared_linreg', param_x='um_radius', param_hue='model', rename_levels=None, subset_hyperparameters=None, cv_mode='mean', yaxis_limit=None, xticks=None, rotate_xticks=True, figsize=(3.5, 4.0), fontsize=None, example_cellradius=10, plot_mode='lineplot', palette={'NCEM': 'C1', 'baseline': 'C0'}, color=None, save=None, suffix='best_by_hyperparam.pdf', show=True, return_axs=False)[source]
Plot best model by hyperparameter.
- Parameters
graph_model_class (str) – Graph model class.
baseline_model_class (str) – Baseline model class.
partition_show (str) – Showing partition.
metric_show (str) – Showing metric.
partition_select (str) – Selected partition.
metric_select (str) – Selected metric.
param_x (str) – Parameter on x axis.
param_hue (str) – Parameter for hue.
rename_levels (list, optional) – Rename levels with stated logic.
subset_hyperparameters (list, optional) – Subset hyperparameters.
cv_mode (str) – Cross validation mode.
yaxis_limit (tuple, optional) – y axis limits.
xticks (list, optional) – List of x ticks.
rotate_xticks (bool) – Whether to rotate x ticks.
figsize (tuple) – Figure size.
fontsize (int, optional) – Font size.
plot_mode (str) – Plotting mode, can be boxplot, lineplot or mean_lineplot.
palette (dict, optional) – Palette.
color (str, optional) – Color.
save (str, optional) – Whether (if not None) and where (path as string given as save) to save plot.
suffix (str) – Suffix of file name to save to.
show (bool) – Whether to display plot.
return_axs (bool) – Whether to return axis objects.
example_cellradius (Optional[int]) –
- Return type
axis if return_axs is True.