imblearn_mammography.log 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. ///////////////////////////////////////////
  2. // Running CTAB-GAN on imblearn_mammography
  3. ///////////////////////////////////////////
  4. Load 'data_input/imblearn_mammography'
  5. from imblearn
  6. non empty cut in data_input/imblearn_mammography! (7 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:03, 2.28it/s] 20%|██ | 2/10 [00:00<00:03, 2.40it/s] 30%|███ | 3/10 [00:01<00:03, 1.98it/s] 40%|████ | 4/10 [00:01<00:02, 2.03it/s] 50%|█████ | 5/10 [00:02<00:02, 2.11it/s] 60%|██████ | 6/10 [00:02<00:01, 2.15it/s] 70%|███████ | 7/10 [00:03<00:01, 2.14it/s] 80%|████████ | 8/10 [00:03<00:00, 2.18it/s] 90%|█████████ | 9/10 [00:04<00:00, 2.18it/s] 100%|██████████| 10/10 [00:04<00:00, 2.19it/s] 100%|██████████| 10/10 [00:04<00:00, 2.16it/s]
  17. -> create 8530 synthetic samples
  18. -> test with 'LR'
  19. LR tn, fp: 2047, 138
  20. LR fn, tp: 16, 36
  21. LR f1 score: 0.319
  22. LR cohens kappa score: 0.293
  23. LR average precision score: 0.458
  24. -> test with 'GB'
  25. GB tn, fp: 2160, 25
  26. GB fn, tp: 23, 29
  27. GB f1 score: 0.547
  28. GB cohens kappa score: 0.536
  29. -> test with 'KNN'
  30. KNN tn, fp: 1498, 687
  31. KNN fn, tp: 23, 29
  32. KNN f1 score: 0.076
  33. KNN cohens kappa score: 0.034
  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:08, 1.09it/s] 20%|██ | 2/10 [00:01<00:06, 1.15it/s] 30%|███ | 3/10 [00:02<00:05, 1.23it/s] 40%|████ | 4/10 [00:03<00:04, 1.28it/s] 50%|█████ | 5/10 [00:04<00:04, 1.14it/s] 60%|██████ | 6/10 [00:05<00:03, 1.11it/s] 70%|███████ | 7/10 [00:06<00:02, 1.11it/s] 80%|████████ | 8/10 [00:07<00:01, 1.04it/s] 90%|█████████ | 9/10 [00:08<00:00, 1.09it/s] 100%|██████████| 10/10 [00:08<00:00, 1.08it/s] 100%|██████████| 10/10 [00:08<00:00, 1.11it/s]
  38. -> create 8530 synthetic samples
  39. -> test with 'LR'
  40. LR tn, fp: 1857, 328
  41. LR fn, tp: 8, 44
  42. LR f1 score: 0.208
  43. LR cohens kappa score: 0.174
  44. LR average precision score: 0.459
  45. -> test with 'GB'
  46. GB tn, fp: 2164, 21
  47. GB fn, tp: 24, 28
  48. GB f1 score: 0.554
  49. GB cohens kappa score: 0.544
  50. -> test with 'KNN'
  51. KNN tn, fp: 2158, 27
  52. KNN fn, tp: 24, 28
  53. KNN f1 score: 0.523
  54. KNN cohens kappa score: 0.512
  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.27it/s] 20%|██ | 2/10 [00:01<00:06, 1.26it/s] 30%|███ | 3/10 [00:02<00:05, 1.30it/s] 40%|████ | 4/10 [00:03<00:04, 1.35it/s] 50%|█████ | 5/10 [00:03<00:03, 1.33it/s] 60%|██████ | 6/10 [00:04<00:03, 1.26it/s] 70%|███████ | 7/10 [00:05<00:02, 1.26it/s] 80%|████████ | 8/10 [00:06<00:01, 1.31it/s] 90%|█████████ | 9/10 [00:06<00:00, 1.29it/s] 100%|██████████| 10/10 [00:07<00:00, 1.27it/s] 100%|██████████| 10/10 [00:07<00:00, 1.29it/s]
  59. -> create 8530 synthetic samples
  60. -> test with 'LR'
  61. LR tn, fp: 1995, 190
  62. LR fn, tp: 9, 43
  63. LR f1 score: 0.302
  64. LR cohens kappa score: 0.274
  65. LR average precision score: 0.555
  66. -> test with 'GB'
  67. GB tn, fp: 2168, 17
  68. GB fn, tp: 16, 36
  69. GB f1 score: 0.686
  70. GB cohens kappa score: 0.678
  71. -> test with 'KNN'
  72. KNN tn, fp: 2167, 18
  73. KNN fn, tp: 17, 35
  74. KNN f1 score: 0.667
  75. KNN cohens kappa score: 0.659
  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.19it/s] 20%|██ | 2/10 [00:01<00:05, 1.36it/s] 30%|███ | 3/10 [00:02<00:05, 1.27it/s] 40%|████ | 4/10 [00:03<00:04, 1.31it/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.31it/s] 80%|████████ | 8/10 [00:06<00:01, 1.35it/s] 90%|█████████ | 9/10 [00:06<00:00, 1.30it/s] 100%|██████████| 10/10 [00:07<00:00, 1.36it/s] 100%|██████████| 10/10 [00:07<00:00, 1.32it/s]
  80. -> create 8530 synthetic samples
  81. -> test with 'LR'
  82. LR tn, fp: 2070, 115
  83. LR fn, tp: 22, 30
  84. LR f1 score: 0.305
  85. LR cohens kappa score: 0.280
  86. LR average precision score: 0.346
  87. -> test with 'GB'
  88. GB tn, fp: 2172, 13
  89. GB fn, tp: 28, 24
  90. GB f1 score: 0.539
  91. GB cohens kappa score: 0.530
  92. -> test with 'KNN'
  93. KNN tn, fp: 2164, 21
  94. KNN fn, tp: 26, 26
  95. KNN f1 score: 0.525
  96. KNN cohens kappa score: 0.515
  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.21it/s] 20%|██ | 2/10 [00:01<00:06, 1.23it/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.21it/s] 60%|██████ | 6/10 [00:04<00:03, 1.23it/s] 70%|███████ | 7/10 [00:05<00:02, 1.19it/s] 80%|████████ | 8/10 [00:06<00:01, 1.20it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.22it/s] 100%|██████████| 10/10 [00:08<00:00, 1.27it/s] 100%|██████████| 10/10 [00:08<00:00, 1.23it/s]
  101. -> create 8532 synthetic samples
  102. -> test with 'LR'
  103. LR tn, fp: 1889, 294
  104. LR fn, tp: 10, 42
  105. LR f1 score: 0.216
  106. LR cohens kappa score: 0.184
  107. LR average precision score: 0.535
  108. -> test with 'GB'
  109. GB tn, fp: 2162, 21
  110. GB fn, tp: 23, 29
  111. GB f1 score: 0.569
  112. GB cohens kappa score: 0.559
  113. -> test with 'KNN'
  114. KNN tn, fp: 2144, 39
  115. KNN fn, tp: 20, 32
  116. KNN f1 score: 0.520
  117. KNN cohens kappa score: 0.507
  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:00<00:08, 1.07it/s] 20%|██ | 2/10 [00:01<00:06, 1.23it/s] 30%|███ | 3/10 [00:02<00:05, 1.25it/s] 40%|████ | 4/10 [00:03<00:04, 1.28it/s] 50%|█████ | 5/10 [00:04<00:03, 1.27it/s] 60%|██████ | 6/10 [00:04<00:03, 1.28it/s] 70%|███████ | 7/10 [00:05<00:02, 1.26it/s] 80%|████████ | 8/10 [00:06<00:01, 1.24it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.24it/s] 100%|██████████| 10/10 [00:08<00:00, 1.22it/s] 100%|██████████| 10/10 [00:08<00:00, 1.24it/s]
  125. -> create 8530 synthetic samples
  126. -> test with 'LR'
  127. LR tn, fp: 2016, 169
  128. LR fn, tp: 15, 37
  129. LR f1 score: 0.287
  130. LR cohens kappa score: 0.259
  131. LR average precision score: 0.478
  132. -> test with 'GB'
  133. GB tn, fp: 2171, 14
  134. GB fn, tp: 21, 31
  135. GB f1 score: 0.639
  136. GB cohens kappa score: 0.631
  137. -> test with 'KNN'
  138. KNN tn, fp: 2157, 28
  139. KNN fn, tp: 15, 37
  140. KNN f1 score: 0.632
  141. KNN cohens kappa score: 0.623
  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.19it/s] 20%|██ | 2/10 [00:01<00:06, 1.18it/s] 30%|███ | 3/10 [00:02<00:05, 1.25it/s] 40%|████ | 4/10 [00:03<00:04, 1.24it/s] 50%|█████ | 5/10 [00:03<00:03, 1.29it/s] 60%|██████ | 6/10 [00:04<00:03, 1.32it/s] 70%|███████ | 7/10 [00:05<00:02, 1.30it/s] 80%|████████ | 8/10 [00:06<00:01, 1.27it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.27it/s] 100%|██████████| 10/10 [00:07<00:00, 1.33it/s] 100%|██████████| 10/10 [00:07<00:00, 1.29it/s]
  146. -> create 8530 synthetic samples
  147. -> test with 'LR'
  148. LR tn, fp: 1957, 228
  149. LR fn, tp: 10, 42
  150. LR f1 score: 0.261
  151. LR cohens kappa score: 0.231
  152. LR average precision score: 0.480
  153. -> test with 'GB'
  154. GB tn, fp: 2161, 24
  155. GB fn, tp: 23, 29
  156. GB f1 score: 0.552
  157. GB cohens kappa score: 0.542
  158. -> test with 'KNN'
  159. KNN tn, fp: 2152, 33
  160. KNN fn, tp: 17, 35
  161. KNN f1 score: 0.583
  162. KNN cohens kappa score: 0.572
  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.23it/s] 20%|██ | 2/10 [00:01<00:06, 1.25it/s] 30%|███ | 3/10 [00:02<00:05, 1.21it/s] 40%|████ | 4/10 [00:03<00:04, 1.33it/s] 50%|█████ | 5/10 [00:03<00:04, 1.25it/s] 60%|██████ | 6/10 [00:04<00:03, 1.21it/s] 70%|███████ | 7/10 [00:05<00:02, 1.15it/s] 80%|████████ | 8/10 [00:06<00:01, 1.15it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.17it/s] 100%|██████████| 10/10 [00:08<00:00, 1.15it/s] 100%|██████████| 10/10 [00:08<00:00, 1.19it/s]
  167. -> create 8530 synthetic samples
  168. -> test with 'LR'
  169. LR tn, fp: 2016, 169
  170. LR fn, tp: 15, 37
  171. LR f1 score: 0.287
  172. LR cohens kappa score: 0.259
  173. LR average precision score: 0.468
  174. -> test with 'GB'
  175. GB tn, fp: 2166, 19
  176. GB fn, tp: 26, 26
  177. GB f1 score: 0.536
  178. GB cohens kappa score: 0.526
  179. -> test with 'KNN'
  180. KNN tn, fp: 2159, 26
  181. KNN fn, tp: 25, 27
  182. KNN f1 score: 0.514
  183. KNN cohens kappa score: 0.503
  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:08, 1.10it/s] 20%|██ | 2/10 [00:01<00:06, 1.26it/s] 30%|███ | 3/10 [00:02<00:05, 1.36it/s] 40%|████ | 4/10 [00:03<00:04, 1.26it/s] 50%|█████ | 5/10 [00:04<00:04, 1.21it/s] 60%|██████ | 6/10 [00:04<00:03, 1.15it/s] 70%|███████ | 7/10 [00:05<00:02, 1.19it/s] 80%|████████ | 8/10 [00:06<00:01, 1.24it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.27it/s] 100%|██████████| 10/10 [00:08<00:00, 1.29it/s] 100%|██████████| 10/10 [00:08<00:00, 1.25it/s]
  188. -> create 8530 synthetic samples
  189. -> test with 'LR'
  190. LR tn, fp: 2032, 153
  191. LR fn, tp: 8, 44
  192. LR f1 score: 0.353
  193. LR cohens kappa score: 0.329
  194. LR average precision score: 0.525
  195. -> test with 'GB'
  196. GB tn, fp: 2161, 24
  197. GB fn, tp: 25, 27
  198. GB f1 score: 0.524
  199. GB cohens kappa score: 0.513
  200. -> test with 'KNN'
  201. KNN tn, fp: 2164, 21
  202. KNN fn, tp: 26, 26
  203. KNN f1 score: 0.525
  204. KNN cohens kappa score: 0.515
  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:00<00:06, 1.31it/s] 20%|██ | 2/10 [00:01<00:05, 1.44it/s] 30%|███ | 3/10 [00:02<00:05, 1.37it/s] 40%|████ | 4/10 [00:03<00:04, 1.29it/s] 50%|█████ | 5/10 [00:03<00:03, 1.29it/s] 60%|██████ | 6/10 [00:04<00:03, 1.32it/s] 70%|███████ | 7/10 [00:05<00:02, 1.25it/s] 80%|████████ | 8/10 [00:06<00:01, 1.23it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.22it/s] 100%|██████████| 10/10 [00:07<00:00, 1.26it/s] 100%|██████████| 10/10 [00:07<00:00, 1.28it/s]
  209. -> create 8532 synthetic samples
  210. -> test with 'LR'
  211. LR tn, fp: 1911, 272
  212. LR fn, tp: 10, 42
  213. LR f1 score: 0.230
  214. LR cohens kappa score: 0.197
  215. LR average precision score: 0.531
  216. -> test with 'GB'
  217. GB tn, fp: 2163, 20
  218. GB fn, tp: 25, 27
  219. GB f1 score: 0.545
  220. GB cohens kappa score: 0.535
  221. -> test with 'KNN'
  222. KNN tn, fp: 2161, 22
  223. KNN fn, tp: 26, 26
  224. KNN f1 score: 0.520
  225. KNN cohens kappa score: 0.509
  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:08, 1.11it/s] 20%|██ | 2/10 [00:01<00:06, 1.19it/s] 30%|███ | 3/10 [00:02<00:05, 1.23it/s] 40%|████ | 4/10 [00:03<00:05, 1.17it/s] 50%|█████ | 5/10 [00:04<00:04, 1.20it/s] 60%|██████ | 6/10 [00:05<00:03, 1.18it/s] 70%|███████ | 7/10 [00:05<00:02, 1.15it/s] 80%|████████ | 8/10 [00:06<00:01, 1.21it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.12it/s] 100%|██████████| 10/10 [00:08<00:00, 1.16it/s] 100%|██████████| 10/10 [00:08<00:00, 1.17it/s]
  233. -> create 8530 synthetic samples
  234. -> test with 'LR'
  235. LR tn, fp: 1883, 302
  236. LR fn, tp: 11, 41
  237. LR f1 score: 0.208
  238. LR cohens kappa score: 0.174
  239. LR average precision score: 0.550
  240. -> test with 'GB'
  241. GB tn, fp: 2166, 19
  242. GB fn, tp: 18, 34
  243. GB f1 score: 0.648
  244. GB cohens kappa score: 0.639
  245. -> test with 'KNN'
  246. KNN tn, fp: 2154, 31
  247. KNN fn, tp: 18, 34
  248. KNN f1 score: 0.581
  249. KNN cohens kappa score: 0.570
  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:07, 1.25it/s] 20%|██ | 2/10 [00:01<00:06, 1.20it/s] 30%|███ | 3/10 [00:02<00:05, 1.21it/s] 40%|████ | 4/10 [00:03<00:05, 1.15it/s] 50%|█████ | 5/10 [00:04<00:04, 1.15it/s] 60%|██████ | 6/10 [00:04<00:03, 1.26it/s] 70%|███████ | 7/10 [00:05<00:02, 1.31it/s] 80%|████████ | 8/10 [00:06<00:01, 1.27it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.32it/s] 100%|██████████| 10/10 [00:07<00:00, 1.32it/s] 100%|██████████| 10/10 [00:07<00:00, 1.26it/s]
  254. -> create 8530 synthetic samples
  255. -> test with 'LR'
  256. LR tn, fp: 1947, 238
  257. LR fn, tp: 9, 43
  258. LR f1 score: 0.258
  259. LR cohens kappa score: 0.228
  260. LR average precision score: 0.420
  261. -> test with 'GB'
  262. GB tn, fp: 2165, 20
  263. GB fn, tp: 30, 22
  264. GB f1 score: 0.468
  265. GB cohens kappa score: 0.457
  266. -> test with 'KNN'
  267. KNN tn, fp: 1483, 702
  268. KNN fn, tp: 26, 26
  269. KNN f1 score: 0.067
  270. KNN cohens kappa score: 0.024
  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:07, 1.16it/s] 20%|██ | 2/10 [00:01<00:06, 1.26it/s] 30%|███ | 3/10 [00:02<00:05, 1.26it/s] 40%|████ | 4/10 [00:03<00:05, 1.19it/s] 50%|█████ | 5/10 [00:04<00:04, 1.13it/s] 60%|██████ | 6/10 [00:05<00:03, 1.15it/s] 70%|███████ | 7/10 [00:05<00:02, 1.19it/s] 80%|████████ | 8/10 [00:06<00:01, 1.20it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.18it/s] 100%|██████████| 10/10 [00:08<00:00, 1.17it/s] 100%|██████████| 10/10 [00:08<00:00, 1.18it/s]
  275. -> create 8530 synthetic samples
  276. -> test with 'LR'
  277. LR tn, fp: 2066, 119
  278. LR fn, tp: 12, 40
  279. LR f1 score: 0.379
  280. LR cohens kappa score: 0.357
  281. LR average precision score: 0.513
  282. -> test with 'GB'
  283. GB tn, fp: 2174, 11
  284. GB fn, tp: 21, 31
  285. GB f1 score: 0.660
  286. GB cohens kappa score: 0.652
  287. -> test with 'KNN'
  288. KNN tn, fp: 2171, 14
  289. KNN fn, tp: 26, 26
  290. KNN f1 score: 0.565
  291. KNN cohens kappa score: 0.556
  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:01<00:09, 1.03s/it] 20%|██ | 2/10 [00:01<00:07, 1.13it/s] 30%|███ | 3/10 [00:02<00:06, 1.15it/s] 40%|████ | 4/10 [00:03<00:05, 1.13it/s] 50%|█████ | 5/10 [00:04<00:04, 1.11it/s] 60%|██████ | 6/10 [00:05<00:03, 1.16it/s] 70%|███████ | 7/10 [00:11<00:07, 2.58s/it] 80%|████████ | 8/10 [00:13<00:04, 2.31s/it] 90%|█████████ | 9/10 [00:13<00:01, 1.85s/it] 100%|██████████| 10/10 [00:14<00:00, 1.58s/it] 100%|██████████| 10/10 [00:14<00:00, 1.50s/it]
  296. -> create 8530 synthetic samples
  297. -> test with 'LR'
  298. LR tn, fp: 2119, 66
  299. LR fn, tp: 25, 27
  300. LR f1 score: 0.372
  301. LR cohens kappa score: 0.353
  302. LR average precision score: 0.474
  303. -> test with 'GB'
  304. GB tn, fp: 2177, 8
  305. GB fn, tp: 23, 29
  306. GB f1 score: 0.652
  307. GB cohens kappa score: 0.645
  308. -> test with 'KNN'
  309. KNN tn, fp: 2175, 10
  310. KNN fn, tp: 25, 27
  311. KNN f1 score: 0.607
  312. KNN cohens kappa score: 0.599
  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:00<00:07, 1.21it/s] 20%|██ | 2/10 [00:01<00:06, 1.25it/s] 30%|███ | 3/10 [00:02<00:05, 1.25it/s] 40%|████ | 4/10 [00:03<00:04, 1.31it/s] 50%|█████ | 5/10 [00:03<00:03, 1.27it/s] 60%|██████ | 6/10 [00:05<00:04, 1.05s/it] 70%|███████ | 7/10 [00:06<00:02, 1.02it/s] 80%|████████ | 8/10 [00:07<00:01, 1.00it/s] 90%|█████████ | 9/10 [00:08<00:00, 1.01it/s] 100%|██████████| 10/10 [00:09<00:00, 1.04it/s] 100%|██████████| 10/10 [00:09<00:00, 1.08it/s]
  317. -> create 8532 synthetic samples
  318. -> test with 'LR'
  319. LR tn, fp: 2074, 109
  320. LR fn, tp: 13, 39
  321. LR f1 score: 0.390
  322. LR cohens kappa score: 0.368
  323. LR average precision score: 0.526
  324. -> test with 'GB'
  325. GB tn, fp: 2173, 10
  326. GB fn, tp: 22, 30
  327. GB f1 score: 0.652
  328. GB cohens kappa score: 0.645
  329. -> test with 'KNN'
  330. KNN tn, fp: 2169, 14
  331. KNN fn, tp: 23, 29
  332. KNN f1 score: 0.611
  333. KNN cohens kappa score: 0.602
  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:00<00:06, 1.35it/s] 20%|██ | 2/10 [00:01<00:06, 1.15it/s] 30%|███ | 3/10 [00:02<00:05, 1.23it/s] 40%|████ | 4/10 [00:03<00:05, 1.17it/s] 50%|█████ | 5/10 [00:04<00:04, 1.17it/s] 60%|██████ | 6/10 [00:04<00:03, 1.24it/s] 70%|███████ | 7/10 [00:05<00:02, 1.18it/s] 80%|████████ | 8/10 [00:06<00:01, 1.17it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.16it/s] 100%|██████████| 10/10 [00:08<00:00, 1.09it/s] 100%|██████████| 10/10 [00:08<00:00, 1.16it/s]
  341. -> create 8530 synthetic samples
  342. -> test with 'LR'
  343. LR tn, fp: 2048, 137
  344. LR fn, tp: 17, 35
  345. LR f1 score: 0.312
  346. LR cohens kappa score: 0.287
  347. LR average precision score: 0.532
  348. -> test with 'GB'
  349. GB tn, fp: 2172, 13
  350. GB fn, tp: 23, 29
  351. GB f1 score: 0.617
  352. GB cohens kappa score: 0.609
  353. -> test with 'KNN'
  354. KNN tn, fp: 2165, 20
  355. KNN fn, tp: 22, 30
  356. KNN f1 score: 0.588
  357. KNN cohens kappa score: 0.579
  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.10it/s] 20%|██ | 2/10 [00:01<00:06, 1.32it/s] 30%|███ | 3/10 [00:02<00:05, 1.31it/s] 40%|████ | 4/10 [00:03<00:04, 1.26it/s] 50%|█████ | 5/10 [00:03<00:04, 1.24it/s] 60%|██████ | 6/10 [00:04<00:03, 1.29it/s] 70%|███████ | 7/10 [00:05<00:02, 1.20it/s] 80%|████████ | 8/10 [00:06<00:01, 1.26it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.26it/s] 100%|██████████| 10/10 [00:07<00:00, 1.27it/s] 100%|██████████| 10/10 [00:07<00:00, 1.26it/s]
  362. -> create 8530 synthetic samples
  363. -> test with 'LR'
  364. LR tn, fp: 2096, 89
  365. LR fn, tp: 19, 33
  366. LR f1 score: 0.379
  367. LR cohens kappa score: 0.358
  368. LR average precision score: 0.469
  369. -> test with 'GB'
  370. GB tn, fp: 2172, 13
  371. GB fn, tp: 23, 29
  372. GB f1 score: 0.617
  373. GB cohens kappa score: 0.609
  374. -> test with 'KNN'
  375. KNN tn, fp: 2172, 13
  376. KNN fn, tp: 23, 29
  377. KNN f1 score: 0.617
  378. KNN cohens kappa score: 0.609
  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:00<00:07, 1.19it/s] 20%|██ | 2/10 [00:01<00:06, 1.27it/s] 30%|███ | 3/10 [00:02<00:05, 1.24it/s] 40%|████ | 4/10 [00:03<00:05, 1.17it/s] 50%|█████ | 5/10 [00:04<00:04, 1.21it/s] 60%|██████ | 6/10 [00:05<00:03, 1.17it/s] 70%|███████ | 7/10 [00:05<00:02, 1.15it/s] 80%|████████ | 8/10 [00:06<00:01, 1.19it/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.20it/s]
  383. -> create 8530 synthetic samples
  384. -> test with 'LR'
  385. LR tn, fp: 1957, 228
  386. LR fn, tp: 10, 42
  387. LR f1 score: 0.261
  388. LR cohens kappa score: 0.231
  389. LR average precision score: 0.506
  390. -> test with 'GB'
  391. GB tn, fp: 2167, 18
  392. GB fn, tp: 21, 31
  393. GB f1 score: 0.614
  394. GB cohens kappa score: 0.605
  395. -> test with 'KNN'
  396. KNN tn, fp: 2163, 22
  397. KNN fn, tp: 24, 28
  398. KNN f1 score: 0.549
  399. KNN cohens kappa score: 0.539
  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:07, 1.25it/s] 20%|██ | 2/10 [00:01<00:05, 1.42it/s] 30%|███ | 3/10 [00:02<00:05, 1.24it/s] 40%|████ | 4/10 [00:03<00:04, 1.26it/s] 50%|█████ | 5/10 [00:04<00:04, 1.08it/s] 60%|██████ | 6/10 [00:05<00:03, 1.13it/s] 70%|███████ | 7/10 [00:05<00:02, 1.14it/s] 80%|████████ | 8/10 [00:06<00:01, 1.13it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.15it/s] 100%|██████████| 10/10 [00:08<00:00, 1.17it/s] 100%|██████████| 10/10 [00:08<00:00, 1.17it/s]
  404. -> create 8530 synthetic samples
  405. -> test with 'LR'
  406. LR tn, fp: 1988, 197
  407. LR fn, tp: 17, 35
  408. LR f1 score: 0.246
  409. LR cohens kappa score: 0.217
  410. LR average precision score: 0.389
  411. -> test with 'GB'
  412. GB tn, fp: 2165, 20
  413. GB fn, tp: 26, 26
  414. GB f1 score: 0.531
  415. GB cohens kappa score: 0.520
  416. -> test with 'KNN'
  417. KNN tn, fp: 2161, 24
  418. KNN fn, tp: 24, 28
  419. KNN f1 score: 0.538
  420. KNN cohens kappa score: 0.527
  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:07, 1.23it/s] 20%|██ | 2/10 [00:01<00:05, 1.34it/s] 30%|███ | 3/10 [00:02<00:05, 1.26it/s] 40%|████ | 4/10 [00:03<00:04, 1.21it/s] 50%|█████ | 5/10 [00:04<00:04, 1.12it/s] 60%|██████ | 6/10 [00:05<00:03, 1.07it/s] 70%|███████ | 7/10 [00:06<00:02, 1.07it/s] 80%|████████ | 8/10 [00:07<00:01, 1.06it/s] 90%|█████████ | 9/10 [00:08<00:00, 1.09it/s] 100%|██████████| 10/10 [00:09<00:00, 1.03it/s] 100%|██████████| 10/10 [00:09<00:00, 1.10it/s]
  425. -> create 8532 synthetic samples
  426. -> test with 'LR'
  427. LR tn, fp: 1976, 207
  428. LR fn, tp: 8, 44
  429. LR f1 score: 0.290
  430. LR cohens kappa score: 0.262
  431. LR average precision score: 0.513
  432. -> test with 'GB'
  433. GB tn, fp: 2158, 25
  434. GB fn, tp: 25, 27
  435. GB f1 score: 0.519
  436. GB cohens kappa score: 0.508
  437. -> test with 'KNN'
  438. KNN tn, fp: 2151, 32
  439. KNN fn, tp: 16, 36
  440. KNN f1 score: 0.600
  441. KNN cohens kappa score: 0.589
  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:08, 1.12it/s] 20%|██ | 2/10 [00:01<00:07, 1.13it/s] 30%|███ | 3/10 [00:02<00:06, 1.09it/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.17it/s] 70%|███████ | 7/10 [00:06<00:02, 1.18it/s] 80%|████████ | 8/10 [00:06<00:01, 1.25it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.24it/s] 100%|██████████| 10/10 [00:08<00:00, 1.22it/s] 100%|██████████| 10/10 [00:08<00:00, 1.19it/s]
  449. -> create 8530 synthetic samples
  450. -> test with 'LR'
  451. LR tn, fp: 1909, 276
  452. LR fn, tp: 6, 46
  453. LR f1 score: 0.246
  454. LR cohens kappa score: 0.215
  455. LR average precision score: 0.484
  456. -> test with 'GB'
  457. GB tn, fp: 2163, 22
  458. GB fn, tp: 22, 30
  459. GB f1 score: 0.577
  460. GB cohens kappa score: 0.567
  461. -> test with 'KNN'
  462. KNN tn, fp: 1499, 686
  463. KNN fn, tp: 17, 35
  464. KNN f1 score: 0.091
  465. KNN cohens kappa score: 0.049
  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:08, 1.02it/s] 20%|██ | 2/10 [00:01<00:07, 1.10it/s] 30%|███ | 3/10 [00:02<00:06, 1.01it/s] 40%|████ | 4/10 [00:03<00:05, 1.04it/s] 50%|█████ | 5/10 [00:04<00:04, 1.06it/s] 60%|██████ | 6/10 [00:05<00:03, 1.13it/s] 70%|███████ | 7/10 [00:06<00:02, 1.08it/s] 80%|████████ | 8/10 [00:07<00:01, 1.13it/s] 90%|█████████ | 9/10 [00:08<00:00, 1.20it/s] 100%|██████████| 10/10 [00:08<00:00, 1.23it/s] 100%|██████████| 10/10 [00:08<00:00, 1.14it/s]
  470. -> create 8530 synthetic samples
  471. -> test with 'LR'
  472. LR tn, fp: 2027, 158
  473. LR fn, tp: 16, 36
  474. LR f1 score: 0.293
  475. LR cohens kappa score: 0.266
  476. LR average precision score: 0.455
  477. -> test with 'GB'
  478. GB tn, fp: 2168, 17
  479. GB fn, tp: 25, 27
  480. GB f1 score: 0.562
  481. GB cohens kappa score: 0.553
  482. -> test with 'KNN'
  483. KNN tn, fp: 2158, 27
  484. KNN fn, tp: 24, 28
  485. KNN f1 score: 0.523
  486. KNN cohens kappa score: 0.512
  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:00<00:08, 1.01it/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:04, 1.23it/s] 50%|█████ | 5/10 [00:04<00:03, 1.28it/s] 60%|██████ | 6/10 [00:04<00:03, 1.30it/s] 70%|███████ | 7/10 [00:05<00:02, 1.32it/s] 80%|████████ | 8/10 [00:06<00:01, 1.34it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.29it/s] 100%|██████████| 10/10 [00:07<00:00, 1.32it/s] 100%|██████████| 10/10 [00:07<00:00, 1.28it/s]
  491. -> create 8530 synthetic samples
  492. -> test with 'LR'
  493. LR tn, fp: 2048, 137
  494. LR fn, tp: 17, 35
  495. LR f1 score: 0.312
  496. LR cohens kappa score: 0.287
  497. LR average precision score: 0.435
  498. -> test with 'GB'
  499. GB tn, fp: 2173, 12
  500. GB fn, tp: 28, 24
  501. GB f1 score: 0.545
  502. GB cohens kappa score: 0.537
  503. -> test with 'KNN'
  504. KNN tn, fp: 2163, 22
  505. KNN fn, tp: 26, 26
  506. KNN f1 score: 0.520
  507. KNN cohens kappa score: 0.509
  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:00<00:07, 1.22it/s] 20%|██ | 2/10 [00:01<00:05, 1.39it/s] 30%|███ | 3/10 [00:02<00:05, 1.19it/s] 40%|████ | 4/10 [00:03<00:05, 1.17it/s] 50%|█████ | 5/10 [00:04<00:04, 1.12it/s] 60%|██████ | 6/10 [00:05<00:03, 1.13it/s] 70%|███████ | 7/10 [00:05<00:02, 1.15it/s] 80%|████████ | 8/10 [00:06<00:01, 1.21it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.23it/s] 100%|██████████| 10/10 [00:08<00:00, 1.24it/s] 100%|██████████| 10/10 [00:08<00:00, 1.20it/s]
  512. -> create 8530 synthetic samples
  513. -> test with 'LR'
  514. LR tn, fp: 1990, 195
  515. LR fn, tp: 9, 43
  516. LR f1 score: 0.297
  517. LR cohens kappa score: 0.269
  518. LR average precision score: 0.482
  519. -> test with 'GB'
  520. GB tn, fp: 2165, 20
  521. GB fn, tp: 19, 33
  522. GB f1 score: 0.629
  523. GB cohens kappa score: 0.620
  524. -> test with 'KNN'
  525. KNN tn, fp: 2165, 20
  526. KNN fn, tp: 15, 37
  527. KNN f1 score: 0.679
  528. KNN cohens kappa score: 0.671
  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:07, 1.15it/s] 20%|██ | 2/10 [00:01<00:06, 1.22it/s] 30%|███ | 3/10 [00:02<00:05, 1.26it/s] 40%|████ | 4/10 [00:03<00:04, 1.27it/s] 50%|█████ | 5/10 [00:03<00:03, 1.28it/s] 60%|██████ | 6/10 [00:04<00:03, 1.26it/s] 70%|███████ | 7/10 [00:05<00:02, 1.21it/s] 80%|████████ | 8/10 [00:06<00:01, 1.21it/s] 90%|█████████ | 9/10 [00:07<00:00, 1.08it/s] 100%|██████████| 10/10 [00:08<00:00, 1.08it/s] 100%|██████████| 10/10 [00:08<00:00, 1.17it/s]
  533. -> create 8532 synthetic samples
  534. -> test with 'LR'
  535. LR tn, fp: 2109, 74
  536. LR fn, tp: 21, 31
  537. LR f1 score: 0.395
  538. LR cohens kappa score: 0.375
  539. LR average precision score: 0.501
  540. -> test with 'GB'
  541. GB tn, fp: 2177, 6
  542. GB fn, tp: 24, 28
  543. GB f1 score: 0.651
  544. GB cohens kappa score: 0.645
  545. -> test with 'KNN'
  546. KNN tn, fp: 2170, 13
  547. KNN fn, tp: 27, 25
  548. KNN f1 score: 0.556
  549. KNN cohens kappa score: 0.547
  550. ### Exercise is done.
  551. -----[ LR ]-----
  552. maximum:
  553. LR tn, fp: 2119, 328
  554. LR fn, tp: 25, 46
  555. LR f1 score: 0.395
  556. LR cohens kappa score: 0.375
  557. LR average precision score: 0.555
  558. average:
  559. LR tn, fp: 2001.08, 183.52
  560. LR fn, tp: 13.32, 38.68
  561. LR f1 score: 0.296
  562. LR cohens kappa score: 0.269
  563. LR average precision score: 0.483
  564. minimum:
  565. LR tn, fp: 1857, 66
  566. LR fn, tp: 6, 27
  567. LR f1 score: 0.208
  568. LR cohens kappa score: 0.174
  569. LR average precision score: 0.346
  570. -----[ GB ]-----
  571. maximum:
  572. GB tn, fp: 2177, 25
  573. GB fn, tp: 30, 36
  574. GB f1 score: 0.686
  575. GB cohens kappa score: 0.678
  576. average:
  577. GB tn, fp: 2167.32, 17.28
  578. GB fn, tp: 23.36, 28.64
  579. GB f1 score: 0.585
  580. GB cohens kappa score: 0.576
  581. minimum:
  582. GB tn, fp: 2158, 6
  583. GB fn, tp: 16, 22
  584. GB f1 score: 0.468
  585. GB cohens kappa score: 0.457
  586. -----[ KNN ]-----
  587. maximum:
  588. KNN tn, fp: 2175, 702
  589. KNN fn, tp: 27, 37
  590. KNN f1 score: 0.679
  591. KNN cohens kappa score: 0.671
  592. average:
  593. KNN tn, fp: 2081.72, 102.88
  594. KNN fn, tp: 22.2, 29.8
  595. KNN f1 score: 0.511
  596. KNN cohens kappa score: 0.497
  597. minimum:
  598. KNN tn, fp: 1483, 10
  599. KNN fn, tp: 15, 25
  600. KNN f1 score: 0.067
  601. KNN cohens kappa score: 0.024