tabensemb.trainer.Trainer.plot_partial_dependence_2way#

method

Trainer.plot_partial_dependence_2way(x_feature: str, y_feature: str, program: str, model_name: str, df: DataFrame, derived_data: Dict[str, ndarray], ax: Axes | None = None, projection: str = '3d', grid_size: int = 10, percentile: int | float = 100, figure_kwargs: Dict | None = None, imshow_kwargs: Dict | None = None, surf_kwargs: Dict | None = None, savefig_kwargs: Dict | None = None, save_show_close: bool = True, **kwargs)[source]#

Calculate and plot a 2-way partial dependence plot with bootstrapping for a pair of features.

Parameters:
x_feature

A continuous feature.

y_feature

A continuous feature.

program

The selected model base.

model_name

The selected model in the model base.

ax

matplotlib.axes.Axes

projection

None or “3d”. Will use matplotlib.pyplot.imshow for None and matplotlib.pyplot.plot_surface for “3d”.

grid_size

The number of sequential values.

percentile

The percentile of the feature used to generate sequential values.

df

The tabular dataset.

derived_data

The derived data calculated using derive_unstacked().

kwargs

Other arguments for cal_partial_dependence_2way().

figure_kwargs

Arguments for plt.savefig

savefig_kwargs

Arguments for plt.savefig

imshow_kwargs

Arguments for plt.imshow

surf_kwargs

Arguments for plt.plot_surface

save_show_close

Whether to save, show (in the notebook), and close the figure if ax is not given.

kwargs

Arguments for cal_partial_dependence_2way().

Returns:
matplotlib.axes.Axes