tabensemb.trainer.Trainer.plot_err_hist#
method
- Trainer.plot_err_hist(program: str, model_name: str, category: str | None = None, metric: str | None = None, ax=None, legend=True, clr: Iterable | None = None, figure_kwargs: Dict | None = None, hist_kwargs: Dict | None = None, select_by_value_kwargs: Dict | None = None, legend_kwargs: Dict | None = None, savefig_kwargs: Dict | None = None, save_show_close: bool = True) Axes[source]#
Plot histograms of prediction errors.
- Parameters:
- program
The selected model base.
- model_name
The selected model in the model base.
- category
The category to classify histograms and stack them with different colors.
- metric
The metric to be calculated. It should be supported by
tabenseb.utils.utils.auto_metric_sklearn().- ax
matplotlib.axes.Axes- legend
Show legends if
categoryis not None.- clr
A seaborn color palette or an Iterable of colors. For example seaborn.color_palette(“deep”).
- figure_kwargs
Arguments for
plt.figure.- hist_kwargs
Arguments for
ax.hist(used for histograms of continuous features).- select_by_value_kwargs
Arguments for
tabensemb.data.datamodule.DataModule.select_by_value().- legend_kwargs
Arguments for
plt.legendiflegendis True andcategoryis not None.- savefig_kwargs
Arguments for
plt.savefig- save_show_close
Whether to save, show (in the notebook), and close the figure if
axis not given.
- Returns:
- matplotlib.axes.Axes