def plot_predict_proba(y_pred_probs, clf, pdf=None):
"""Plots the predict proba distribution"""
fig, ax = plt.subplots(1, figsize=(18, 8))
sns.set_style("white")
sns.set_context("poster",
font_scale=2.25,
rc={"lines.linewidth": 1.25, "lines.markersize": 8})
sns.distplot(y_pred_probs)
plt.xlabel('predict_proba')
plt.ylabel('frequency')
plt.title(clf + ' proba')
if pdf:
pdf.savefig()
plt.close()
else:
plt.show()
评论列表
文章目录