Skip to content

Commit

Permalink
Merge pull request #45 from marcpinet/feat-easier-metric-handling
Browse files Browse the repository at this point in the history
Feat easier metric handling
  • Loading branch information
marcpinet authored Sep 22, 2024
2 parents 884758a + 4fae3bc commit 66d338f
Show file tree
Hide file tree
Showing 9 changed files with 227 additions and 200 deletions.
52 changes: 26 additions & 26 deletions examples/classification-regression/mnist_loading_saved_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-23T23:32:44.879695500Z",
"start_time": "2024-04-23T23:32:41.806868Z"
"end_time": "2024-09-22T20:58:52.408452600Z",
"start_time": "2024-09-22T20:58:45.258396800Z"
}
},
"outputs": [],
Expand All @@ -47,8 +47,8 @@
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-23T23:32:45.056739600Z",
"start_time": "2024-04-23T23:32:44.879695500Z"
"end_time": "2024-09-22T20:58:55.090640900Z",
"start_time": "2024-09-22T20:58:54.943027500Z"
}
},
"outputs": [],
Expand All @@ -68,8 +68,8 @@
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-23T23:32:45.166846Z",
"start_time": "2024-04-23T23:32:45.059739600Z"
"end_time": "2024-09-22T20:58:56.605497Z",
"start_time": "2024-09-22T20:58:56.511603700Z"
}
},
"outputs": [],
Expand All @@ -92,8 +92,8 @@
"execution_count": 4,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-23T23:32:45.285935300Z",
"start_time": "2024-04-23T23:32:45.167845600Z"
"end_time": "2024-09-22T20:58:58.354481Z",
"start_time": "2024-09-22T20:58:58.201316400Z"
}
},
"outputs": [],
Expand All @@ -113,8 +113,8 @@
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-23T23:32:45.329886Z",
"start_time": "2024-04-23T23:32:45.288843800Z"
"end_time": "2024-09-22T20:59:00.067234500Z",
"start_time": "2024-09-22T20:59:00.052659300Z"
}
},
"outputs": [],
Expand All @@ -134,16 +134,16 @@
"execution_count": 6,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-23T23:32:45.374527900Z",
"start_time": "2024-04-23T23:32:45.314964200Z"
"end_time": "2024-09-22T20:59:02.252551200Z",
"start_time": "2024-09-22T20:59:02.216863600Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Validation Accuracy: 0.9738333333333333\n"
"Validation Accuracy: 0.9728333333333333\n"
]
}
],
Expand All @@ -165,27 +165,27 @@
"execution_count": 7,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-23T23:32:45.444303500Z",
"start_time": "2024-04-23T23:32:45.375529400Z"
"end_time": "2024-09-22T20:59:05.493573700Z",
"start_time": "2024-09-22T20:59:05.445749600Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Test Accuracy: 0.9549\n",
"Test Accuracy: 0.9567\n",
"Confusion Matrix:\n",
"[[ 958 0 3 0 0 3 7 2 4 3]\n",
" [ 0 1117 1 6 0 1 1 2 6 1]\n",
" [ 5 1 983 11 3 0 4 16 9 0]\n",
" [ 2 0 10 959 0 13 1 7 8 10]\n",
" [ 2 1 6 0 909 0 6 0 0 58]\n",
" [ 9 1 0 20 0 838 8 2 3 11]\n",
" [ 10 4 4 1 5 6 917 0 10 1]\n",
" [ 1 8 10 6 0 0 0 982 0 21]\n",
" [ 5 3 9 7 4 6 5 7 917 11]\n",
" [ 3 5 3 5 10 4 2 7 1 969]]\n"
"[[ 963 0 1 2 2 1 4 1 3 3]\n",
" [ 0 1119 2 3 0 1 1 2 6 1]\n",
" [ 5 3 990 8 3 1 4 10 8 0]\n",
" [ 1 2 5 966 1 19 1 6 4 5]\n",
" [ 1 1 2 0 932 1 8 0 4 33]\n",
" [ 7 0 1 15 2 852 5 1 6 3]\n",
" [ 4 5 2 3 5 14 921 0 4 0]\n",
" [ 0 9 17 5 6 0 0 969 2 20]\n",
" [ 8 1 7 20 3 11 8 3 899 14]\n",
" [ 3 2 1 10 18 9 0 8 2 956]]\n"
]
}
],
Expand Down
91 changes: 46 additions & 45 deletions examples/classification-regression/simple_cancer_binary.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2024-05-18T15:40:22.316823400Z",
"start_time": "2024-05-18T15:40:21.250682300Z"
"end_time": "2024-09-22T20:59:18.836461400Z",
"start_time": "2024-09-22T20:59:17.011617200Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -52,8 +52,8 @@
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2024-05-18T15:40:22.332821700Z",
"start_time": "2024-05-18T15:40:22.318819700Z"
"end_time": "2024-09-22T20:59:18.865525500Z",
"start_time": "2024-09-22T20:59:18.832952600Z"
}
},
"outputs": [],
Expand All @@ -74,8 +74,8 @@
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"end_time": "2024-05-18T15:40:22.347820300Z",
"start_time": "2024-05-18T15:40:22.333821900Z"
"end_time": "2024-09-22T20:59:18.877592Z",
"start_time": "2024-09-22T20:59:18.863022600Z"
}
},
"outputs": [],
Expand All @@ -98,8 +98,8 @@
"execution_count": 4,
"metadata": {
"ExecuteTime": {
"end_time": "2024-05-18T15:40:22.362820500Z",
"start_time": "2024-05-18T15:40:22.348820100Z"
"end_time": "2024-09-22T20:59:18.895612700Z",
"start_time": "2024-09-22T20:59:18.879095600Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -135,8 +135,8 @@
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2024-05-18T15:40:22.377825Z",
"start_time": "2024-05-18T15:40:22.364821200Z"
"end_time": "2024-09-22T20:59:22.297364300Z",
"start_time": "2024-09-22T20:59:22.282347400Z"
}
},
"outputs": [
Expand Down Expand Up @@ -188,42 +188,43 @@
"execution_count": 6,
"metadata": {
"ExecuteTime": {
"end_time": "2024-05-18T15:40:45.505483600Z",
"start_time": "2024-05-18T15:40:22.378824500Z"
"end_time": "2024-09-22T20:59:41.693163Z",
"start_time": "2024-09-22T20:59:24.562926Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[==============================] 100% Epoch 1/40 - loss: 0.6905 - - 0.04s\n",
"[==============================] 100% Epoch 2/40 - loss: 0.6785 - - 0.11s\n",
"[==============================] 100% Epoch 3/40 - loss: 0.6621 - - 0.10s\n",
"[==============================] 100% Epoch 4/40 - loss: 0.6432 - - 0.10s\n",
"[==============================] 100% Epoch 5/40 - loss: 0.6218 - - 0.10s\n",
"[==============================] 100% Epoch 6/40 - loss: 0.5978 - - 0.11s\n",
"[==============================] 100% Epoch 7/40 - loss: 0.5711 - - 0.10s\n",
"[==============================] 100% Epoch 8/40 - loss: 0.5420 - - 0.10s\n",
"[==============================] 100% Epoch 9/40 - loss: 0.5118 - - 0.12s\n",
"[==============================] 100% Epoch 10/40 - loss: 0.4814 - - 0.10s\n",
"[==============================] 100% Epoch 11/40 - loss: 0.4520 - - 0.09s\n",
"[==============================] 100% Epoch 12/40 - loss: 0.4250 - - 0.10s\n",
"[==============================] 100% Epoch 13/40 - loss: 0.4006 - - 0.09s\n",
"[==============================] 100% Epoch 14/40 - loss: 0.3795 - - 0.10s\n",
"[==============================] 100% Epoch 15/40 - loss: 0.3621 - - 0.10s\n",
"[==============================] 100% Epoch 16/40 - loss: 0.3485 - - 0.10s\n",
"[==============================] 100% Epoch 17/40 - loss: 0.3385 - - 0.10s\n",
"[==============================] 100% Epoch 18/40 - loss: 0.3314 - - 0.09s\n",
"[==============================] 100% Epoch 19/40 - loss: 0.3268 - - 0.10s\n",
"[==============================] 100% Epoch 20/40 - loss: 0.3241 - - 0.10s\n",
"[==============================] 100% Epoch 21/40 - loss: 0.3226 - - 0.09s\n",
"[==============================] 100% Epoch 22/40 - loss: 0.3219 - - 0.10s\n",
"[==============================] 100% Epoch 23/40 - loss: 0.3218 - - 0.13s\n",
"[==============================] 100% Epoch 24/40 - loss: 0.3230 - - 0.09s\n",
"[==============================] 100% Epoch 25/40 - loss: 0.3265 - - 0.10s\n",
"[==============================] 100% Epoch 26/40 - loss: 0.3318 - - 0.09s\n",
"Early stopping after 26 epochs.\n"
"[==============================] 100% Epoch 1/40 - loss: 0.6905 - - 0.05s\n",
"[==============================] 100% Epoch 2/40 - loss: 0.6785 - - 0.07s\n",
"[==============================] 100% Epoch 3/40 - loss: 0.6621 - - 0.07s\n",
"[==============================] 100% Epoch 4/40 - loss: 0.6432 - - 0.06s\n",
"[==============================] 100% Epoch 5/40 - loss: 0.6218 - - 0.06s\n",
"[==============================] 100% Epoch 6/40 - loss: 0.5978 - - 0.07s\n",
"[==============================] 100% Epoch 7/40 - loss: 0.5711 - - 0.06s\n",
"[==============================] 100% Epoch 8/40 - loss: 0.5420 - - 0.06s\n",
"[==============================] 100% Epoch 9/40 - loss: 0.5118 - - 0.06s\n",
"[==============================] 100% Epoch 10/40 - loss: 0.4814 - - 0.07s\n",
"[==============================] 100% Epoch 11/40 - loss: 0.4520 - - 0.06s\n",
"[==============================] 100% Epoch 12/40 - loss: 0.4250 - - 0.06s\n",
"[==============================] 100% Epoch 13/40 - loss: 0.4006 - - 0.06s\n",
"[==============================] 100% Epoch 14/40 - loss: 0.3795 - - 0.07s\n",
"[==============================] 100% Epoch 15/40 - loss: 0.3621 - - 0.06s\n",
"[==============================] 100% Epoch 16/40 - loss: 0.3485 - - 0.07s\n",
"[==============================] 100% Epoch 17/40 - loss: 0.3385 - - 0.06s\n",
"[==============================] 100% Epoch 18/40 - loss: 0.3314 - - 0.06s\n",
"[==============================] 100% Epoch 19/40 - loss: 0.3268 - - 0.06s\n",
"[==============================] 100% Epoch 20/40 - loss: 0.3241 - - 0.06s\n",
"[==============================] 100% Epoch 21/40 - loss: 0.3226 - - 0.06s\n",
"[==============================] 100% Epoch 22/40 - loss: 0.3219 - - 0.06s\n",
"[==============================] 100% Epoch 23/40 - loss: 0.3218 - - 0.06s\n",
"[==============================] 100% Epoch 24/40 - loss: 0.3230 - - 0.06s\n",
"[==============================] 100% Epoch 25/40 - loss: 0.3265 - - 0.07s\n",
"[==============================] 100% Epoch 26/40 - loss: 0.3318 - - 0.07s\n",
"\n",
"Early stopping after 26 epochs."
]
}
],
Expand All @@ -250,8 +251,8 @@
"execution_count": 7,
"metadata": {
"ExecuteTime": {
"end_time": "2024-05-18T15:40:45.518524100Z",
"start_time": "2024-05-18T15:40:45.504481900Z"
"end_time": "2024-09-22T21:00:04.635660300Z",
"start_time": "2024-09-22T21:00:04.617649200Z"
}
},
"outputs": [
Expand Down Expand Up @@ -280,8 +281,8 @@
"execution_count": 8,
"metadata": {
"ExecuteTime": {
"end_time": "2024-05-18T15:40:45.547522500Z",
"start_time": "2024-05-18T15:40:45.519524Z"
"end_time": "2024-09-22T21:00:07.348481800Z",
"start_time": "2024-09-22T21:00:07.333455600Z"
}
},
"outputs": [],
Expand All @@ -301,8 +302,8 @@
"execution_count": 9,
"metadata": {
"ExecuteTime": {
"end_time": "2024-05-18T15:40:45.553523700Z",
"start_time": "2024-05-18T15:40:45.536524300Z"
"end_time": "2024-09-22T21:00:08.471323500Z",
"start_time": "2024-09-22T21:00:08.455806100Z"
}
},
"outputs": [
Expand Down
Loading

0 comments on commit 66d338f

Please sign in to comment.