Home > front end >  How to remove decile marks in partial dependence plots of sklearn?
How to remove decile marks in partial dependence plots of sklearn?

Time:09-17

In this Partial dependence plots

CodePudding user response:

The lines are attributes of the PartialDependenceDisplay returned by plot_partial_dependence. The attributes are called deciles_vlines_ (for vertical lines) and deciles_hlines_ for horizontal lines. If you don't want to show them you can set them to not be visible with e.g. plt.setp

import matplotlib.pyplot as plt
disp = plot_partial_dependence(...)
plt.setp(disp.deciles_vlines_, visible=False)
  • Related