folding_flare-F.log 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. ///////////////////////////////////////////
  2. // Running CTAB-GAN on folding_flare-F
  3. ///////////////////////////////////////////
  4. Load 'data_input/folding_flare-F'
  5. from pickle file
  6. non empty cut in data_input/folding_flare-F! (23 points)
  7. Data loaded.
  8. -> Shuffling data
  9. ### Start exercise for synthetic point generator
  10. ====== Step 1/5 =======
  11. -> Shuffling data
  12. -> Spliting data to slices
  13. ------ Step 1/5: Slice 1/5 -------
  14. -> Reset the GAN
  15. -> Train generator for synthetic samples
  16. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:08, 1.10it/s] 20%|██ | 2/10 [00:01<00:07, 1.06it/s] 30%|███ | 3/10 [00:02<00:06, 1.15it/s] 40%|████ | 4/10 [00:03<00:04, 1.26it/s] 50%|█████ | 5/10 [00:04<00:03, 1.26it/s] 60%|██████ | 6/10 [00:04<00:03, 1.31it/s] 70%|███████ | 7/10 [00:05<00:02, 1.31it/s] 80%|████████ | 8/10 [00:06<00:01, 1.29it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.31it/s] 100%|██████████| 10/10 [00:07<00:00, 1.35it/s] 100%|██████████| 10/10 [00:07<00:00, 1.28it/s]
  17. -> create 784 synthetic samples
  18. -> test with 'LR'
  19. LR tn, fp: 193, 12
  20. LR fn, tp: 7, 2
  21. LR f1 score: 0.174
  22. LR cohens kappa score: 0.129
  23. LR average precision score: 0.131
  24. -> test with 'GB'
  25. GB tn, fp: 200, 5
  26. GB fn, tp: 8, 1
  27. GB f1 score: 0.133
  28. GB cohens kappa score: 0.103
  29. -> test with 'KNN'
  30. KNN tn, fp: 180, 25
  31. KNN fn, tp: 5, 4
  32. KNN f1 score: 0.211
  33. KNN cohens kappa score: 0.156
  34. ------ Step 1/5: Slice 2/5 -------
  35. -> Reset the GAN
  36. -> Train generator for synthetic samples
  37. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:07, 1.19it/s] 20%|██ | 2/10 [00:01<00:05, 1.34it/s] 30%|███ | 3/10 [00:02<00:05, 1.35it/s] 40%|████ | 4/10 [00:03<00:04, 1.33it/s] 50%|█████ | 5/10 [00:03<00:03, 1.31it/s] 60%|██████ | 6/10 [00:04<00:02, 1.36it/s] 70%|███████ | 7/10 [00:05<00:02, 1.39it/s] 80%|████████ | 8/10 [00:05<00:01, 1.35it/s] 90%|█████████ | 9/10 [00:06<00:00, 1.34it/s] 100%|██████████| 10/10 [00:07<00:00, 1.37it/s] 100%|██████████| 10/10 [00:07<00:00, 1.35it/s]
  38. -> create 784 synthetic samples
  39. -> test with 'LR'
  40. LR tn, fp: 187, 18
  41. LR fn, tp: 2, 7
  42. LR f1 score: 0.412
  43. LR cohens kappa score: 0.373
  44. LR average precision score: 0.416
  45. -> test with 'GB'
  46. GB tn, fp: 202, 3
  47. GB fn, tp: 7, 2
  48. GB f1 score: 0.286
  49. GB cohens kappa score: 0.264
  50. -> test with 'KNN'
  51. KNN tn, fp: 187, 18
  52. KNN fn, tp: 5, 4
  53. KNN f1 score: 0.258
  54. KNN cohens kappa score: 0.211
  55. ------ Step 1/5: Slice 3/5 -------
  56. -> Reset the GAN
  57. -> Train generator for synthetic samples
  58. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:07, 1.14it/s] 20%|██ | 2/10 [00:01<00:06, 1.23it/s] 30%|███ | 3/10 [00:02<00:05, 1.28it/s] 40%|████ | 4/10 [00:03<00:04, 1.28it/s] 50%|█████ | 5/10 [00:04<00:04, 1.23it/s] 60%|██████ | 6/10 [00:04<00:03, 1.33it/s] 70%|███████ | 7/10 [00:05<00:02, 1.35it/s] 80%|████████ | 8/10 [00:06<00:01, 1.34it/s] 90%|█████████ | 9/10 [00:06<00:00, 1.38it/s] 100%|██████████| 10/10 [00:07<00:00, 1.33it/s] 100%|██████████| 10/10 [00:07<00:00, 1.31it/s]
  59. -> create 784 synthetic samples
  60. -> test with 'LR'
  61. LR tn, fp: 184, 21
  62. LR fn, tp: 2, 7
  63. LR f1 score: 0.378
  64. LR cohens kappa score: 0.336
  65. LR average precision score: 0.330
  66. -> test with 'GB'
  67. GB tn, fp: 205, 0
  68. GB fn, tp: 9, 0
  69. GB f1 score: 0.000
  70. GB cohens kappa score: 0.000
  71. -> test with 'KNN'
  72. KNN tn, fp: 187, 18
  73. KNN fn, tp: 2, 7
  74. KNN f1 score: 0.412
  75. KNN cohens kappa score: 0.373
  76. ------ Step 1/5: Slice 4/5 -------
  77. -> Reset the GAN
  78. -> Train generator for synthetic samples
  79. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:07, 1.17it/s] 20%|██ | 2/10 [00:01<00:07, 1.08it/s] 30%|███ | 3/10 [00:02<00:06, 1.14it/s] 40%|████ | 4/10 [00:03<00:05, 1.19it/s] 50%|█████ | 5/10 [00:04<00:04, 1.24it/s] 60%|██████ | 6/10 [00:04<00:03, 1.25it/s] 70%|███████ | 7/10 [00:05<00:02, 1.29it/s] 80%|████████ | 8/10 [00:06<00:01, 1.33it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.25it/s] 100%|██████████| 10/10 [00:08<00:00, 1.26it/s] 100%|██████████| 10/10 [00:08<00:00, 1.24it/s]
  80. -> create 784 synthetic samples
  81. -> test with 'LR'
  82. LR tn, fp: 202, 3
  83. LR fn, tp: 4, 5
  84. LR f1 score: 0.588
  85. LR cohens kappa score: 0.571
  86. LR average precision score: 0.548
  87. -> test with 'GB'
  88. GB tn, fp: 204, 1
  89. GB fn, tp: 7, 2
  90. GB f1 score: 0.333
  91. GB cohens kappa score: 0.319
  92. -> test with 'KNN'
  93. KNN tn, fp: 199, 6
  94. KNN fn, tp: 8, 1
  95. KNN f1 score: 0.125
  96. KNN cohens kappa score: 0.092
  97. ------ Step 1/5: Slice 5/5 -------
  98. -> Reset the GAN
  99. -> Train generator for synthetic samples
  100. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:07, 1.15it/s] 20%|██ | 2/10 [00:01<00:06, 1.30it/s] 30%|███ | 3/10 [00:02<00:05, 1.23it/s] 40%|████ | 4/10 [00:03<00:04, 1.26it/s] 50%|█████ | 5/10 [00:04<00:04, 1.24it/s] 60%|██████ | 6/10 [00:04<00:03, 1.24it/s] 70%|███████ | 7/10 [00:05<00:02, 1.26it/s] 80%|████████ | 8/10 [00:06<00:01, 1.22it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.22it/s] 100%|██████████| 10/10 [00:08<00:00, 1.21it/s] 100%|██████████| 10/10 [00:08<00:00, 1.23it/s]
  101. -> create 784 synthetic samples
  102. -> test with 'LR'
  103. LR tn, fp: 194, 9
  104. LR fn, tp: 5, 2
  105. LR f1 score: 0.222
  106. LR cohens kappa score: 0.189
  107. LR average precision score: 0.172
  108. -> test with 'GB'
  109. GB tn, fp: 200, 3
  110. GB fn, tp: 6, 1
  111. GB f1 score: 0.182
  112. GB cohens kappa score: 0.161
  113. -> test with 'KNN'
  114. KNN tn, fp: 191, 12
  115. KNN fn, tp: 5, 2
  116. KNN f1 score: 0.190
  117. KNN cohens kappa score: 0.153
  118. ====== Step 2/5 =======
  119. -> Shuffling data
  120. -> Spliting data to slices
  121. ------ Step 2/5: Slice 1/5 -------
  122. -> Reset the GAN
  123. -> Train generator for synthetic samples
  124. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:01<00:09, 1.08s/it] 20%|██ | 2/10 [00:01<00:07, 1.11it/s] 30%|███ | 3/10 [00:02<00:05, 1.19it/s] 40%|████ | 4/10 [00:03<00:04, 1.26it/s] 50%|█████ | 5/10 [00:04<00:04, 1.23it/s] 60%|██████ | 6/10 [00:04<00:03, 1.25it/s] 70%|███████ | 7/10 [00:05<00:02, 1.25it/s] 80%|████████ | 8/10 [00:07<00:01, 1.05it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.11it/s] 100%|██████████| 10/10 [00:08<00:00, 1.17it/s] 100%|██████████| 10/10 [00:08<00:00, 1.17it/s]
  125. -> create 784 synthetic samples
  126. -> test with 'LR'
  127. LR tn, fp: 182, 23
  128. LR fn, tp: 2, 7
  129. LR f1 score: 0.359
  130. LR cohens kappa score: 0.315
  131. LR average precision score: 0.350
  132. -> test with 'GB'
  133. GB tn, fp: 203, 2
  134. GB fn, tp: 7, 2
  135. GB f1 score: 0.308
  136. GB cohens kappa score: 0.289
  137. -> test with 'KNN'
  138. KNN tn, fp: 190, 15
  139. KNN fn, tp: 3, 6
  140. KNN f1 score: 0.400
  141. KNN cohens kappa score: 0.362
  142. ------ Step 2/5: Slice 2/5 -------
  143. -> Reset the GAN
  144. -> Train generator for synthetic samples
  145. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:07, 1.18it/s] 20%|██ | 2/10 [00:01<00:07, 1.07it/s] 30%|███ | 3/10 [00:02<00:06, 1.09it/s] 40%|████ | 4/10 [00:03<00:05, 1.06it/s] 50%|█████ | 5/10 [00:04<00:04, 1.14it/s] 60%|██████ | 6/10 [00:05<00:03, 1.25it/s] 70%|███████ | 7/10 [00:06<00:02, 1.19it/s] 80%|████████ | 8/10 [00:07<00:01, 1.07it/s] 90%|█████████ | 9/10 [00:08<00:00, 1.07it/s] 100%|██████████| 10/10 [00:08<00:00, 1.15it/s] 100%|██████████| 10/10 [00:08<00:00, 1.13it/s]
  146. -> create 784 synthetic samples
  147. -> test with 'LR'
  148. LR tn, fp: 184, 21
  149. LR fn, tp: 3, 6
  150. LR f1 score: 0.333
  151. LR cohens kappa score: 0.288
  152. LR average precision score: 0.256
  153. -> test with 'GB'
  154. GB tn, fp: 203, 2
  155. GB fn, tp: 7, 2
  156. GB f1 score: 0.308
  157. GB cohens kappa score: 0.289
  158. -> test with 'KNN'
  159. KNN tn, fp: 189, 16
  160. KNN fn, tp: 7, 2
  161. KNN f1 score: 0.148
  162. KNN cohens kappa score: 0.098
  163. ------ Step 2/5: Slice 3/5 -------
  164. -> Reset the GAN
  165. -> Train generator for synthetic samples
  166. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:07, 1.19it/s] 20%|██ | 2/10 [00:01<00:06, 1.26it/s] 30%|███ | 3/10 [00:02<00:05, 1.22it/s] 40%|████ | 4/10 [00:03<00:05, 1.12it/s] 50%|█████ | 5/10 [00:04<00:04, 1.18it/s] 60%|██████ | 6/10 [00:05<00:03, 1.18it/s] 70%|███████ | 7/10 [00:06<00:02, 1.14it/s] 80%|████████ | 8/10 [00:06<00:01, 1.17it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.23it/s] 100%|██████████| 10/10 [00:08<00:00, 1.28it/s] 100%|██████████| 10/10 [00:08<00:00, 1.21it/s]
  167. -> create 784 synthetic samples
  168. -> test with 'LR'
  169. LR tn, fp: 200, 5
  170. LR fn, tp: 8, 1
  171. LR f1 score: 0.133
  172. LR cohens kappa score: 0.103
  173. LR average precision score: 0.253
  174. -> test with 'GB'
  175. GB tn, fp: 205, 0
  176. GB fn, tp: 8, 1
  177. GB f1 score: 0.200
  178. GB cohens kappa score: 0.193
  179. -> test with 'KNN'
  180. KNN tn, fp: 189, 16
  181. KNN fn, tp: 7, 2
  182. KNN f1 score: 0.148
  183. KNN cohens kappa score: 0.098
  184. ------ Step 2/5: Slice 4/5 -------
  185. -> Reset the GAN
  186. -> Train generator for synthetic samples
  187. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:06, 1.37it/s] 20%|██ | 2/10 [00:01<00:05, 1.35it/s] 30%|███ | 3/10 [00:02<00:05, 1.26it/s] 40%|████ | 4/10 [00:03<00:04, 1.33it/s] 50%|█████ | 5/10 [00:03<00:03, 1.31it/s] 60%|██████ | 6/10 [00:04<00:03, 1.31it/s] 70%|███████ | 7/10 [00:05<00:02, 1.31it/s] 80%|████████ | 8/10 [00:06<00:01, 1.30it/s] 90%|█████████ | 9/10 [00:06<00:00, 1.26it/s] 100%|██████████| 10/10 [00:07<00:00, 1.23it/s] 100%|██████████| 10/10 [00:07<00:00, 1.28it/s]
  188. -> create 784 synthetic samples
  189. -> test with 'LR'
  190. LR tn, fp: 186, 19
  191. LR fn, tp: 3, 6
  192. LR f1 score: 0.353
  193. LR cohens kappa score: 0.310
  194. LR average precision score: 0.254
  195. -> test with 'GB'
  196. GB tn, fp: 204, 1
  197. GB fn, tp: 8, 1
  198. GB f1 score: 0.182
  199. GB cohens kappa score: 0.169
  200. -> test with 'KNN'
  201. KNN tn, fp: 190, 15
  202. KNN fn, tp: 5, 4
  203. KNN f1 score: 0.286
  204. KNN cohens kappa score: 0.242
  205. ------ Step 2/5: Slice 5/5 -------
  206. -> Reset the GAN
  207. -> Train generator for synthetic samples
  208. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:01<00:09, 1.03s/it] 20%|██ | 2/10 [00:01<00:07, 1.06it/s] 30%|███ | 3/10 [00:02<00:06, 1.06it/s] 40%|████ | 4/10 [00:03<00:05, 1.13it/s] 50%|█████ | 5/10 [00:04<00:04, 1.24it/s] 60%|██████ | 6/10 [00:05<00:03, 1.22it/s] 70%|███████ | 7/10 [00:06<00:02, 1.20it/s] 80%|████████ | 8/10 [00:06<00:01, 1.21it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.25it/s] 100%|██████████| 10/10 [00:08<00:00, 1.24it/s] 100%|██████████| 10/10 [00:08<00:00, 1.19it/s]
  209. -> create 784 synthetic samples
  210. -> test with 'LR'
  211. LR tn, fp: 179, 24
  212. LR fn, tp: 0, 7
  213. LR f1 score: 0.368
  214. LR cohens kappa score: 0.332
  215. LR average precision score: 0.401
  216. -> test with 'GB'
  217. GB tn, fp: 201, 2
  218. GB fn, tp: 6, 1
  219. GB f1 score: 0.200
  220. GB cohens kappa score: 0.184
  221. -> test with 'KNN'
  222. KNN tn, fp: 187, 16
  223. KNN fn, tp: 2, 5
  224. KNN f1 score: 0.357
  225. KNN cohens kappa score: 0.323
  226. ====== Step 3/5 =======
  227. -> Shuffling data
  228. -> Spliting data to slices
  229. ------ Step 3/5: Slice 1/5 -------
  230. -> Reset the GAN
  231. -> Train generator for synthetic samples
  232. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:07, 1.19it/s] 20%|██ | 2/10 [00:01<00:05, 1.35it/s] 30%|███ | 3/10 [00:02<00:05, 1.37it/s] 40%|████ | 4/10 [00:03<00:04, 1.34it/s] 50%|█████ | 5/10 [00:03<00:03, 1.27it/s] 60%|██████ | 6/10 [00:04<00:03, 1.29it/s] 70%|███████ | 7/10 [00:05<00:02, 1.28it/s] 80%|████████ | 8/10 [00:06<00:01, 1.28it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.24it/s] 100%|██████████| 10/10 [00:07<00:00, 1.27it/s] 100%|██████████| 10/10 [00:07<00:00, 1.29it/s]
  233. -> create 784 synthetic samples
  234. -> test with 'LR'
  235. LR tn, fp: 195, 10
  236. LR fn, tp: 1, 8
  237. LR f1 score: 0.593
  238. LR cohens kappa score: 0.568
  239. LR average precision score: 0.542
  240. -> test with 'GB'
  241. GB tn, fp: 205, 0
  242. GB fn, tp: 9, 0
  243. GB f1 score: 0.000
  244. GB cohens kappa score: 0.000
  245. -> test with 'KNN'
  246. KNN tn, fp: 192, 13
  247. KNN fn, tp: 3, 6
  248. KNN f1 score: 0.429
  249. KNN cohens kappa score: 0.394
  250. ------ Step 3/5: Slice 2/5 -------
  251. -> Reset the GAN
  252. -> Train generator for synthetic samples
  253. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:08, 1.09it/s] 20%|██ | 2/10 [00:01<00:05, 1.35it/s] 30%|███ | 3/10 [00:02<00:05, 1.32it/s] 40%|████ | 4/10 [00:02<00:04, 1.42it/s] 50%|█████ | 5/10 [00:03<00:03, 1.44it/s] 60%|██████ | 6/10 [00:04<00:02, 1.43it/s] 70%|███████ | 7/10 [00:04<00:02, 1.46it/s] 80%|████████ | 8/10 [00:05<00:01, 1.40it/s] 90%|█████████ | 9/10 [00:06<00:00, 1.33it/s] 100%|██████████| 10/10 [00:07<00:00, 1.36it/s] 100%|██████████| 10/10 [00:07<00:00, 1.37it/s]
  254. -> create 784 synthetic samples
  255. -> test with 'LR'
  256. LR tn, fp: 196, 9
  257. LR fn, tp: 6, 3
  258. LR f1 score: 0.286
  259. LR cohens kappa score: 0.250
  260. LR average precision score: 0.243
  261. -> test with 'GB'
  262. GB tn, fp: 200, 5
  263. GB fn, tp: 6, 3
  264. GB f1 score: 0.353
  265. GB cohens kappa score: 0.326
  266. -> test with 'KNN'
  267. KNN tn, fp: 188, 17
  268. KNN fn, tp: 6, 3
  269. KNN f1 score: 0.207
  270. KNN cohens kappa score: 0.158
  271. ------ Step 3/5: Slice 3/5 -------
  272. -> Reset the GAN
  273. -> Train generator for synthetic samples
  274. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:06, 1.40it/s] 20%|██ | 2/10 [00:01<00:05, 1.42it/s] 30%|███ | 3/10 [00:02<00:05, 1.37it/s] 40%|████ | 4/10 [00:02<00:04, 1.40it/s] 50%|█████ | 5/10 [00:03<00:03, 1.40it/s] 60%|██████ | 6/10 [00:04<00:02, 1.38it/s] 70%|███████ | 7/10 [00:05<00:02, 1.39it/s] 80%|████████ | 8/10 [00:06<00:01, 1.23it/s] 90%|█████████ | 9/10 [00:06<00:00, 1.23it/s] 100%|██████████| 10/10 [00:07<00:00, 1.14it/s] 100%|██████████| 10/10 [00:07<00:00, 1.27it/s]
  275. -> create 784 synthetic samples
  276. -> test with 'LR'
  277. LR tn, fp: 184, 21
  278. LR fn, tp: 3, 6
  279. LR f1 score: 0.333
  280. LR cohens kappa score: 0.288
  281. LR average precision score: 0.287
  282. -> test with 'GB'
  283. GB tn, fp: 204, 1
  284. GB fn, tp: 9, 0
  285. GB f1 score: 0.000
  286. GB cohens kappa score: -0.008
  287. -> test with 'KNN'
  288. KNN tn, fp: 186, 19
  289. KNN fn, tp: 4, 5
  290. KNN f1 score: 0.303
  291. KNN cohens kappa score: 0.258
  292. ------ Step 3/5: Slice 4/5 -------
  293. -> Reset the GAN
  294. -> Train generator for synthetic samples
  295. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:07, 1.26it/s] 20%|██ | 2/10 [00:01<00:06, 1.28it/s] 30%|███ | 3/10 [00:02<00:05, 1.29it/s] 40%|████ | 4/10 [00:03<00:04, 1.36it/s] 50%|█████ | 5/10 [00:03<00:03, 1.37it/s] 60%|██████ | 6/10 [00:04<00:02, 1.36it/s] 70%|███████ | 7/10 [00:05<00:02, 1.30it/s] 80%|████████ | 8/10 [00:06<00:01, 1.31it/s] 90%|█████████ | 9/10 [00:06<00:00, 1.36it/s] 100%|██████████| 10/10 [00:07<00:00, 1.32it/s] 100%|██████████| 10/10 [00:07<00:00, 1.32it/s]
  296. -> create 784 synthetic samples
  297. -> test with 'LR'
  298. LR tn, fp: 186, 19
  299. LR fn, tp: 4, 5
  300. LR f1 score: 0.303
  301. LR cohens kappa score: 0.258
  302. LR average precision score: 0.283
  303. -> test with 'GB'
  304. GB tn, fp: 205, 0
  305. GB fn, tp: 9, 0
  306. GB f1 score: 0.000
  307. GB cohens kappa score: 0.000
  308. -> test with 'KNN'
  309. KNN tn, fp: 189, 16
  310. KNN fn, tp: 4, 5
  311. KNN f1 score: 0.333
  312. KNN cohens kappa score: 0.292
  313. ------ Step 3/5: Slice 5/5 -------
  314. -> Reset the GAN
  315. -> Train generator for synthetic samples
  316. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:01<00:09, 1.02s/it] 20%|██ | 2/10 [00:01<00:06, 1.18it/s] 30%|███ | 3/10 [00:02<00:05, 1.21it/s] 40%|████ | 4/10 [00:03<00:05, 1.12it/s] 50%|█████ | 5/10 [00:04<00:04, 1.12it/s] 60%|██████ | 6/10 [00:05<00:03, 1.16it/s] 70%|███████ | 7/10 [00:06<00:02, 1.19it/s] 80%|████████ | 8/10 [00:06<00:01, 1.16it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.21it/s] 100%|██████████| 10/10 [00:08<00:00, 1.28it/s] 100%|██████████| 10/10 [00:08<00:00, 1.19it/s]
  317. -> create 784 synthetic samples
  318. -> test with 'LR'
  319. LR tn, fp: 172, 31
  320. LR fn, tp: 2, 5
  321. LR f1 score: 0.233
  322. LR cohens kappa score: 0.187
  323. LR average precision score: 0.278
  324. -> test with 'GB'
  325. GB tn, fp: 199, 4
  326. GB fn, tp: 6, 1
  327. GB f1 score: 0.167
  328. GB cohens kappa score: 0.143
  329. -> test with 'KNN'
  330. KNN tn, fp: 186, 17
  331. KNN fn, tp: 5, 2
  332. KNN f1 score: 0.154
  333. KNN cohens kappa score: 0.111
  334. ====== Step 4/5 =======
  335. -> Shuffling data
  336. -> Spliting data to slices
  337. ------ Step 4/5: Slice 1/5 -------
  338. -> Reset the GAN
  339. -> Train generator for synthetic samples
  340. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:01<00:09, 1.03s/it] 20%|██ | 2/10 [00:01<00:07, 1.05it/s] 30%|███ | 3/10 [00:02<00:06, 1.15it/s] 40%|████ | 4/10 [00:03<00:05, 1.19it/s] 50%|█████ | 5/10 [00:04<00:04, 1.19it/s] 60%|██████ | 6/10 [00:05<00:03, 1.19it/s] 70%|███████ | 7/10 [00:05<00:02, 1.28it/s] 80%|████████ | 8/10 [00:06<00:01, 1.28it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.17it/s] 100%|██████████| 10/10 [00:08<00:00, 1.12it/s] 100%|██████████| 10/10 [00:08<00:00, 1.16it/s]
  341. -> create 784 synthetic samples
  342. -> test with 'LR'
  343. LR tn, fp: 184, 21
  344. LR fn, tp: 5, 4
  345. LR f1 score: 0.235
  346. LR cohens kappa score: 0.185
  347. LR average precision score: 0.141
  348. -> test with 'GB'
  349. GB tn, fp: 199, 6
  350. GB fn, tp: 9, 0
  351. GB f1 score: 0.000
  352. GB cohens kappa score: -0.035
  353. -> test with 'KNN'
  354. KNN tn, fp: 186, 19
  355. KNN fn, tp: 7, 2
  356. KNN f1 score: 0.133
  357. KNN cohens kappa score: 0.079
  358. ------ Step 4/5: Slice 2/5 -------
  359. -> Reset the GAN
  360. -> Train generator for synthetic samples
  361. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:08, 1.07it/s] 20%|██ | 2/10 [00:01<00:07, 1.13it/s] 30%|███ | 3/10 [00:02<00:05, 1.17it/s] 40%|████ | 4/10 [00:03<00:04, 1.22it/s] 50%|█████ | 5/10 [00:04<00:03, 1.28it/s] 60%|██████ | 6/10 [00:04<00:03, 1.27it/s] 70%|███████ | 7/10 [00:05<00:02, 1.22it/s] 80%|████████ | 8/10 [00:06<00:01, 1.23it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.25it/s] 100%|██████████| 10/10 [00:08<00:00, 1.29it/s] 100%|██████████| 10/10 [00:08<00:00, 1.24it/s]
  362. -> create 784 synthetic samples
  363. -> test with 'LR'
  364. LR tn, fp: 186, 19
  365. LR fn, tp: 3, 6
  366. LR f1 score: 0.353
  367. LR cohens kappa score: 0.310
  368. LR average precision score: 0.532
  369. -> test with 'GB'
  370. GB tn, fp: 203, 2
  371. GB fn, tp: 8, 1
  372. GB f1 score: 0.167
  373. GB cohens kappa score: 0.149
  374. -> test with 'KNN'
  375. KNN tn, fp: 187, 18
  376. KNN fn, tp: 4, 5
  377. KNN f1 score: 0.312
  378. KNN cohens kappa score: 0.268
  379. ------ Step 4/5: Slice 3/5 -------
  380. -> Reset the GAN
  381. -> Train generator for synthetic samples
  382. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:01<00:09, 1.11s/it] 20%|██ | 2/10 [00:01<00:07, 1.04it/s] 30%|███ | 3/10 [00:02<00:06, 1.16it/s] 40%|████ | 4/10 [00:03<00:05, 1.19it/s] 50%|█████ | 5/10 [00:04<00:03, 1.27it/s] 60%|██████ | 6/10 [00:05<00:03, 1.21it/s] 70%|███████ | 7/10 [00:05<00:02, 1.20it/s] 80%|████████ | 8/10 [00:06<00:01, 1.25it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.20it/s] 100%|██████████| 10/10 [00:08<00:00, 1.24it/s] 100%|██████████| 10/10 [00:08<00:00, 1.20it/s]
  383. -> create 784 synthetic samples
  384. -> test with 'LR'
  385. LR tn, fp: 173, 32
  386. LR fn, tp: 4, 5
  387. LR f1 score: 0.217
  388. LR cohens kappa score: 0.161
  389. LR average precision score: 0.226
  390. -> test with 'GB'
  391. GB tn, fp: 202, 3
  392. GB fn, tp: 7, 2
  393. GB f1 score: 0.286
  394. GB cohens kappa score: 0.264
  395. -> test with 'KNN'
  396. KNN tn, fp: 183, 22
  397. KNN fn, tp: 4, 5
  398. KNN f1 score: 0.278
  399. KNN cohens kappa score: 0.229
  400. ------ Step 4/5: Slice 4/5 -------
  401. -> Reset the GAN
  402. -> Train generator for synthetic samples
  403. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:08, 1.09it/s] 20%|██ | 2/10 [00:01<00:06, 1.24it/s] 30%|███ | 3/10 [00:02<00:05, 1.21it/s] 40%|████ | 4/10 [00:03<00:05, 1.19it/s] 50%|█████ | 5/10 [00:04<00:04, 1.22it/s] 60%|██████ | 6/10 [00:05<00:03, 1.20it/s] 70%|███████ | 7/10 [00:05<00:02, 1.14it/s] 80%|████████ | 8/10 [00:06<00:01, 1.20it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.29it/s] 100%|██████████| 10/10 [00:08<00:00, 1.30it/s] 100%|██████████| 10/10 [00:08<00:00, 1.23it/s]
  404. -> create 784 synthetic samples
  405. -> test with 'LR'
  406. LR tn, fp: 188, 17
  407. LR fn, tp: 2, 7
  408. LR f1 score: 0.424
  409. LR cohens kappa score: 0.387
  410. LR average precision score: 0.361
  411. -> test with 'GB'
  412. GB tn, fp: 201, 4
  413. GB fn, tp: 5, 4
  414. GB f1 score: 0.471
  415. GB cohens kappa score: 0.449
  416. -> test with 'KNN'
  417. KNN tn, fp: 191, 14
  418. KNN fn, tp: 4, 5
  419. KNN f1 score: 0.357
  420. KNN cohens kappa score: 0.318
  421. ------ Step 4/5: Slice 5/5 -------
  422. -> Reset the GAN
  423. -> Train generator for synthetic samples
  424. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:08, 1.05it/s] 20%|██ | 2/10 [00:01<00:06, 1.16it/s] 30%|███ | 3/10 [00:02<00:05, 1.19it/s] 40%|████ | 4/10 [00:03<00:05, 1.16it/s] 50%|█████ | 5/10 [00:04<00:04, 1.16it/s] 60%|██████ | 6/10 [00:05<00:03, 1.21it/s] 70%|███████ | 7/10 [00:05<00:02, 1.25it/s] 80%|████████ | 8/10 [00:06<00:01, 1.32it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.24it/s] 100%|██████████| 10/10 [00:08<00:00, 1.23it/s] 100%|██████████| 10/10 [00:08<00:00, 1.21it/s]
  425. -> create 784 synthetic samples
  426. -> test with 'LR'
  427. LR tn, fp: 200, 3
  428. LR fn, tp: 3, 4
  429. LR f1 score: 0.571
  430. LR cohens kappa score: 0.557
  431. LR average precision score: 0.522
  432. -> test with 'GB'
  433. GB tn, fp: 202, 1
  434. GB fn, tp: 6, 1
  435. GB f1 score: 0.222
  436. GB cohens kappa score: 0.211
  437. -> test with 'KNN'
  438. KNN tn, fp: 192, 11
  439. KNN fn, tp: 3, 4
  440. KNN f1 score: 0.364
  441. KNN cohens kappa score: 0.333
  442. ====== Step 5/5 =======
  443. -> Shuffling data
  444. -> Spliting data to slices
  445. ------ Step 5/5: Slice 1/5 -------
  446. -> Reset the GAN
  447. -> Train generator for synthetic samples
  448. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:07, 1.20it/s] 20%|██ | 2/10 [00:01<00:06, 1.31it/s] 30%|███ | 3/10 [00:02<00:05, 1.30it/s] 40%|████ | 4/10 [00:03<00:04, 1.34it/s] 50%|█████ | 5/10 [00:03<00:03, 1.30it/s] 60%|██████ | 6/10 [00:04<00:03, 1.29it/s] 70%|███████ | 7/10 [00:05<00:02, 1.28it/s] 80%|████████ | 8/10 [00:06<00:01, 1.28it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.23it/s] 100%|██████████| 10/10 [00:07<00:00, 1.27it/s] 100%|██████████| 10/10 [00:07<00:00, 1.28it/s]
  449. -> create 784 synthetic samples
  450. -> test with 'LR'
  451. LR tn, fp: 179, 26
  452. LR fn, tp: 3, 6
  453. LR f1 score: 0.293
  454. LR cohens kappa score: 0.243
  455. LR average precision score: 0.215
  456. -> test with 'GB'
  457. GB tn, fp: 202, 3
  458. GB fn, tp: 8, 1
  459. GB f1 score: 0.154
  460. GB cohens kappa score: 0.131
  461. -> test with 'KNN'
  462. KNN tn, fp: 183, 22
  463. KNN fn, tp: 3, 6
  464. KNN f1 score: 0.324
  465. KNN cohens kappa score: 0.278
  466. ------ Step 5/5: Slice 2/5 -------
  467. -> Reset the GAN
  468. -> Train generator for synthetic samples
  469. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:07, 1.18it/s] 20%|██ | 2/10 [00:01<00:06, 1.33it/s] 30%|███ | 3/10 [00:02<00:05, 1.23it/s] 40%|████ | 4/10 [00:03<00:04, 1.21it/s] 50%|█████ | 5/10 [00:04<00:04, 1.18it/s] 60%|██████ | 6/10 [00:04<00:03, 1.18it/s] 70%|███████ | 7/10 [00:05<00:02, 1.17it/s] 80%|████████ | 8/10 [00:06<00:01, 1.18it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.16it/s] 100%|██████████| 10/10 [00:08<00:00, 1.20it/s] 100%|██████████| 10/10 [00:08<00:00, 1.20it/s]
  470. -> create 784 synthetic samples
  471. -> test with 'LR'
  472. LR tn, fp: 186, 19
  473. LR fn, tp: 2, 7
  474. LR f1 score: 0.400
  475. LR cohens kappa score: 0.360
  476. LR average precision score: 0.308
  477. -> test with 'GB'
  478. GB tn, fp: 204, 1
  479. GB fn, tp: 8, 1
  480. GB f1 score: 0.182
  481. GB cohens kappa score: 0.169
  482. -> test with 'KNN'
  483. KNN tn, fp: 184, 21
  484. KNN fn, tp: 5, 4
  485. KNN f1 score: 0.235
  486. KNN cohens kappa score: 0.185
  487. ------ Step 5/5: Slice 3/5 -------
  488. -> Reset the GAN
  489. -> Train generator for synthetic samples
  490. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:01<00:11, 1.31s/it] 20%|██ | 2/10 [00:02<00:07, 1.02it/s] 30%|███ | 3/10 [00:02<00:05, 1.17it/s] 40%|████ | 4/10 [00:03<00:04, 1.23it/s] 50%|█████ | 5/10 [00:04<00:04, 1.18it/s] 60%|██████ | 6/10 [00:05<00:03, 1.19it/s] 70%|███████ | 7/10 [00:06<00:02, 1.18it/s] 80%|████████ | 8/10 [00:06<00:01, 1.26it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.32it/s] 100%|██████████| 10/10 [00:08<00:00, 1.24it/s] 100%|██████████| 10/10 [00:08<00:00, 1.19it/s]
  491. -> create 784 synthetic samples
  492. -> test with 'LR'
  493. LR tn, fp: 194, 11
  494. LR fn, tp: 1, 8
  495. LR f1 score: 0.571
  496. LR cohens kappa score: 0.545
  497. LR average precision score: 0.429
  498. -> test with 'GB'
  499. GB tn, fp: 203, 2
  500. GB fn, tp: 7, 2
  501. GB f1 score: 0.308
  502. GB cohens kappa score: 0.289
  503. -> test with 'KNN'
  504. KNN tn, fp: 188, 17
  505. KNN fn, tp: 4, 5
  506. KNN f1 score: 0.323
  507. KNN cohens kappa score: 0.280
  508. ------ Step 5/5: Slice 4/5 -------
  509. -> Reset the GAN
  510. -> Train generator for synthetic samples
  511. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:01<00:11, 1.28s/it] 20%|██ | 2/10 [00:01<00:07, 1.08it/s] 30%|███ | 3/10 [00:02<00:05, 1.24it/s] 40%|████ | 4/10 [00:03<00:04, 1.25it/s] 50%|█████ | 5/10 [00:04<00:03, 1.29it/s] 60%|██████ | 6/10 [00:04<00:03, 1.25it/s] 70%|███████ | 7/10 [00:05<00:02, 1.28it/s] 80%|████████ | 8/10 [00:06<00:01, 1.30it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.34it/s] 100%|██████████| 10/10 [00:07<00:00, 1.34it/s] 100%|██████████| 10/10 [00:07<00:00, 1.26it/s]
  512. -> create 784 synthetic samples
  513. -> test with 'LR'
  514. LR tn, fp: 201, 4
  515. LR fn, tp: 8, 1
  516. LR f1 score: 0.143
  517. LR cohens kappa score: 0.116
  518. LR average precision score: 0.228
  519. -> test with 'GB'
  520. GB tn, fp: 203, 2
  521. GB fn, tp: 9, 0
  522. GB f1 score: 0.000
  523. GB cohens kappa score: -0.016
  524. -> test with 'KNN'
  525. KNN tn, fp: 195, 10
  526. KNN fn, tp: 8, 1
  527. KNN f1 score: 0.100
  528. KNN cohens kappa score: 0.056
  529. ------ Step 5/5: Slice 5/5 -------
  530. -> Reset the GAN
  531. -> Train generator for synthetic samples
  532. 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:08, 1.06it/s] 20%|██ | 2/10 [00:01<00:07, 1.14it/s] 30%|███ | 3/10 [00:02<00:05, 1.20it/s] 40%|████ | 4/10 [00:03<00:04, 1.29it/s] 50%|█████ | 5/10 [00:04<00:04, 1.21it/s] 60%|██████ | 6/10 [00:04<00:03, 1.24it/s] 70%|███████ | 7/10 [00:05<00:02, 1.31it/s] 80%|████████ | 8/10 [00:06<00:01, 1.37it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.29it/s] 100%|██████████| 10/10 [00:07<00:00, 1.25it/s] 100%|██████████| 10/10 [00:07<00:00, 1.25it/s]
  533. -> create 784 synthetic samples
  534. -> test with 'LR'
  535. LR tn, fp: 192, 11
  536. LR fn, tp: 3, 4
  537. LR f1 score: 0.364
  538. LR cohens kappa score: 0.333
  539. LR average precision score: 0.280
  540. -> test with 'GB'
  541. GB tn, fp: 199, 4
  542. GB fn, tp: 6, 1
  543. GB f1 score: 0.167
  544. GB cohens kappa score: 0.143
  545. -> test with 'KNN'
  546. KNN tn, fp: 187, 16
  547. KNN fn, tp: 5, 2
  548. KNN f1 score: 0.160
  549. KNN cohens kappa score: 0.118
  550. ### Exercise is done.
  551. -----[ LR ]-----
  552. maximum:
  553. LR tn, fp: 202, 32
  554. LR fn, tp: 8, 8
  555. LR f1 score: 0.593
  556. LR cohens kappa score: 0.571
  557. LR average precision score: 0.548
  558. average:
  559. LR tn, fp: 188.28, 16.32
  560. LR fn, tp: 3.44, 5.16
  561. LR f1 score: 0.346
  562. LR cohens kappa score: 0.308
  563. LR average precision score: 0.319
  564. minimum:
  565. LR tn, fp: 172, 3
  566. LR fn, tp: 0, 1
  567. LR f1 score: 0.133
  568. LR cohens kappa score: 0.103
  569. LR average precision score: 0.131
  570. -----[ GB ]-----
  571. maximum:
  572. GB tn, fp: 205, 6
  573. GB fn, tp: 9, 4
  574. GB f1 score: 0.471
  575. GB cohens kappa score: 0.449
  576. average:
  577. GB tn, fp: 202.32, 2.28
  578. GB fn, tp: 7.4, 1.2
  579. GB f1 score: 0.184
  580. GB cohens kappa score: 0.167
  581. minimum:
  582. GB tn, fp: 199, 0
  583. GB fn, tp: 5, 0
  584. GB f1 score: 0.000
  585. GB cohens kappa score: -0.035
  586. -----[ KNN ]-----
  587. maximum:
  588. KNN tn, fp: 199, 25
  589. KNN fn, tp: 8, 7
  590. KNN f1 score: 0.429
  591. KNN cohens kappa score: 0.394
  592. average:
  593. KNN tn, fp: 188.24, 16.36
  594. KNN fn, tp: 4.72, 3.88
  595. KNN f1 score: 0.262
  596. KNN cohens kappa score: 0.219
  597. minimum:
  598. KNN tn, fp: 180, 6
  599. KNN fn, tp: 2, 1
  600. KNN f1 score: 0.100
  601. KNN cohens kappa score: 0.056