tabensemb.trainer.Trainer.plot_hist#
method
- Trainer.plot_hist(feature: str, ax=None, clr: Iterable | None = None, imputed=False, kde=False, category: str | None = None, x_values=None, legend: bool = True, figure_kwargs: Dict | None = None, hist_kwargs: Dict | None = None, bar_kwargs: Dict | None = None, select_by_value_kwargs: Dict | None = None, kde_kwargs: Dict | None = None, legend_kwargs: Dict | None = None, savefig_kwargs: Dict | None = None, save_show_close: bool = True) Axes[source]#
Plot the histogram of a feature.
- Parameters:
- feature
The selected feature.
- ax
matplotlib.axes.Axes- clr
A seaborn color palette or an Iterable of colors. For example seaborn.color_palette(“deep”).
- imputed
Whether the imputed dataset should be considered.
- kde
Plot the kernel density estimation along with each histogram of continuous features.
- category
The category to classify histograms and stack them with different colors.
- x_values
Unique values of the feature. If None, it will be inferred from the dataset.
- legend
Show legends if
categoryis not None.- figure_kwargs
Arguments for
plt.figure.- bar_kwargs
Arguments for
ax.bar(used for frequencies of categorical features).- hist_kwargs
Arguments for
ax.hist(used for histograms of continuous features).- kde_kwargs
Arguments for
plot_kde()whenkdeis True.- 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