Guest User

Untitled

a guest
Nov 18th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. from pdpbox import pdp
  2. import plotly.offline as py
  3. from plotly.tools import mpl_to_plotly
  4. py.init_notebook_mode(connected=False)
  5.  
  6. for f in feats:
  7. pdp_dist = pdp.pdp_isolate(model=model, dataset=X, model_features=X.columns, feature=f)
  8. fig, axes = pdp.pdp_plot(pdp_dist, f, figsize=(8, 6), plot_params={
  9. # plot title and subtitle
  10. 'title': f,
  11. 'title_fontsize': 15,
  12. 'subtitle_fontsize': 10,
  13. })
  14. py.iplot(mpl_to_plotly(fig))
Add Comment
Please, Sign In to add comment