Commit e9fad6bd authored by Joaquin Torres's avatar Joaquin Torres

Removed sd shading

parent cf69c55e
...@@ -214,23 +214,14 @@ if __name__ == "__main__": ...@@ -214,23 +214,14 @@ if __name__ == "__main__":
# Append the interpolated TPR and AUC for this fold # Append the interpolated TPR and AUC for this fold
tprs.append(interp_tpr) tprs.append(interp_tpr)
aucs.append(roc_display.roc_auc) aucs.append(roc_display.roc_auc)
# Plot the diagonal line representing random guessing # Compute the mean of the TPRs
axes[model_idx].plot([0, 1], [0, 1], linestyle='--', lw=2, color='r', alpha=.8)
# Compute the mean and standard deviation of the TPRs
mean_tpr = np.mean(tprs, axis=0) mean_tpr = np.mean(tprs, axis=0)
mean_tpr[-1] = 1.0 mean_tpr[-1] = 1.0
mean_auc = auc(mean_fpr, mean_tpr) # Calculate the mean AUC mean_auc = auc(mean_fpr, mean_tpr) # Calculate the mean AUC
std_auc = np.std(aucs)
# Plot the mean ROC curve # Plot the mean ROC curve
axes[model_idx].plot(mean_fpr, mean_tpr, color='b', axes[model_idx].plot(mean_fpr, mean_tpr, color='b',
label=r'Mean ROC (AUC = %0.2f $\pm$ %0.2f)' % (mean_auc, std_auc), label=r'Mean ROC (AUC = %0.2f)' % mean_auc,
lw=2, alpha=.8) lw=2, alpha=.8)
# Plot the standard deviation of the TPRs
std_tpr = np.std(tprs, axis=0)
tprs_upper = np.minimum(mean_tpr + std_tpr, 1)
tprs_lower = np.maximum(mean_tpr - std_tpr, 0)
axes[model_idx].fill_between(mean_fpr, tprs_lower, tprs_upper, color='grey', alpha=.2,
label=r'$\pm$ 1 std. dev.')
# Set plot limits and title # Set plot limits and title
axes[model_idx].set(xlim=[-0.05, 1.05], ylim=[-0.05, 1.05], axes[model_idx].set(xlim=[-0.05, 1.05], ylim=[-0.05, 1.05],
title=f"ROC Curve - {model_name} ({group}-{method_names[j]})") title=f"ROC Curve - {model_name} ({group}-{method_names[j]})")
......
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