imblearn_ozone_level.log 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. ///////////////////////////////////////////
  2. // Running CTAB-GAN on imblearn_ozone_level
  3. ///////////////////////////////////////////
  4. Load 'data_input/imblearn_ozone_level'
  5. from imblearn
  6. Data loaded.
  7. -> Shuffling data
  8. ### Start exercise for synthetic point generator
  9. ====== Step 1/5 =======
  10. -> Shuffling data
  11. -> Spliting data to slices
  12. ------ Step 1/5: Slice 1/5 -------
  13. -> Reset the GAN
  14. -> Train generator for synthetic samples
  15. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:01<00:15, 1.70s/it] 20%|██ | 2/10 [00:03<00:13, 1.71s/it] 30%|███ | 3/10 [00:10<00:28, 4.13s/it] 40%|████ | 4/10 [00:12<00:21, 3.50s/it] 50%|█████ | 5/10 [00:15<00:15, 3.03s/it] 60%|██████ | 6/10 [00:17<00:11, 2.79s/it] 70%|███████ | 7/10 [00:19<00:07, 2.58s/it] 80%|████████ | 8/10 [00:21<00:04, 2.43s/it] 90%|█████████ | 9/10 [00:23<00:02, 2.33s/it] 100%|██████████| 10/10 [00:26<00:00, 2.41s/it] 100%|██████████| 10/10 [00:26<00:00, 2.64s/it]
  16. -> create 1912 synthetic samples
  17. -> test with 'LR'
  18. LR tn, fp: 477, 16
  19. LR fn, tp: 9, 6
  20. LR f1 score: 0.324
  21. LR cohens kappa score: 0.300
  22. LR average precision score: 0.388
  23. -> test with 'GB'
  24. GB tn, fp: 489, 4
  25. GB fn, tp: 12, 3
  26. GB f1 score: 0.273
  27. GB cohens kappa score: 0.259
  28. -> test with 'KNN'
  29. KNN tn, fp: 489, 4
  30. KNN fn, tp: 15, 0
  31. KNN f1 score: 0.000
  32. KNN cohens kappa score: -0.013
  33. ------ Step 1/5: Slice 2/5 -------
  34. -> Reset the GAN
  35. -> Train generator for synthetic samples
  36. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:21, 2.35s/it] 20%|██ | 2/10 [00:04<00:19, 2.49s/it] 30%|███ | 3/10 [00:07<00:16, 2.43s/it] 40%|████ | 4/10 [00:09<00:15, 2.51s/it] 50%|█████ | 5/10 [00:12<00:12, 2.44s/it] 60%|██████ | 6/10 [00:14<00:09, 2.43s/it] 70%|███████ | 7/10 [00:17<00:07, 2.42s/it] 80%|████████ | 8/10 [00:19<00:04, 2.35s/it] 90%|█████████ | 9/10 [00:21<00:02, 2.26s/it] 100%|██████████| 10/10 [00:23<00:00, 2.25s/it] 100%|██████████| 10/10 [00:23<00:00, 2.35s/it]
  37. -> create 1912 synthetic samples
  38. -> test with 'LR'
  39. LR tn, fp: 470, 23
  40. LR fn, tp: 9, 6
  41. LR f1 score: 0.273
  42. LR cohens kappa score: 0.243
  43. LR average precision score: 0.166
  44. -> test with 'GB'
  45. GB tn, fp: 492, 1
  46. GB fn, tp: 12, 3
  47. GB f1 score: 0.316
  48. GB cohens kappa score: 0.307
  49. -> test with 'KNN'
  50. KNN tn, fp: 482, 11
  51. KNN fn, tp: 14, 1
  52. KNN f1 score: 0.074
  53. KNN cohens kappa score: 0.049
  54. ------ Step 1/5: Slice 3/5 -------
  55. -> Reset the GAN
  56. -> Train generator for synthetic samples
  57. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:22, 2.50s/it] 20%|██ | 2/10 [00:04<00:18, 2.30s/it] 30%|███ | 3/10 [00:06<00:15, 2.26s/it] 40%|████ | 4/10 [00:09<00:13, 2.28s/it] 50%|█████ | 5/10 [00:11<00:11, 2.25s/it] 60%|██████ | 6/10 [00:13<00:08, 2.24s/it] 70%|███████ | 7/10 [00:15<00:06, 2.24s/it] 80%|████████ | 8/10 [00:17<00:04, 2.18s/it] 90%|█████████ | 9/10 [00:20<00:02, 2.19s/it] 100%|██████████| 10/10 [00:22<00:00, 2.25s/it] 100%|██████████| 10/10 [00:22<00:00, 2.25s/it]
  58. -> create 1912 synthetic samples
  59. -> test with 'LR'
  60. LR tn, fp: 469, 24
  61. LR fn, tp: 8, 7
  62. LR f1 score: 0.304
  63. LR cohens kappa score: 0.276
  64. LR average precision score: 0.184
  65. -> test with 'GB'
  66. GB tn, fp: 491, 2
  67. GB fn, tp: 14, 1
  68. GB f1 score: 0.111
  69. GB cohens kappa score: 0.102
  70. -> test with 'KNN'
  71. KNN tn, fp: 488, 5
  72. KNN fn, tp: 15, 0
  73. KNN f1 score: 0.000
  74. KNN cohens kappa score: -0.015
  75. ------ Step 1/5: Slice 4/5 -------
  76. -> Reset the GAN
  77. -> Train generator for synthetic samples
  78. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:23, 2.62s/it] 20%|██ | 2/10 [00:06<00:29, 3.65s/it] 30%|███ | 3/10 [00:09<00:21, 3.05s/it] 40%|████ | 4/10 [00:11<00:16, 2.78s/it] 50%|█████ | 5/10 [00:13<00:12, 2.60s/it] 60%|██████ | 6/10 [00:16<00:10, 2.55s/it] 70%|███████ | 7/10 [00:18<00:07, 2.42s/it] 80%|████████ | 8/10 [00:20<00:04, 2.32s/it] 90%|█████████ | 9/10 [00:23<00:02, 2.34s/it] 100%|██████████| 10/10 [00:25<00:00, 2.27s/it] 100%|██████████| 10/10 [00:25<00:00, 2.52s/it]
  79. -> create 1912 synthetic samples
  80. -> test with 'LR'
  81. LR tn, fp: 477, 16
  82. LR fn, tp: 12, 3
  83. LR f1 score: 0.176
  84. LR cohens kappa score: 0.148
  85. LR average precision score: 0.116
  86. -> test with 'GB'
  87. GB tn, fp: 487, 6
  88. GB fn, tp: 13, 2
  89. GB f1 score: 0.174
  90. GB cohens kappa score: 0.157
  91. -> test with 'KNN'
  92. KNN tn, fp: 488, 5
  93. KNN fn, tp: 15, 0
  94. KNN f1 score: 0.000
  95. KNN cohens kappa score: -0.015
  96. ------ Step 1/5: Slice 5/5 -------
  97. -> Reset the GAN
  98. -> Train generator for synthetic samples
  99. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:19, 2.21s/it] 20%|██ | 2/10 [00:04<00:17, 2.16s/it] 30%|███ | 3/10 [00:06<00:14, 2.09s/it] 40%|████ | 4/10 [00:08<00:13, 2.17s/it] 50%|█████ | 5/10 [00:10<00:11, 2.20s/it] 60%|██████ | 6/10 [00:13<00:08, 2.21s/it] 70%|███████ | 7/10 [00:15<00:06, 2.22s/it] 80%|████████ | 8/10 [00:17<00:04, 2.17s/it] 90%|█████████ | 9/10 [00:19<00:02, 2.16s/it] 100%|██████████| 10/10 [00:21<00:00, 2.19s/it] 100%|██████████| 10/10 [00:21<00:00, 2.18s/it]
  100. -> create 1912 synthetic samples
  101. -> test with 'LR'
  102. LR tn, fp: 473, 18
  103. LR fn, tp: 9, 4
  104. LR f1 score: 0.229
  105. LR cohens kappa score: 0.203
  106. LR average precision score: 0.123
  107. -> test with 'GB'
  108. GB tn, fp: 488, 3
  109. GB fn, tp: 13, 0
  110. GB f1 score: 0.000
  111. GB cohens kappa score: -0.010
  112. -> test with 'KNN'
  113. KNN tn, fp: 481, 10
  114. KNN fn, tp: 13, 0
  115. KNN f1 score: 0.000
  116. KNN cohens kappa score: -0.023
  117. ====== Step 2/5 =======
  118. -> Shuffling data
  119. -> Spliting data to slices
  120. ------ Step 2/5: Slice 1/5 -------
  121. -> Reset the GAN
  122. -> Train generator for synthetic samples
  123. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:21, 2.35s/it] 20%|██ | 2/10 [00:04<00:17, 2.20s/it] 30%|███ | 3/10 [00:06<00:15, 2.22s/it] 40%|████ | 4/10 [00:08<00:13, 2.20s/it] 50%|█████ | 5/10 [00:11<00:10, 2.20s/it] 60%|██████ | 6/10 [00:13<00:08, 2.22s/it] 70%|███████ | 7/10 [00:15<00:06, 2.21s/it] 80%|████████ | 8/10 [00:17<00:04, 2.18s/it] 90%|█████████ | 9/10 [00:19<00:02, 2.15s/it] 100%|██████████| 10/10 [00:21<00:00, 2.19s/it] 100%|██████████| 10/10 [00:21<00:00, 2.20s/it]
  124. -> create 1912 synthetic samples
  125. -> test with 'LR'
  126. LR tn, fp: 479, 14
  127. LR fn, tp: 10, 5
  128. LR f1 score: 0.294
  129. LR cohens kappa score: 0.270
  130. LR average precision score: 0.253
  131. -> test with 'GB'
  132. GB tn, fp: 488, 5
  133. GB fn, tp: 13, 2
  134. GB f1 score: 0.182
  135. GB cohens kappa score: 0.166
  136. -> test with 'KNN'
  137. KNN tn, fp: 482, 11
  138. KNN fn, tp: 15, 0
  139. KNN f1 score: 0.000
  140. KNN cohens kappa score: -0.026
  141. ------ Step 2/5: Slice 2/5 -------
  142. -> Reset the GAN
  143. -> Train generator for synthetic samples
  144. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:19, 2.20s/it] 20%|██ | 2/10 [00:04<00:16, 2.12s/it] 30%|███ | 3/10 [00:06<00:15, 2.15s/it] 40%|████ | 4/10 [00:08<00:12, 2.14s/it] 50%|█████ | 5/10 [00:10<00:10, 2.10s/it] 60%|██████ | 6/10 [00:12<00:08, 2.16s/it] 70%|███████ | 7/10 [00:15<00:06, 2.17s/it] 80%|████████ | 8/10 [00:17<00:04, 2.18s/it] 90%|█████████ | 9/10 [00:19<00:02, 2.15s/it] 100%|██████████| 10/10 [00:21<00:00, 2.14s/it] 100%|██████████| 10/10 [00:21<00:00, 2.15s/it]
  145. -> create 1912 synthetic samples
  146. -> test with 'LR'
  147. LR tn, fp: 478, 15
  148. LR fn, tp: 9, 6
  149. LR f1 score: 0.333
  150. LR cohens kappa score: 0.310
  151. LR average precision score: 0.186
  152. -> test with 'GB'
  153. GB tn, fp: 491, 2
  154. GB fn, tp: 13, 2
  155. GB f1 score: 0.211
  156. GB cohens kappa score: 0.201
  157. -> test with 'KNN'
  158. KNN tn, fp: 487, 6
  159. KNN fn, tp: 15, 0
  160. KNN f1 score: 0.000
  161. KNN cohens kappa score: -0.017
  162. ------ Step 2/5: Slice 3/5 -------
  163. -> Reset the GAN
  164. -> Train generator for synthetic samples
  165. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:22, 2.47s/it] 20%|██ | 2/10 [00:04<00:19, 2.47s/it] 30%|███ | 3/10 [00:07<00:16, 2.39s/it] 40%|████ | 4/10 [00:09<00:14, 2.43s/it] 50%|█████ | 5/10 [00:11<00:11, 2.31s/it] 60%|██████ | 6/10 [00:14<00:09, 2.31s/it] 70%|███████ | 7/10 [00:16<00:06, 2.27s/it] 80%|████████ | 8/10 [00:18<00:04, 2.26s/it] 90%|█████████ | 9/10 [00:21<00:02, 2.41s/it] 100%|██████████| 10/10 [00:23<00:00, 2.40s/it] 100%|██████████| 10/10 [00:23<00:00, 2.37s/it]
  166. -> create 1912 synthetic samples
  167. -> test with 'LR'
  168. LR tn, fp: 477, 16
  169. LR fn, tp: 8, 7
  170. LR f1 score: 0.368
  171. LR cohens kappa score: 0.345
  172. LR average precision score: 0.261
  173. -> test with 'GB'
  174. GB tn, fp: 488, 5
  175. GB fn, tp: 13, 2
  176. GB f1 score: 0.182
  177. GB cohens kappa score: 0.166
  178. -> test with 'KNN'
  179. KNN tn, fp: 478, 15
  180. KNN fn, tp: 15, 0
  181. KNN f1 score: 0.000
  182. KNN cohens kappa score: -0.030
  183. ------ Step 2/5: Slice 4/5 -------
  184. -> Reset the GAN
  185. -> Train generator for synthetic samples
  186. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:22, 2.45s/it] 20%|██ | 2/10 [00:04<00:17, 2.24s/it] 30%|███ | 3/10 [00:06<00:16, 2.30s/it] 40%|████ | 4/10 [00:09<00:13, 2.29s/it] 50%|█████ | 5/10 [00:11<00:11, 2.25s/it] 60%|██████ | 6/10 [00:13<00:09, 2.25s/it] 70%|███████ | 7/10 [00:15<00:06, 2.24s/it] 80%|████████ | 8/10 [00:18<00:04, 2.26s/it] 90%|█████████ | 9/10 [00:20<00:02, 2.29s/it] 100%|██████████| 10/10 [00:22<00:00, 2.31s/it] 100%|██████████| 10/10 [00:22<00:00, 2.28s/it]
  187. -> create 1912 synthetic samples
  188. -> test with 'LR'
  189. LR tn, fp: 465, 28
  190. LR fn, tp: 13, 2
  191. LR f1 score: 0.089
  192. LR cohens kappa score: 0.052
  193. LR average precision score: 0.110
  194. -> test with 'GB'
  195. GB tn, fp: 490, 3
  196. GB fn, tp: 13, 2
  197. GB f1 score: 0.200
  198. GB cohens kappa score: 0.188
  199. -> test with 'KNN'
  200. KNN tn, fp: 486, 7
  201. KNN fn, tp: 15, 0
  202. KNN f1 score: 0.000
  203. KNN cohens kappa score: -0.019
  204. ------ Step 2/5: Slice 5/5 -------
  205. -> Reset the GAN
  206. -> Train generator for synthetic samples
  207. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:19, 2.18s/it] 20%|██ | 2/10 [00:04<00:18, 2.32s/it] 30%|███ | 3/10 [00:06<00:15, 2.26s/it] 40%|████ | 4/10 [00:08<00:13, 2.18s/it] 50%|█████ | 5/10 [00:10<00:10, 2.16s/it] 60%|██████ | 6/10 [00:13<00:08, 2.16s/it] 70%|███████ | 7/10 [00:15<00:06, 2.24s/it] 80%|████████ | 8/10 [00:17<00:04, 2.18s/it] 90%|█████████ | 9/10 [00:19<00:02, 2.16s/it] 100%|██████████| 10/10 [00:21<00:00, 2.12s/it] 100%|██████████| 10/10 [00:21<00:00, 2.17s/it]
  208. -> create 1912 synthetic samples
  209. -> test with 'LR'
  210. LR tn, fp: 471, 20
  211. LR fn, tp: 9, 4
  212. LR f1 score: 0.216
  213. LR cohens kappa score: 0.189
  214. LR average precision score: 0.146
  215. -> test with 'GB'
  216. GB tn, fp: 489, 2
  217. GB fn, tp: 12, 1
  218. GB f1 score: 0.125
  219. GB cohens kappa score: 0.116
  220. -> test with 'KNN'
  221. KNN tn, fp: 485, 6
  222. KNN fn, tp: 13, 0
  223. KNN f1 score: 0.000
  224. KNN cohens kappa score: -0.017
  225. ====== Step 3/5 =======
  226. -> Shuffling data
  227. -> Spliting data to slices
  228. ------ Step 3/5: Slice 1/5 -------
  229. -> Reset the GAN
  230. -> Train generator for synthetic samples
  231. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:19, 2.13s/it] 20%|██ | 2/10 [00:04<00:17, 2.18s/it] 30%|███ | 3/10 [00:06<00:14, 2.12s/it] 40%|████ | 4/10 [00:08<00:12, 2.14s/it] 50%|█████ | 5/10 [00:10<00:10, 2.13s/it] 60%|██████ | 6/10 [00:12<00:08, 2.16s/it] 70%|███████ | 7/10 [00:15<00:06, 2.22s/it] 80%|████████ | 8/10 [00:17<00:04, 2.22s/it] 90%|█████████ | 9/10 [00:19<00:02, 2.28s/it] 100%|██████████| 10/10 [00:22<00:00, 2.33s/it] 100%|██████████| 10/10 [00:22<00:00, 2.23s/it]
  232. -> create 1912 synthetic samples
  233. -> test with 'LR'
  234. LR tn, fp: 477, 16
  235. LR fn, tp: 10, 5
  236. LR f1 score: 0.278
  237. LR cohens kappa score: 0.252
  238. LR average precision score: 0.228
  239. -> test with 'GB'
  240. GB tn, fp: 488, 5
  241. GB fn, tp: 13, 2
  242. GB f1 score: 0.182
  243. GB cohens kappa score: 0.166
  244. -> test with 'KNN'
  245. KNN tn, fp: 486, 7
  246. KNN fn, tp: 15, 0
  247. KNN f1 score: 0.000
  248. KNN cohens kappa score: -0.019
  249. ------ Step 3/5: Slice 2/5 -------
  250. -> Reset the GAN
  251. -> Train generator for synthetic samples
  252. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:21, 2.37s/it] 20%|██ | 2/10 [00:04<00:18, 2.35s/it] 30%|███ | 3/10 [00:07<00:16, 2.43s/it] 40%|████ | 4/10 [00:09<00:13, 2.30s/it] 50%|█████ | 5/10 [00:11<00:11, 2.23s/it] 60%|██████ | 6/10 [00:13<00:08, 2.22s/it] 70%|███████ | 7/10 [00:15<00:06, 2.14s/it] 80%|████████ | 8/10 [00:17<00:04, 2.19s/it] 90%|█████████ | 9/10 [00:20<00:02, 2.16s/it] 100%|██████████| 10/10 [00:22<00:00, 2.21s/it] 100%|██████████| 10/10 [00:22<00:00, 2.23s/it]
  253. -> create 1912 synthetic samples
  254. -> test with 'LR'
  255. LR tn, fp: 477, 16
  256. LR fn, tp: 12, 3
  257. LR f1 score: 0.176
  258. LR cohens kappa score: 0.148
  259. LR average precision score: 0.106
  260. -> test with 'GB'
  261. GB tn, fp: 489, 4
  262. GB fn, tp: 13, 2
  263. GB f1 score: 0.190
  264. GB cohens kappa score: 0.177
  265. -> test with 'KNN'
  266. KNN tn, fp: 490, 3
  267. KNN fn, tp: 15, 0
  268. KNN f1 score: 0.000
  269. KNN cohens kappa score: -0.010
  270. ------ Step 3/5: Slice 3/5 -------
  271. -> Reset the GAN
  272. -> Train generator for synthetic samples
  273. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:20, 2.30s/it] 20%|██ | 2/10 [00:04<00:17, 2.22s/it] 30%|███ | 3/10 [00:06<00:15, 2.21s/it] 40%|████ | 4/10 [00:08<00:13, 2.18s/it] 50%|█████ | 5/10 [00:10<00:10, 2.19s/it] 60%|██████ | 6/10 [00:13<00:08, 2.17s/it] 70%|███████ | 7/10 [00:15<00:06, 2.08s/it] 80%|████████ | 8/10 [00:17<00:04, 2.15s/it] 90%|█████████ | 9/10 [00:19<00:02, 2.17s/it] 100%|██████████| 10/10 [00:21<00:00, 2.16s/it] 100%|██████████| 10/10 [00:21<00:00, 2.17s/it]
  274. -> create 1912 synthetic samples
  275. -> test with 'LR'
  276. LR tn, fp: 477, 16
  277. LR fn, tp: 7, 8
  278. LR f1 score: 0.410
  279. LR cohens kappa score: 0.388
  280. LR average precision score: 0.299
  281. -> test with 'GB'
  282. GB tn, fp: 489, 4
  283. GB fn, tp: 11, 4
  284. GB f1 score: 0.348
  285. GB cohens kappa score: 0.334
  286. -> test with 'KNN'
  287. KNN tn, fp: 489, 4
  288. KNN fn, tp: 14, 1
  289. KNN f1 score: 0.100
  290. KNN cohens kappa score: 0.087
  291. ------ Step 3/5: Slice 4/5 -------
  292. -> Reset the GAN
  293. -> Train generator for synthetic samples
  294. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:21, 2.38s/it] 20%|██ | 2/10 [00:04<00:19, 2.42s/it] 30%|███ | 3/10 [00:06<00:15, 2.27s/it] 40%|████ | 4/10 [00:09<00:13, 2.20s/it] 50%|█████ | 5/10 [00:11<00:11, 2.20s/it] 60%|██████ | 6/10 [00:13<00:09, 2.28s/it] 70%|███████ | 7/10 [00:15<00:06, 2.25s/it] 80%|████████ | 8/10 [00:17<00:04, 2.20s/it] 90%|█████████ | 9/10 [00:20<00:02, 2.21s/it] 100%|██████████| 10/10 [00:22<00:00, 2.15s/it] 100%|██████████| 10/10 [00:22<00:00, 2.22s/it]
  295. -> create 1912 synthetic samples
  296. -> test with 'LR'
  297. LR tn, fp: 477, 16
  298. LR fn, tp: 11, 4
  299. LR f1 score: 0.229
  300. LR cohens kappa score: 0.202
  301. LR average precision score: 0.143
  302. -> test with 'GB'
  303. GB tn, fp: 492, 1
  304. GB fn, tp: 13, 2
  305. GB f1 score: 0.222
  306. GB cohens kappa score: 0.214
  307. -> test with 'KNN'
  308. KNN tn, fp: 486, 7
  309. KNN fn, tp: 15, 0
  310. KNN f1 score: 0.000
  311. KNN cohens kappa score: -0.019
  312. ------ Step 3/5: Slice 5/5 -------
  313. -> Reset the GAN
  314. -> Train generator for synthetic samples
  315. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:20, 2.30s/it] 20%|██ | 2/10 [00:04<00:18, 2.32s/it] 30%|███ | 3/10 [00:08<00:22, 3.19s/it] 40%|████ | 4/10 [00:10<00:16, 2.78s/it] 50%|█████ | 5/10 [00:12<00:12, 2.49s/it] 60%|██████ | 6/10 [00:15<00:09, 2.46s/it] 70%|███████ | 7/10 [00:17<00:07, 2.37s/it] 80%|████████ | 8/10 [00:19<00:04, 2.31s/it] 90%|█████████ | 9/10 [00:21<00:02, 2.29s/it] 100%|██████████| 10/10 [00:24<00:00, 2.33s/it] 100%|██████████| 10/10 [00:24<00:00, 2.44s/it]
  316. -> create 1912 synthetic samples
  317. -> test with 'LR'
  318. LR tn, fp: 465, 26
  319. LR fn, tp: 9, 4
  320. LR f1 score: 0.186
  321. LR cohens kappa score: 0.156
  322. LR average precision score: 0.213
  323. -> test with 'GB'
  324. GB tn, fp: 484, 7
  325. GB fn, tp: 13, 0
  326. GB f1 score: 0.000
  327. GB cohens kappa score: -0.018
  328. -> test with 'KNN'
  329. KNN tn, fp: 486, 5
  330. KNN fn, tp: 13, 0
  331. KNN f1 score: 0.000
  332. KNN cohens kappa score: -0.015
  333. ====== Step 4/5 =======
  334. -> Shuffling data
  335. -> Spliting data to slices
  336. ------ Step 4/5: Slice 1/5 -------
  337. -> Reset the GAN
  338. -> Train generator for synthetic samples
  339. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:23, 2.57s/it] 20%|██ | 2/10 [00:04<00:18, 2.36s/it] 30%|███ | 3/10 [00:06<00:15, 2.26s/it] 40%|████ | 4/10 [00:09<00:13, 2.19s/it] 50%|█████ | 5/10 [00:11<00:10, 2.19s/it] 60%|██████ | 6/10 [00:13<00:08, 2.22s/it] 70%|███████ | 7/10 [00:15<00:06, 2.22s/it] 80%|████████ | 8/10 [00:18<00:04, 2.49s/it] 90%|█████████ | 9/10 [00:21<00:02, 2.45s/it] 100%|██████████| 10/10 [00:23<00:00, 2.31s/it] 100%|██████████| 10/10 [00:23<00:00, 2.31s/it]
  340. -> create 1912 synthetic samples
  341. -> test with 'LR'
  342. LR tn, fp: 475, 18
  343. LR fn, tp: 12, 3
  344. LR f1 score: 0.167
  345. LR cohens kappa score: 0.137
  346. LR average precision score: 0.135
  347. -> test with 'GB'
  348. GB tn, fp: 491, 2
  349. GB fn, tp: 13, 2
  350. GB f1 score: 0.211
  351. GB cohens kappa score: 0.201
  352. -> test with 'KNN'
  353. KNN tn, fp: 485, 8
  354. KNN fn, tp: 15, 0
  355. KNN f1 score: 0.000
  356. KNN cohens kappa score: -0.021
  357. ------ Step 4/5: Slice 2/5 -------
  358. -> Reset the GAN
  359. -> Train generator for synthetic samples
  360. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:20, 2.29s/it] 20%|██ | 2/10 [00:04<00:17, 2.22s/it] 30%|███ | 3/10 [00:06<00:15, 2.23s/it] 40%|████ | 4/10 [00:09<00:13, 2.28s/it] 50%|█████ | 5/10 [00:11<00:11, 2.29s/it] 60%|██████ | 6/10 [00:13<00:09, 2.31s/it] 70%|███████ | 7/10 [00:15<00:06, 2.27s/it] 80%|████████ | 8/10 [00:17<00:04, 2.20s/it] 90%|█████████ | 9/10 [00:20<00:02, 2.17s/it] 100%|██████████| 10/10 [00:22<00:00, 2.12s/it] 100%|██████████| 10/10 [00:22<00:00, 2.21s/it]
  361. -> create 1912 synthetic samples
  362. -> test with 'LR'
  363. LR tn, fp: 476, 17
  364. LR fn, tp: 12, 3
  365. LR f1 score: 0.171
  366. LR cohens kappa score: 0.142
  367. LR average precision score: 0.152
  368. -> test with 'GB'
  369. GB tn, fp: 491, 2
  370. GB fn, tp: 13, 2
  371. GB f1 score: 0.211
  372. GB cohens kappa score: 0.201
  373. -> test with 'KNN'
  374. KNN tn, fp: 489, 4
  375. KNN fn, tp: 15, 0
  376. KNN f1 score: 0.000
  377. KNN cohens kappa score: -0.013
  378. ------ Step 4/5: Slice 3/5 -------
  379. -> Reset the GAN
  380. -> Train generator for synthetic samples
  381. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:21, 2.36s/it] 20%|██ | 2/10 [00:04<00:18, 2.28s/it] 30%|███ | 3/10 [00:06<00:15, 2.21s/it] 40%|████ | 4/10 [00:08<00:12, 2.15s/it] 50%|█████ | 5/10 [00:10<00:10, 2.09s/it] 60%|██████ | 6/10 [00:13<00:08, 2.15s/it] 70%|███████ | 7/10 [00:15<00:06, 2.11s/it] 80%|████████ | 8/10 [00:17<00:04, 2.11s/it] 90%|█████████ | 9/10 [00:19<00:02, 2.08s/it] 100%|██████████| 10/10 [00:21<00:00, 2.11s/it] 100%|██████████| 10/10 [00:21<00:00, 2.13s/it]
  382. -> create 1912 synthetic samples
  383. -> test with 'LR'
  384. LR tn, fp: 469, 24
  385. LR fn, tp: 9, 6
  386. LR f1 score: 0.267
  387. LR cohens kappa score: 0.237
  388. LR average precision score: 0.147
  389. -> test with 'GB'
  390. GB tn, fp: 493, 0
  391. GB fn, tp: 13, 2
  392. GB f1 score: 0.235
  393. GB cohens kappa score: 0.230
  394. -> test with 'KNN'
  395. KNN tn, fp: 484, 9
  396. KNN fn, tp: 14, 1
  397. KNN f1 score: 0.080
  398. KNN cohens kappa score: 0.058
  399. ------ Step 4/5: Slice 4/5 -------
  400. -> Reset the GAN
  401. -> Train generator for synthetic samples
  402. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:20, 2.26s/it] 20%|██ | 2/10 [00:04<00:18, 2.31s/it] 30%|███ | 3/10 [00:06<00:15, 2.25s/it] 40%|████ | 4/10 [00:08<00:13, 2.20s/it] 50%|█████ | 5/10 [00:11<00:11, 2.29s/it] 60%|██████ | 6/10 [00:13<00:09, 2.27s/it] 70%|███████ | 7/10 [00:15<00:06, 2.23s/it] 80%|████████ | 8/10 [00:17<00:04, 2.23s/it] 90%|█████████ | 9/10 [00:20<00:02, 2.22s/it] 100%|██████████| 10/10 [00:22<00:00, 2.14s/it] 100%|██████████| 10/10 [00:22<00:00, 2.21s/it]
  403. -> create 1912 synthetic samples
  404. -> test with 'LR'
  405. LR tn, fp: 484, 9
  406. LR fn, tp: 7, 8
  407. LR f1 score: 0.500
  408. LR cohens kappa score: 0.484
  409. LR average precision score: 0.424
  410. -> test with 'GB'
  411. GB tn, fp: 491, 2
  412. GB fn, tp: 13, 2
  413. GB f1 score: 0.211
  414. GB cohens kappa score: 0.201
  415. -> test with 'KNN'
  416. KNN tn, fp: 484, 9
  417. KNN fn, tp: 15, 0
  418. KNN f1 score: 0.000
  419. KNN cohens kappa score: -0.023
  420. ------ Step 4/5: Slice 5/5 -------
  421. -> Reset the GAN
  422. -> Train generator for synthetic samples
  423. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:19, 2.18s/it] 20%|██ | 2/10 [00:04<00:17, 2.15s/it] 30%|███ | 3/10 [00:06<00:15, 2.25s/it] 40%|████ | 4/10 [00:08<00:13, 2.23s/it] 50%|█████ | 5/10 [00:11<00:11, 2.28s/it] 60%|██████ | 6/10 [00:13<00:09, 2.28s/it] 70%|███████ | 7/10 [00:15<00:06, 2.24s/it] 80%|████████ | 8/10 [00:18<00:04, 2.27s/it] 90%|█████████ | 9/10 [00:20<00:02, 2.26s/it] 100%|██████████| 10/10 [00:22<00:00, 2.24s/it] 100%|██████████| 10/10 [00:22<00:00, 2.25s/it]
  424. -> create 1912 synthetic samples
  425. -> test with 'LR'
  426. LR tn, fp: 475, 16
  427. LR fn, tp: 7, 6
  428. LR f1 score: 0.343
  429. LR cohens kappa score: 0.321
  430. LR average precision score: 0.181
  431. -> test with 'GB'
  432. GB tn, fp: 488, 3
  433. GB fn, tp: 10, 3
  434. GB f1 score: 0.316
  435. GB cohens kappa score: 0.304
  436. -> test with 'KNN'
  437. KNN tn, fp: 483, 8
  438. KNN fn, tp: 13, 0
  439. KNN f1 score: 0.000
  440. KNN cohens kappa score: -0.020
  441. ====== Step 5/5 =======
  442. -> Shuffling data
  443. -> Spliting data to slices
  444. ------ Step 5/5: Slice 1/5 -------
  445. -> Reset the GAN
  446. -> Train generator for synthetic samples
  447. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:21, 2.42s/it] 20%|██ | 2/10 [00:04<00:18, 2.32s/it] 30%|███ | 3/10 [00:06<00:15, 2.23s/it] 40%|████ | 4/10 [00:09<00:13, 2.24s/it] 50%|█████ | 5/10 [00:11<00:11, 2.26s/it] 60%|██████ | 6/10 [00:13<00:08, 2.22s/it] 70%|███████ | 7/10 [00:15<00:06, 2.18s/it] 80%|████████ | 8/10 [00:17<00:04, 2.19s/it] 90%|█████████ | 9/10 [00:19<00:02, 2.17s/it] 100%|██████████| 10/10 [00:22<00:00, 2.19s/it] 100%|██████████| 10/10 [00:22<00:00, 2.22s/it]
  448. -> create 1912 synthetic samples
  449. -> test with 'LR'
  450. LR tn, fp: 477, 16
  451. LR fn, tp: 7, 8
  452. LR f1 score: 0.410
  453. LR cohens kappa score: 0.388
  454. LR average precision score: 0.275
  455. -> test with 'GB'
  456. GB tn, fp: 491, 2
  457. GB fn, tp: 12, 3
  458. GB f1 score: 0.300
  459. GB cohens kappa score: 0.290
  460. -> test with 'KNN'
  461. KNN tn, fp: 485, 8
  462. KNN fn, tp: 15, 0
  463. KNN f1 score: 0.000
  464. KNN cohens kappa score: -0.021
  465. ------ Step 5/5: Slice 2/5 -------
  466. -> Reset the GAN
  467. -> Train generator for synthetic samples
  468. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:21, 2.35s/it] 20%|██ | 2/10 [00:04<00:18, 2.30s/it] 30%|███ | 3/10 [00:06<00:16, 2.30s/it] 40%|████ | 4/10 [00:08<00:13, 2.18s/it] 50%|█████ | 5/10 [00:11<00:10, 2.16s/it] 60%|██████ | 6/10 [00:13<00:08, 2.15s/it] 70%|███████ | 7/10 [00:15<00:06, 2.18s/it] 80%|████████ | 8/10 [00:17<00:04, 2.29s/it] 90%|█████████ | 9/10 [00:20<00:02, 2.30s/it] 100%|██████████| 10/10 [00:22<00:00, 2.31s/it] 100%|██████████| 10/10 [00:22<00:00, 2.26s/it]
  469. -> create 1912 synthetic samples
  470. -> test with 'LR'
  471. LR tn, fp: 479, 14
  472. LR fn, tp: 11, 4
  473. LR f1 score: 0.242
  474. LR cohens kappa score: 0.217
  475. LR average precision score: 0.200
  476. -> test with 'GB'
  477. GB tn, fp: 489, 4
  478. GB fn, tp: 14, 1
  479. GB f1 score: 0.100
  480. GB cohens kappa score: 0.087
  481. -> test with 'KNN'
  482. KNN tn, fp: 488, 5
  483. KNN fn, tp: 14, 1
  484. KNN f1 score: 0.095
  485. KNN cohens kappa score: 0.080
  486. ------ Step 5/5: Slice 3/5 -------
  487. -> Reset the GAN
  488. -> Train generator for synthetic samples
  489. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:19, 2.20s/it] 20%|██ | 2/10 [00:04<00:18, 2.25s/it] 30%|███ | 3/10 [00:06<00:15, 2.28s/it] 40%|████ | 4/10 [00:08<00:13, 2.21s/it] 50%|█████ | 5/10 [00:10<00:10, 2.14s/it] 60%|██████ | 6/10 [00:12<00:08, 2.07s/it] 70%|███████ | 7/10 [00:14<00:06, 2.09s/it] 80%|████████ | 8/10 [00:17<00:04, 2.12s/it] 90%|█████████ | 9/10 [00:19<00:02, 2.20s/it] 100%|██████████| 10/10 [00:21<00:00, 2.24s/it] 100%|██████████| 10/10 [00:21<00:00, 2.19s/it]
  490. -> create 1912 synthetic samples
  491. -> test with 'LR'
  492. LR tn, fp: 482, 11
  493. LR fn, tp: 10, 5
  494. LR f1 score: 0.323
  495. LR cohens kappa score: 0.301
  496. LR average precision score: 0.242
  497. -> test with 'GB'
  498. GB tn, fp: 493, 0
  499. GB fn, tp: 14, 1
  500. GB f1 score: 0.125
  501. GB cohens kappa score: 0.122
  502. -> test with 'KNN'
  503. KNN tn, fp: 481, 12
  504. KNN fn, tp: 15, 0
  505. KNN f1 score: 0.000
  506. KNN cohens kappa score: -0.027
  507. ------ Step 5/5: Slice 4/5 -------
  508. -> Reset the GAN
  509. -> Train generator for synthetic samples
  510. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:20, 2.32s/it] 20%|██ | 2/10 [00:04<00:18, 2.37s/it] 30%|███ | 3/10 [00:06<00:16, 2.31s/it] 40%|████ | 4/10 [00:09<00:13, 2.33s/it] 50%|█████ | 5/10 [00:11<00:11, 2.34s/it] 60%|██████ | 6/10 [00:14<00:09, 2.35s/it] 70%|███████ | 7/10 [00:16<00:07, 2.35s/it] 80%|████████ | 8/10 [00:18<00:04, 2.29s/it] 90%|█████████ | 9/10 [00:20<00:02, 2.30s/it] 100%|██████████| 10/10 [00:23<00:00, 2.33s/it] 100%|██████████| 10/10 [00:23<00:00, 2.33s/it]
  511. -> create 1912 synthetic samples
  512. -> test with 'LR'
  513. LR tn, fp: 475, 18
  514. LR fn, tp: 10, 5
  515. LR f1 score: 0.263
  516. LR cohens kappa score: 0.236
  517. LR average precision score: 0.203
  518. -> test with 'GB'
  519. GB tn, fp: 490, 3
  520. GB fn, tp: 12, 3
  521. GB f1 score: 0.286
  522. GB cohens kappa score: 0.273
  523. -> test with 'KNN'
  524. KNN tn, fp: 486, 7
  525. KNN fn, tp: 15, 0
  526. KNN f1 score: 0.000
  527. KNN cohens kappa score: -0.019
  528. ------ Step 5/5: Slice 5/5 -------
  529. -> Reset the GAN
  530. -> Train generator for synthetic samples
  531. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:02<00:22, 2.54s/it] 20%|██ | 2/10 [00:04<00:19, 2.47s/it] 30%|███ | 3/10 [00:07<00:15, 2.28s/it] 40%|████ | 4/10 [00:09<00:13, 2.22s/it] 50%|█████ | 5/10 [00:11<00:10, 2.18s/it] 60%|██████ | 6/10 [00:13<00:08, 2.22s/it] 70%|███████ | 7/10 [00:15<00:06, 2.24s/it] 80%|████████ | 8/10 [00:17<00:04, 2.19s/it] 90%|█████████ | 9/10 [00:20<00:02, 2.20s/it] 100%|██████████| 10/10 [00:22<00:00, 2.17s/it] 100%|██████████| 10/10 [00:22<00:00, 2.22s/it]
  532. -> create 1912 synthetic samples
  533. -> test with 'LR'
  534. LR tn, fp: 474, 17
  535. LR fn, tp: 10, 3
  536. LR f1 score: 0.182
  537. LR cohens kappa score: 0.155
  538. LR average precision score: 0.151
  539. -> test with 'GB'
  540. GB tn, fp: 488, 3
  541. GB fn, tp: 10, 3
  542. GB f1 score: 0.316
  543. GB cohens kappa score: 0.304
  544. -> test with 'KNN'
  545. KNN tn, fp: 487, 4
  546. KNN fn, tp: 13, 0
  547. KNN f1 score: 0.000
  548. KNN cohens kappa score: -0.012
  549. ### Exercise is done.
  550. -----[ LR ]-----
  551. maximum:
  552. LR tn, fp: 484, 28
  553. LR fn, tp: 13, 8
  554. LR f1 score: 0.500
  555. LR cohens kappa score: 0.484
  556. LR average precision score: 0.424
  557. average:
  558. LR tn, fp: 475.0, 17.6
  559. LR fn, tp: 9.6, 5.0
  560. LR f1 score: 0.270
  561. LR cohens kappa score: 0.244
  562. LR average precision score: 0.201
  563. minimum:
  564. LR tn, fp: 465, 9
  565. LR fn, tp: 7, 2
  566. LR f1 score: 0.089
  567. LR cohens kappa score: 0.052
  568. LR average precision score: 0.106
  569. -----[ GB ]-----
  570. maximum:
  571. GB tn, fp: 493, 7
  572. GB fn, tp: 14, 4
  573. GB f1 score: 0.348
  574. GB cohens kappa score: 0.334
  575. average:
  576. GB tn, fp: 489.6, 3.0
  577. GB fn, tp: 12.6, 2.0
  578. GB f1 score: 0.201
  579. GB cohens kappa score: 0.189
  580. minimum:
  581. GB tn, fp: 484, 0
  582. GB fn, tp: 10, 0
  583. GB f1 score: 0.000
  584. GB cohens kappa score: -0.018
  585. -----[ KNN ]-----
  586. maximum:
  587. KNN tn, fp: 490, 15
  588. KNN fn, tp: 15, 1
  589. KNN f1 score: 0.100
  590. KNN cohens kappa score: 0.087
  591. average:
  592. KNN tn, fp: 485.4, 7.2
  593. KNN fn, tp: 14.44, 0.16
  594. KNN f1 score: 0.014
  595. KNN cohens kappa score: -0.005
  596. minimum:
  597. KNN tn, fp: 478, 3
  598. KNN fn, tp: 13, 0
  599. KNN f1 score: 0.000
  600. KNN cohens kappa score: -0.030