Commit 18034aa8 authored by Joaquin Torres's avatar Joaquin Torres

PR curves working as expected. Need to analyze efficiency of doing cv twice

parent f128a515
...@@ -236,9 +236,9 @@ if __name__ == "__main__": ...@@ -236,9 +236,9 @@ if __name__ == "__main__":
mean_precision = np.mean(precisions, axis=0) mean_precision = np.mean(precisions, axis=0)
mean_pr_auc = np.mean(pr_aucs) mean_pr_auc = np.mean(pr_aucs)
axes[model_idx][1].plot(mean_recall, mean_precision, color='b', lw=4, label=r'Mean PR (AUC = %0.2f)' % mean_pr_auc, alpha=.8) axes[model_idx][1].plot(mean_recall, mean_precision, color='b', lw=4, label=r'Mean PR (AUC = %0.2f)' % mean_pr_auc, alpha=.8)
# # Plot baseline precision (proportion of positive samples) # Plot baseline precision (proportion of positive samples)
# baseline = np.sum(y_train) / len(y_train) baseline = np.sum(y_train) / len(y_train)
# axes[model_idx][1].plot([0, 1], [baseline, baseline], linestyle='--', lw=2, color='r', alpha=.8, label='Baseline') axes[model_idx][1].plot([0, 1], [baseline, baseline], linestyle='--', lw=2, color='r', alpha=.8, label='Baseline')
# Set Precision-Recall plot limits and title # Set Precision-Recall plot limits and title
axes[model_idx][1].set(xlim=[-0.05, 1.05], ylim=[-0.05, 1.05], title=f"Precision-Recall Curve - {model_name} ({group}-{method_names[j]})") axes[model_idx][1].set(xlim=[-0.05, 1.05], ylim=[-0.05, 1.05], title=f"Precision-Recall Curve - {model_name} ({group}-{method_names[j]})")
axes[model_idx][1].legend(loc="lower right") axes[model_idx][1].legend(loc="lower right")
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment