Skip to content

Commit

Permalink
some updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gykovacs committed Oct 3, 2024
1 parent dc59368 commit 7d760dc
Show file tree
Hide file tree
Showing 12 changed files with 869 additions and 806 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,6 @@
"print(tmp.to_latex(float_format=\"%.2f\").replace('_', ' '))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 34,
Expand Down Expand Up @@ -222,9 +215,9 @@
" p = np.sum(y_test)\n",
" n = len(y_test) - np.sum(y_test)\n",
"\n",
" acc = np.round((tp + tn) / (p + n), 4)\n",
" sens = np.round((tp) / (p), 4)\n",
" spec = np.round((tn) / (n), 4)\n",
" acc = (tp + tn) / (p + n)\n",
" sens = (tp) / (p)\n",
" spec = (tn) / (n)\n",
"\n",
" accs.append(acc)\n",
" senss.append(sens)\n",
Expand All @@ -242,7 +235,7 @@
" tp = np.sum((y_pred >= th) & (y_test == 1))\n",
" tn = np.sum((y_pred < th) & (y_test == 0))\n",
"\n",
" tmp_accs.append(np.round((tp + tn) / len(y_test), 4))\n",
" tmp_accs.append((tp + tn) / len(y_test))\n",
"\n",
" #print(th, np.mean(tmp_accs), best_acc)\n",
"\n",
Expand All @@ -260,9 +253,9 @@
" p = np.sum(y_test)\n",
" n = len(y_test) - np.sum(y_test)\n",
"\n",
" best_accs.append(np.round((tp + tn) / len(y_test), 4))\n",
" best_senss.append(np.round((tp) / (p), 4))\n",
" best_specs.append(np.round((tn) / (n), 4))\n",
" best_accs.append((tp + tn) / len(y_test))\n",
" best_senss.append((tp) / (p))\n",
" best_specs.append((tn) / (n))\n",
"\n",
" acc = np.mean(accs)\n",
" sens = np.mean(senss)\n",
Expand Down
298 changes: 298 additions & 0 deletions notebooks/auc_experiments/01-experiment-single.ipynb

Large diffs are not rendered by default.

271 changes: 0 additions & 271 deletions notebooks/auc_experiments/03-auc-test.ipynb

This file was deleted.

Loading

0 comments on commit 7d760dc

Please sign in to comment.