-2

Is there a way to plot multiple features using pdp.pdp_plot function from the PDPbox python package? The python package is PDPbox https://pdpbox.readthedocs.io/en/latest/api.html

Currently, as I understand, the function can generate a plot for individual features and returns matplotlib figure and axis. It is hard to manage individual axis and assign them a new figure and compile all the axes into a figure.

edit:
Looks like it's not possible to plot multiple features simultaneously. Has someone figured out a way to extract the axis from pdp.pdp_plot function and put it in another figure along with other axes?

According to the documentation: https://pdpbox.readthedocs.io/en/latest/pdp_plot.html
The function returns fig: matplotlib Figure and axes: a dictionary of matplotlib Axes

How can I run the function for multiple features, save axes objects, and put all of them together in one figure?

1 Answers1

1

No, you can only use the pdp.pdp_plot method to plot the partial dependent plot for one feature (documentation: https://pdpbox.readthedocs.io/en/latest/pdp_plot.html)

Kim Tang
  • 2,330
  • 2
  • 9
  • 34