import seaborn as sns import matplotlib.pyplot as plt def plot_distribution_of_positive_predictions(model_uid, positive_predictions_series): """ Makes a density plot of the positive predictions. :param model_uid: model uid :param positive_predictions_series: series of positive predictions """ sns.kdeplot(positive_predictions_series, shade=True, color='b', legend=False) plt.xlabel('positive prediction space') plt.ylabel('density') plt.title('Positive Predictions Distribution') plt.savefig(os.path.join('modeling', model_uid, 'diagnostics', 'evaluation_plots', 'pos_prediction_distribution.png')) plt.clf()