Commit 9fa990e0 authored by Joaquin Torres's avatar Joaquin Torres

ROC curves looking good

parent f8e93c2e
......@@ -216,9 +216,8 @@ if __name__ == "__main__":
# Append the interpolated TPR and AUC for this fold
tprs.append(interp_tpr)
aucs.append(roc_display.roc_auc)
# Plot the diagonal line representing random guessing
axes[model_idx].plot([0, 1], [0, 1], linestyle='--', lw=2, color='r', alpha=.8)
axes[model_idx].plot([0, 1], [0, 1], linestyle='--', lw=2, color='r', alpha=.8, label='Random guessing')
# Compute the mean of the TPRs
mean_tpr = np.mean(tprs, axis=0)
mean_tpr[-1] = 1.0
......@@ -230,11 +229,10 @@ if __name__ == "__main__":
axes[model_idx].set(xlim=[-0.05, 1.05], ylim=[-0.05, 1.05],
title=f"ROC Curve - {model_name} ({group}-{method_names[j]})")
axes[model_idx].legend(loc="lower right")
# Store the DataFrame in the dictionary with a unique key for each sheet
sheet_name = f"{group}_{method_names[j]}"
scores_sheets[sheet_name] = scores_df
# Adjust layout and save/show figure
# Adjust layout and save figure
plt.tight_layout()
plt.savefig(f'./output_cv_metrics/curves/{group}_{method_names[j]}.svg', format='svg', dpi=500)
plt.close(fig)
......
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