Skip to content

Commit cff7c24

Browse files
committed
Correlation analysis between image properties and model predictions
1 parent ce0a25c commit cff7c24

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

notebooks/04_bias_analysis.ipynb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,26 @@
11911191
"plot_slice_auc(\"AUC by Resolution Slice\", auc_resolution)\n",
11921192
"plot_slice_auc(\"AUC by Confidence Bucket\", auc_confidence)\n"
11931193
]
1194+
},
1195+
{
1196+
"cell_type": "code",
1197+
"execution_count": null,
1198+
"id": "b2d2386f",
1199+
"metadata": {},
1200+
"outputs": [],
1201+
"source": [
1202+
"# Correlation analysis between image properties and model predictions\n",
1203+
"\n",
1204+
"import seaborn as sns\n",
1205+
"import matplotlib.pyplot as plt\n",
1206+
"\n",
1207+
"corr = df[[\"brightness\",\"resolution\",\"prob_pneumonia\",\"prob_normal\"]].corr()\n",
1208+
"\n",
1209+
"plt.figure(figsize=(6,4))\n",
1210+
"sns.heatmap(corr, annot=True, cmap=\"Blues\", fmt=\".2f\")\n",
1211+
"plt.title(\"Feature Correlation Heatmap\")\n",
1212+
"plt.show()\n"
1213+
]
11941214
}
11951215
],
11961216
"metadata": {

0 commit comments

Comments
 (0)