Skip to content

Commit a916cc0

Browse files
committed
update figures for book
1 parent 6b69f46 commit a916cc0

File tree

2 files changed

+589
-576
lines changed

2 files changed

+589
-576
lines changed

auto_ph.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,17 @@ def plot_coefs(coef_list, model_list, title_model, column_order):
234234
:param column_order: List of column names to preserve coloring
235235
from previous coefficient plots.
236236
"""
237-
237+
238238
for j, frame in enumerate(coef_list):
239-
239+
240240
auc_ = model_list[j].auc(valid=True)
241241
title_ = title_model + ' Model: {j}\n GBM AUC: {auc:.2f}'.format(j=str(j + 1), auc=auc_)
242242
fig, ax_ = plt.subplots(figsize=(10, 8))
243243
_ = frame[column_order].plot(kind='barh',
244244
ax=ax_,
245245
title=title_,
246-
colormap='gnuplot')
246+
edgecolor=['black']*len(frame.index),
247+
colormap='cool')
247248

248249

249250
def cv_model_rank(valid, seed_, model_name_list, nfolds=5):
@@ -499,7 +500,7 @@ def plot_pd_ice(x_name, par_dep_frame, ax=None):
499500

500501
# plot ICE
501502
par_dep_frame.drop('partial_dependence', axis=1).plot(x=x_name,
502-
colormap='gnuplot',
503+
colormap='cool',
503504
ax=ax)
504505
# overlay partial dependence, annotate plot
505506
par_dep_frame.plot(title='Partial Dependence with ICE: ' + x_name,
@@ -514,7 +515,7 @@ def plot_pd_ice(x_name, par_dep_frame, ax=None):
514515

515516
# plot ICE
516517
par_dep_frame.drop('partial_dependence', axis=1).plot(x=x_name,
517-
colormap='gnuplot',
518+
colormap='cool',
518519
ax=ax)
519520

520521
# overlay partial dependence, annotate plot

0 commit comments

Comments
 (0)