| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726 |
- ///////////////////////////////////////////
- // Running CTAB-GAN on imblearn_ozone_level
- ///////////////////////////////////////////
- Load 'data_input/imblearn_ozone_level'
- from imblearn
- Data loaded.
- -> Shuffling data
- ### Start exercise for synthetic point generator
- ====== Step 1/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 1/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 477, 16
- LR fn, tp: 9, 6
- LR f1 score: 0.324
- LR cohens kappa score: 0.300
- LR average precision score: 0.388
- -> test with 'GB'
- GB tn, fp: 489, 4
- GB fn, tp: 12, 3
- GB f1 score: 0.273
- GB cohens kappa score: 0.259
- -> test with 'KNN'
- KNN tn, fp: 489, 4
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.013
- ------ Step 1/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 470, 23
- LR fn, tp: 9, 6
- LR f1 score: 0.273
- LR cohens kappa score: 0.243
- LR average precision score: 0.166
- -> test with 'GB'
- GB tn, fp: 492, 1
- GB fn, tp: 12, 3
- GB f1 score: 0.316
- GB cohens kappa score: 0.307
- -> test with 'KNN'
- KNN tn, fp: 482, 11
- KNN fn, tp: 14, 1
- KNN f1 score: 0.074
- KNN cohens kappa score: 0.049
- ------ Step 1/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 469, 24
- LR fn, tp: 8, 7
- LR f1 score: 0.304
- LR cohens kappa score: 0.276
- LR average precision score: 0.184
- -> test with 'GB'
- GB tn, fp: 491, 2
- GB fn, tp: 14, 1
- GB f1 score: 0.111
- GB cohens kappa score: 0.102
- -> test with 'KNN'
- KNN tn, fp: 488, 5
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.015
- ------ Step 1/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 477, 16
- LR fn, tp: 12, 3
- LR f1 score: 0.176
- LR cohens kappa score: 0.148
- LR average precision score: 0.116
- -> test with 'GB'
- GB tn, fp: 487, 6
- GB fn, tp: 13, 2
- GB f1 score: 0.174
- GB cohens kappa score: 0.157
- -> test with 'KNN'
- KNN tn, fp: 488, 5
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.015
- ------ Step 1/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 473, 18
- LR fn, tp: 9, 4
- LR f1 score: 0.229
- LR cohens kappa score: 0.203
- LR average precision score: 0.123
- -> test with 'GB'
- GB tn, fp: 488, 3
- GB fn, tp: 13, 0
- GB f1 score: 0.000
- GB cohens kappa score: -0.010
- -> test with 'KNN'
- KNN tn, fp: 481, 10
- KNN fn, tp: 13, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.023
- ====== Step 2/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 2/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 479, 14
- LR fn, tp: 10, 5
- LR f1 score: 0.294
- LR cohens kappa score: 0.270
- LR average precision score: 0.253
- -> test with 'GB'
- GB tn, fp: 488, 5
- GB fn, tp: 13, 2
- GB f1 score: 0.182
- GB cohens kappa score: 0.166
- -> test with 'KNN'
- KNN tn, fp: 482, 11
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.026
- ------ Step 2/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 478, 15
- LR fn, tp: 9, 6
- LR f1 score: 0.333
- LR cohens kappa score: 0.310
- LR average precision score: 0.186
- -> test with 'GB'
- GB tn, fp: 491, 2
- GB fn, tp: 13, 2
- GB f1 score: 0.211
- GB cohens kappa score: 0.201
- -> test with 'KNN'
- KNN tn, fp: 487, 6
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.017
- ------ Step 2/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 477, 16
- LR fn, tp: 8, 7
- LR f1 score: 0.368
- LR cohens kappa score: 0.345
- LR average precision score: 0.261
- -> test with 'GB'
- GB tn, fp: 488, 5
- GB fn, tp: 13, 2
- GB f1 score: 0.182
- GB cohens kappa score: 0.166
- -> test with 'KNN'
- KNN tn, fp: 478, 15
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.030
- ------ Step 2/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 465, 28
- LR fn, tp: 13, 2
- LR f1 score: 0.089
- LR cohens kappa score: 0.052
- LR average precision score: 0.110
- -> test with 'GB'
- GB tn, fp: 490, 3
- GB fn, tp: 13, 2
- GB f1 score: 0.200
- GB cohens kappa score: 0.188
- -> test with 'KNN'
- KNN tn, fp: 486, 7
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.019
- ------ Step 2/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 471, 20
- LR fn, tp: 9, 4
- LR f1 score: 0.216
- LR cohens kappa score: 0.189
- LR average precision score: 0.146
- -> test with 'GB'
- GB tn, fp: 489, 2
- GB fn, tp: 12, 1
- GB f1 score: 0.125
- GB cohens kappa score: 0.116
- -> test with 'KNN'
- KNN tn, fp: 485, 6
- KNN fn, tp: 13, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.017
- ====== Step 3/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 3/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 477, 16
- LR fn, tp: 10, 5
- LR f1 score: 0.278
- LR cohens kappa score: 0.252
- LR average precision score: 0.228
- -> test with 'GB'
- GB tn, fp: 488, 5
- GB fn, tp: 13, 2
- GB f1 score: 0.182
- GB cohens kappa score: 0.166
- -> test with 'KNN'
- KNN tn, fp: 486, 7
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.019
- ------ Step 3/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 477, 16
- LR fn, tp: 12, 3
- LR f1 score: 0.176
- LR cohens kappa score: 0.148
- LR average precision score: 0.106
- -> test with 'GB'
- GB tn, fp: 489, 4
- GB fn, tp: 13, 2
- GB f1 score: 0.190
- GB cohens kappa score: 0.177
- -> test with 'KNN'
- KNN tn, fp: 490, 3
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.010
- ------ Step 3/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 477, 16
- LR fn, tp: 7, 8
- LR f1 score: 0.410
- LR cohens kappa score: 0.388
- LR average precision score: 0.299
- -> test with 'GB'
- GB tn, fp: 489, 4
- GB fn, tp: 11, 4
- GB f1 score: 0.348
- GB cohens kappa score: 0.334
- -> test with 'KNN'
- KNN tn, fp: 489, 4
- KNN fn, tp: 14, 1
- KNN f1 score: 0.100
- KNN cohens kappa score: 0.087
- ------ Step 3/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 477, 16
- LR fn, tp: 11, 4
- LR f1 score: 0.229
- LR cohens kappa score: 0.202
- LR average precision score: 0.143
- -> test with 'GB'
- GB tn, fp: 492, 1
- GB fn, tp: 13, 2
- GB f1 score: 0.222
- GB cohens kappa score: 0.214
- -> test with 'KNN'
- KNN tn, fp: 486, 7
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.019
- ------ Step 3/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 465, 26
- LR fn, tp: 9, 4
- LR f1 score: 0.186
- LR cohens kappa score: 0.156
- LR average precision score: 0.213
- -> test with 'GB'
- GB tn, fp: 484, 7
- GB fn, tp: 13, 0
- GB f1 score: 0.000
- GB cohens kappa score: -0.018
- -> test with 'KNN'
- KNN tn, fp: 486, 5
- KNN fn, tp: 13, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.015
- ====== Step 4/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 4/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 475, 18
- LR fn, tp: 12, 3
- LR f1 score: 0.167
- LR cohens kappa score: 0.137
- LR average precision score: 0.135
- -> test with 'GB'
- GB tn, fp: 491, 2
- GB fn, tp: 13, 2
- GB f1 score: 0.211
- GB cohens kappa score: 0.201
- -> test with 'KNN'
- KNN tn, fp: 485, 8
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.021
- ------ Step 4/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 476, 17
- LR fn, tp: 12, 3
- LR f1 score: 0.171
- LR cohens kappa score: 0.142
- LR average precision score: 0.152
- -> test with 'GB'
- GB tn, fp: 491, 2
- GB fn, tp: 13, 2
- GB f1 score: 0.211
- GB cohens kappa score: 0.201
- -> test with 'KNN'
- KNN tn, fp: 489, 4
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.013
- ------ Step 4/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 469, 24
- LR fn, tp: 9, 6
- LR f1 score: 0.267
- LR cohens kappa score: 0.237
- LR average precision score: 0.147
- -> test with 'GB'
- GB tn, fp: 493, 0
- GB fn, tp: 13, 2
- GB f1 score: 0.235
- GB cohens kappa score: 0.230
- -> test with 'KNN'
- KNN tn, fp: 484, 9
- KNN fn, tp: 14, 1
- KNN f1 score: 0.080
- KNN cohens kappa score: 0.058
- ------ Step 4/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 484, 9
- LR fn, tp: 7, 8
- LR f1 score: 0.500
- LR cohens kappa score: 0.484
- LR average precision score: 0.424
- -> test with 'GB'
- GB tn, fp: 491, 2
- GB fn, tp: 13, 2
- GB f1 score: 0.211
- GB cohens kappa score: 0.201
- -> test with 'KNN'
- KNN tn, fp: 484, 9
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.023
- ------ Step 4/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 475, 16
- LR fn, tp: 7, 6
- LR f1 score: 0.343
- LR cohens kappa score: 0.321
- LR average precision score: 0.181
- -> test with 'GB'
- GB tn, fp: 488, 3
- GB fn, tp: 10, 3
- GB f1 score: 0.316
- GB cohens kappa score: 0.304
- -> test with 'KNN'
- KNN tn, fp: 483, 8
- KNN fn, tp: 13, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.020
- ====== Step 5/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 5/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 477, 16
- LR fn, tp: 7, 8
- LR f1 score: 0.410
- LR cohens kappa score: 0.388
- LR average precision score: 0.275
- -> test with 'GB'
- GB tn, fp: 491, 2
- GB fn, tp: 12, 3
- GB f1 score: 0.300
- GB cohens kappa score: 0.290
- -> test with 'KNN'
- KNN tn, fp: 485, 8
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.021
- ------ Step 5/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 479, 14
- LR fn, tp: 11, 4
- LR f1 score: 0.242
- LR cohens kappa score: 0.217
- LR average precision score: 0.200
- -> test with 'GB'
- GB tn, fp: 489, 4
- GB fn, tp: 14, 1
- GB f1 score: 0.100
- GB cohens kappa score: 0.087
- -> test with 'KNN'
- KNN tn, fp: 488, 5
- KNN fn, tp: 14, 1
- KNN f1 score: 0.095
- KNN cohens kappa score: 0.080
- ------ Step 5/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 482, 11
- LR fn, tp: 10, 5
- LR f1 score: 0.323
- LR cohens kappa score: 0.301
- LR average precision score: 0.242
- -> test with 'GB'
- GB tn, fp: 493, 0
- GB fn, tp: 14, 1
- GB f1 score: 0.125
- GB cohens kappa score: 0.122
- -> test with 'KNN'
- KNN tn, fp: 481, 12
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.027
- ------ Step 5/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 475, 18
- LR fn, tp: 10, 5
- LR f1 score: 0.263
- LR cohens kappa score: 0.236
- LR average precision score: 0.203
- -> test with 'GB'
- GB tn, fp: 490, 3
- GB fn, tp: 12, 3
- GB f1 score: 0.286
- GB cohens kappa score: 0.273
- -> test with 'KNN'
- KNN tn, fp: 486, 7
- KNN fn, tp: 15, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.019
- ------ Step 5/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
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]
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 474, 17
- LR fn, tp: 10, 3
- LR f1 score: 0.182
- LR cohens kappa score: 0.155
- LR average precision score: 0.151
- -> test with 'GB'
- GB tn, fp: 488, 3
- GB fn, tp: 10, 3
- GB f1 score: 0.316
- GB cohens kappa score: 0.304
- -> test with 'KNN'
- KNN tn, fp: 487, 4
- KNN fn, tp: 13, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.012
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 484, 28
- LR fn, tp: 13, 8
- LR f1 score: 0.500
- LR cohens kappa score: 0.484
- LR average precision score: 0.424
- average:
- LR tn, fp: 475.0, 17.6
- LR fn, tp: 9.6, 5.0
- LR f1 score: 0.270
- LR cohens kappa score: 0.244
- LR average precision score: 0.201
- minimum:
- LR tn, fp: 465, 9
- LR fn, tp: 7, 2
- LR f1 score: 0.089
- LR cohens kappa score: 0.052
- LR average precision score: 0.106
- -----[ GB ]-----
- maximum:
- GB tn, fp: 493, 7
- GB fn, tp: 14, 4
- GB f1 score: 0.348
- GB cohens kappa score: 0.334
- average:
- GB tn, fp: 489.6, 3.0
- GB fn, tp: 12.6, 2.0
- GB f1 score: 0.201
- GB cohens kappa score: 0.189
- minimum:
- GB tn, fp: 484, 0
- GB fn, tp: 10, 0
- GB f1 score: 0.000
- GB cohens kappa score: -0.018
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 490, 15
- KNN fn, tp: 15, 1
- KNN f1 score: 0.100
- KNN cohens kappa score: 0.087
- average:
- KNN tn, fp: 485.4, 7.2
- KNN fn, tp: 14.44, 0.16
- KNN f1 score: 0.014
- KNN cohens kappa score: -0.005
- minimum:
- KNN tn, fp: 478, 3
- KNN fn, tp: 13, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.030
|