| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727 |
- ///////////////////////////////////////////
- // Running CTAB-GAN on folding_hypothyroid
- ///////////////////////////////////////////
- Load 'data_input/folding_hypothyroid'
- from pickle file
- non empty cut in data_input/folding_hypothyroid! (1 points)
- 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:02<00:19, 2.17s/it]
20%|██ | 2/10 [00:04<00:16, 2.06s/it]
30%|███ | 3/10 [00:06<00:15, 2.16s/it]
40%|████ | 4/10 [00:08<00:12, 2.07s/it]
50%|█████ | 5/10 [00:10<00:10, 2.00s/it]
60%|██████ | 6/10 [00:12<00:08, 2.10s/it]
70%|███████ | 7/10 [00:14<00:06, 2.11s/it]
80%|████████ | 8/10 [00:16<00:04, 2.14s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.10s/it]
100%|██████████| 10/10 [00:20<00:00, 2.09s/it]
100%|██████████| 10/10 [00:20<00:00, 2.10s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 571, 32
- LR fn, tp: 20, 11
- LR f1 score: 0.297
- LR cohens kappa score: 0.255
- LR average precision score: 0.234
- -> test with 'GB'
- GB tn, fp: 599, 4
- GB fn, tp: 7, 24
- GB f1 score: 0.814
- GB cohens kappa score: 0.804
- -> test with 'KNN'
- KNN tn, fp: 589, 14
- KNN fn, tp: 9, 22
- KNN f1 score: 0.657
- KNN cohens kappa score: 0.638
- ------ 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:18, 2.06s/it]
20%|██ | 2/10 [00:04<00:17, 2.20s/it]
30%|███ | 3/10 [00:06<00:14, 2.10s/it]
40%|████ | 4/10 [00:08<00:12, 2.06s/it]
50%|█████ | 5/10 [00:10<00:10, 2.11s/it]
60%|██████ | 6/10 [00:12<00:08, 2.07s/it]
70%|███████ | 7/10 [00:14<00:06, 2.07s/it]
80%|████████ | 8/10 [00:16<00:04, 2.09s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.00s/it]
100%|██████████| 10/10 [00:20<00:00, 1.99s/it]
100%|██████████| 10/10 [00:20<00:00, 2.05s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 557, 46
- LR fn, tp: 24, 7
- LR f1 score: 0.167
- LR cohens kappa score: 0.112
- LR average precision score: 0.126
- -> test with 'GB'
- GB tn, fp: 595, 8
- GB fn, tp: 8, 23
- GB f1 score: 0.742
- GB cohens kappa score: 0.729
- -> test with 'KNN'
- KNN tn, fp: 587, 16
- KNN fn, tp: 6, 25
- KNN f1 score: 0.694
- KNN cohens kappa score: 0.676
- ------ 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:18, 2.06s/it]
20%|██ | 2/10 [00:04<00:16, 2.02s/it]
30%|███ | 3/10 [00:05<00:13, 1.92s/it]
40%|████ | 4/10 [00:07<00:11, 1.89s/it]
50%|█████ | 5/10 [00:09<00:09, 1.94s/it]
60%|██████ | 6/10 [00:12<00:08, 2.06s/it]
70%|███████ | 7/10 [00:14<00:06, 2.05s/it]
80%|████████ | 8/10 [00:16<00:04, 2.06s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.99s/it]
100%|██████████| 10/10 [00:20<00:00, 2.06s/it]
100%|██████████| 10/10 [00:20<00:00, 2.02s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 590, 13
- LR fn, tp: 26, 5
- LR f1 score: 0.204
- LR cohens kappa score: 0.174
- LR average precision score: 0.207
- -> test with 'GB'
- GB tn, fp: 598, 5
- GB fn, tp: 5, 26
- GB f1 score: 0.839
- GB cohens kappa score: 0.830
- -> test with 'KNN'
- KNN tn, fp: 592, 11
- KNN fn, tp: 14, 17
- KNN f1 score: 0.576
- KNN cohens kappa score: 0.556
- ------ 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:19, 2.13s/it]
20%|██ | 2/10 [00:04<00:16, 2.00s/it]
30%|███ | 3/10 [00:06<00:14, 2.11s/it]
40%|████ | 4/10 [00:08<00:12, 2.08s/it]
50%|█████ | 5/10 [00:10<00:11, 2.20s/it]
60%|██████ | 6/10 [00:12<00:08, 2.12s/it]
70%|███████ | 7/10 [00:14<00:06, 2.07s/it]
80%|████████ | 8/10 [00:16<00:04, 2.08s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.02s/it]
100%|██████████| 10/10 [00:20<00:00, 1.94s/it]
100%|██████████| 10/10 [00:20<00:00, 2.04s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 596, 7
- LR fn, tp: 24, 7
- LR f1 score: 0.311
- LR cohens kappa score: 0.289
- LR average precision score: 0.328
- -> test with 'GB'
- GB tn, fp: 601, 2
- GB fn, tp: 11, 20
- GB f1 score: 0.755
- GB cohens kappa score: 0.744
- -> test with 'KNN'
- KNN tn, fp: 590, 13
- KNN fn, tp: 13, 18
- KNN f1 score: 0.581
- KNN cohens kappa score: 0.559
- ------ 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:01<00:17, 1.96s/it]
20%|██ | 2/10 [00:04<00:16, 2.11s/it]
30%|███ | 3/10 [00:06<00:14, 2.08s/it]
40%|████ | 4/10 [00:08<00:12, 2.08s/it]
50%|█████ | 5/10 [00:10<00:10, 2.02s/it]
60%|██████ | 6/10 [00:12<00:08, 2.02s/it]
70%|███████ | 7/10 [00:14<00:05, 1.99s/it]
80%|████████ | 8/10 [00:16<00:04, 2.03s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.93s/it]
100%|██████████| 10/10 [00:20<00:00, 2.02s/it]
100%|██████████| 10/10 [00:20<00:00, 2.02s/it]
- -> create 2288 synthetic samples
- -> test with 'LR'
- LR tn, fp: 542, 58
- LR fn, tp: 16, 11
- LR f1 score: 0.229
- LR cohens kappa score: 0.178
- LR average precision score: 0.155
- -> test with 'GB'
- GB tn, fp: 596, 4
- GB fn, tp: 6, 21
- GB f1 score: 0.808
- GB cohens kappa score: 0.799
- -> test with 'KNN'
- KNN tn, fp: 583, 17
- KNN fn, tp: 11, 16
- KNN f1 score: 0.533
- KNN cohens kappa score: 0.510
- ====== 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:18, 2.00s/it]
20%|██ | 2/10 [00:03<00:15, 1.90s/it]
30%|███ | 3/10 [00:05<00:13, 1.94s/it]
40%|████ | 4/10 [00:07<00:11, 2.00s/it]
50%|█████ | 5/10 [00:10<00:10, 2.07s/it]
60%|██████ | 6/10 [00:12<00:08, 2.03s/it]
70%|███████ | 7/10 [00:14<00:06, 2.08s/it]
80%|████████ | 8/10 [00:16<00:04, 2.12s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.06s/it]
100%|██████████| 10/10 [00:20<00:00, 2.09s/it]
100%|██████████| 10/10 [00:20<00:00, 2.05s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 568, 35
- LR fn, tp: 24, 7
- LR f1 score: 0.192
- LR cohens kappa score: 0.144
- LR average precision score: 0.155
- -> test with 'GB'
- GB tn, fp: 597, 6
- GB fn, tp: 10, 21
- GB f1 score: 0.724
- GB cohens kappa score: 0.711
- -> test with 'KNN'
- KNN tn, fp: 594, 9
- KNN fn, tp: 12, 19
- KNN f1 score: 0.644
- KNN cohens kappa score: 0.627
- ------ 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:01<00:17, 1.98s/it]
20%|██ | 2/10 [00:03<00:15, 1.95s/it]
30%|███ | 3/10 [00:06<00:14, 2.02s/it]
40%|████ | 4/10 [00:08<00:12, 2.10s/it]
50%|█████ | 5/10 [00:10<00:10, 2.16s/it]
60%|██████ | 6/10 [00:12<00:08, 2.14s/it]
70%|███████ | 7/10 [00:14<00:06, 2.12s/it]
80%|████████ | 8/10 [00:16<00:04, 2.03s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.00s/it]
100%|██████████| 10/10 [00:20<00:00, 1.96s/it]
100%|██████████| 10/10 [00:20<00:00, 2.03s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 557, 46
- LR fn, tp: 20, 11
- LR f1 score: 0.250
- LR cohens kappa score: 0.199
- LR average precision score: 0.167
- -> test with 'GB'
- GB tn, fp: 597, 6
- GB fn, tp: 5, 26
- GB f1 score: 0.825
- GB cohens kappa score: 0.816
- -> test with 'KNN'
- KNN tn, fp: 592, 11
- KNN fn, tp: 9, 22
- KNN f1 score: 0.688
- KNN cohens kappa score: 0.671
- ------ 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:18, 2.08s/it]
20%|██ | 2/10 [00:04<00:16, 2.08s/it]
30%|███ | 3/10 [00:06<00:14, 2.08s/it]
40%|████ | 4/10 [00:08<00:12, 2.03s/it]
50%|█████ | 5/10 [00:10<00:10, 2.03s/it]
60%|██████ | 6/10 [00:12<00:08, 2.04s/it]
70%|███████ | 7/10 [00:14<00:06, 2.02s/it]
80%|████████ | 8/10 [00:16<00:03, 1.95s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.91s/it]
100%|██████████| 10/10 [00:19<00:00, 1.94s/it]
100%|██████████| 10/10 [00:19<00:00, 1.99s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 576, 27
- LR fn, tp: 22, 9
- LR f1 score: 0.269
- LR cohens kappa score: 0.228
- LR average precision score: 0.257
- -> test with 'GB'
- GB tn, fp: 600, 3
- GB fn, tp: 10, 21
- GB f1 score: 0.764
- GB cohens kappa score: 0.753
- -> test with 'KNN'
- KNN tn, fp: 593, 10
- KNN fn, tp: 12, 19
- KNN f1 score: 0.633
- KNN cohens kappa score: 0.615
- ------ 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:01<00:17, 1.94s/it]
20%|██ | 2/10 [00:04<00:16, 2.07s/it]
30%|███ | 3/10 [00:06<00:14, 2.13s/it]
40%|████ | 4/10 [00:08<00:12, 2.06s/it]
50%|█████ | 5/10 [00:10<00:10, 2.05s/it]
60%|██████ | 6/10 [00:12<00:08, 2.01s/it]
70%|███████ | 7/10 [00:13<00:05, 1.92s/it]
80%|████████ | 8/10 [00:16<00:04, 2.00s/it]
90%|█████████ | 9/10 [00:18<00:01, 2.00s/it]
100%|██████████| 10/10 [00:20<00:00, 2.02s/it]
100%|██████████| 10/10 [00:20<00:00, 2.02s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 574, 29
- LR fn, tp: 19, 12
- LR f1 score: 0.333
- LR cohens kappa score: 0.294
- LR average precision score: 0.208
- -> test with 'GB'
- GB tn, fp: 599, 4
- GB fn, tp: 9, 22
- GB f1 score: 0.772
- GB cohens kappa score: 0.761
- -> test with 'KNN'
- KNN tn, fp: 585, 18
- KNN fn, tp: 14, 17
- KNN f1 score: 0.515
- KNN cohens kappa score: 0.489
- ------ 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.22s/it]
20%|██ | 2/10 [00:04<00:17, 2.23s/it]
30%|███ | 3/10 [00:06<00:15, 2.15s/it]
40%|████ | 4/10 [00:08<00:12, 2.05s/it]
50%|█████ | 5/10 [00:10<00:10, 2.07s/it]
60%|██████ | 6/10 [00:12<00:08, 2.04s/it]
70%|███████ | 7/10 [00:14<00:06, 2.05s/it]
80%|████████ | 8/10 [00:16<00:04, 2.02s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.02s/it]
100%|██████████| 10/10 [00:20<00:00, 1.98s/it]
100%|██████████| 10/10 [00:20<00:00, 2.04s/it]
- -> create 2288 synthetic samples
- -> test with 'LR'
- LR tn, fp: 562, 38
- LR fn, tp: 22, 5
- LR f1 score: 0.143
- LR cohens kappa score: 0.095
- LR average precision score: 0.149
- -> test with 'GB'
- GB tn, fp: 597, 3
- GB fn, tp: 5, 22
- GB f1 score: 0.846
- GB cohens kappa score: 0.840
- -> test with 'KNN'
- KNN tn, fp: 585, 15
- KNN fn, tp: 9, 18
- KNN f1 score: 0.600
- KNN cohens kappa score: 0.580
- ====== 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:20, 2.26s/it]
20%|██ | 2/10 [00:04<00:17, 2.19s/it]
30%|███ | 3/10 [00:06<00:15, 2.23s/it]
40%|████ | 4/10 [00:08<00:13, 2.24s/it]
50%|█████ | 5/10 [00:10<00:10, 2.11s/it]
60%|██████ | 6/10 [00:13<00:08, 2.14s/it]
70%|███████ | 7/10 [00:14<00:06, 2.05s/it]
80%|████████ | 8/10 [00:16<00:04, 2.07s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.01s/it]
100%|██████████| 10/10 [00:20<00:00, 2.00s/it]
100%|██████████| 10/10 [00:20<00:00, 2.08s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 571, 32
- LR fn, tp: 21, 10
- LR f1 score: 0.274
- LR cohens kappa score: 0.231
- LR average precision score: 0.258
- -> test with 'GB'
- GB tn, fp: 602, 1
- GB fn, tp: 8, 23
- GB f1 score: 0.836
- GB cohens kappa score: 0.829
- -> test with 'KNN'
- KNN tn, fp: 597, 6
- KNN fn, tp: 14, 17
- KNN f1 score: 0.630
- KNN cohens kappa score: 0.614
- ------ 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:01<00:17, 1.99s/it]
20%|██ | 2/10 [00:03<00:15, 1.97s/it]
30%|███ | 3/10 [00:05<00:13, 1.94s/it]
40%|████ | 4/10 [00:07<00:11, 1.90s/it]
50%|█████ | 5/10 [00:09<00:09, 1.94s/it]
60%|██████ | 6/10 [00:11<00:07, 1.94s/it]
70%|███████ | 7/10 [00:13<00:06, 2.01s/it]
80%|████████ | 8/10 [00:15<00:04, 2.01s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.10s/it]
100%|██████████| 10/10 [00:19<00:00, 2.02s/it]
100%|██████████| 10/10 [00:19<00:00, 1.99s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 594, 9
- LR fn, tp: 25, 6
- LR f1 score: 0.261
- LR cohens kappa score: 0.237
- LR average precision score: 0.327
- -> test with 'GB'
- GB tn, fp: 594, 9
- GB fn, tp: 5, 26
- GB f1 score: 0.788
- GB cohens kappa score: 0.776
- -> test with 'KNN'
- KNN tn, fp: 587, 16
- KNN fn, tp: 10, 21
- KNN f1 score: 0.618
- KNN cohens kappa score: 0.596
- ------ 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:19, 2.14s/it]
20%|██ | 2/10 [00:04<00:18, 2.32s/it]
30%|███ | 3/10 [00:06<00:15, 2.20s/it]
40%|████ | 4/10 [00:08<00:12, 2.07s/it]
50%|█████ | 5/10 [00:10<00:10, 2.03s/it]
60%|██████ | 6/10 [00:12<00:08, 2.06s/it]
70%|███████ | 7/10 [00:14<00:06, 2.03s/it]
80%|████████ | 8/10 [00:16<00:03, 1.96s/it]
90%|█████████ | 9/10 [00:18<00:01, 1.98s/it]
100%|██████████| 10/10 [00:20<00:00, 1.99s/it]
100%|██████████| 10/10 [00:20<00:00, 2.04s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 592, 11
- LR fn, tp: 26, 5
- LR f1 score: 0.213
- LR cohens kappa score: 0.186
- LR average precision score: 0.218
- -> test with 'GB'
- GB tn, fp: 599, 4
- GB fn, tp: 5, 26
- GB f1 score: 0.852
- GB cohens kappa score: 0.845
- -> test with 'KNN'
- KNN tn, fp: 588, 15
- KNN fn, tp: 9, 22
- KNN f1 score: 0.647
- KNN cohens kappa score: 0.627
- ------ 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:18, 2.10s/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:12, 2.12s/it]
50%|█████ | 5/10 [00:10<00:10, 2.11s/it]
60%|██████ | 6/10 [00:12<00:08, 2.10s/it]
70%|███████ | 7/10 [00:14<00:06, 2.04s/it]
80%|████████ | 8/10 [00:16<00:04, 2.08s/it]
90%|█████████ | 9/10 [00:19<00:02, 2.12s/it]
100%|██████████| 10/10 [00:21<00:00, 2.18s/it]
100%|██████████| 10/10 [00:21<00:00, 2.14s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 565, 38
- LR fn, tp: 17, 14
- LR f1 score: 0.337
- LR cohens kappa score: 0.294
- LR average precision score: 0.252
- -> test with 'GB'
- GB tn, fp: 595, 8
- GB fn, tp: 6, 25
- GB f1 score: 0.781
- GB cohens kappa score: 0.770
- -> test with 'KNN'
- KNN tn, fp: 590, 13
- KNN fn, tp: 10, 21
- KNN f1 score: 0.646
- KNN cohens kappa score: 0.627
- ------ 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:19, 2.21s/it]
20%|██ | 2/10 [00:04<00:17, 2.16s/it]
30%|███ | 3/10 [00:06<00:14, 2.07s/it]
40%|████ | 4/10 [00:08<00:12, 2.07s/it]
50%|█████ | 5/10 [00:10<00:10, 2.01s/it]
60%|██████ | 6/10 [00:12<00:07, 1.95s/it]
70%|███████ | 7/10 [00:13<00:05, 1.92s/it]
80%|████████ | 8/10 [00:16<00:03, 1.99s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.96s/it]
100%|██████████| 10/10 [00:20<00:00, 1.98s/it]
100%|██████████| 10/10 [00:20<00:00, 2.00s/it]
- -> create 2288 synthetic samples
- -> test with 'LR'
- LR tn, fp: 571, 29
- LR fn, tp: 19, 8
- LR f1 score: 0.250
- LR cohens kappa score: 0.211
- LR average precision score: 0.186
- -> test with 'GB'
- GB tn, fp: 598, 2
- GB fn, tp: 5, 22
- GB f1 score: 0.863
- GB cohens kappa score: 0.857
- -> test with 'KNN'
- KNN tn, fp: 582, 18
- KNN fn, tp: 7, 20
- KNN f1 score: 0.615
- KNN cohens kappa score: 0.595
- ====== 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:19, 2.15s/it]
20%|██ | 2/10 [00:04<00:16, 2.01s/it]
30%|███ | 3/10 [00:05<00:13, 1.95s/it]
40%|████ | 4/10 [00:07<00:11, 1.98s/it]
50%|█████ | 5/10 [00:09<00:09, 1.92s/it]
60%|██████ | 6/10 [00:12<00:08, 2.03s/it]
70%|███████ | 7/10 [00:14<00:06, 2.11s/it]
80%|████████ | 8/10 [00:16<00:04, 2.01s/it]
90%|█████████ | 9/10 [00:18<00:01, 1.98s/it]
100%|██████████| 10/10 [00:19<00:00, 1.96s/it]
100%|██████████| 10/10 [00:19<00:00, 1.99s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 592, 11
- LR fn, tp: 29, 2
- LR f1 score: 0.091
- LR cohens kappa score: 0.064
- LR average precision score: 0.203
- -> test with 'GB'
- GB tn, fp: 596, 7
- GB fn, tp: 6, 25
- GB f1 score: 0.794
- GB cohens kappa score: 0.783
- -> test with 'KNN'
- KNN tn, fp: 593, 10
- KNN fn, tp: 16, 15
- KNN f1 score: 0.536
- KNN cohens kappa score: 0.515
- ------ 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:18, 2.02s/it]
20%|██ | 2/10 [00:04<00:16, 2.03s/it]
30%|███ | 3/10 [00:05<00:13, 1.94s/it]
40%|████ | 4/10 [00:07<00:11, 1.85s/it]
50%|█████ | 5/10 [00:09<00:09, 1.87s/it]
60%|██████ | 6/10 [00:11<00:07, 1.88s/it]
70%|███████ | 7/10 [00:13<00:05, 1.92s/it]
80%|████████ | 8/10 [00:15<00:03, 1.86s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.90s/it]
100%|██████████| 10/10 [00:19<00:00, 1.91s/it]
100%|██████████| 10/10 [00:19<00:00, 1.90s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 577, 26
- LR fn, tp: 24, 7
- LR f1 score: 0.219
- LR cohens kappa score: 0.177
- LR average precision score: 0.162
- -> test with 'GB'
- GB tn, fp: 600, 3
- GB fn, tp: 7, 24
- GB f1 score: 0.828
- GB cohens kappa score: 0.819
- -> test with 'KNN'
- KNN tn, fp: 589, 14
- KNN fn, tp: 13, 18
- KNN f1 score: 0.571
- KNN cohens kappa score: 0.549
- ------ 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:01<00:16, 1.85s/it]
20%|██ | 2/10 [00:03<00:14, 1.80s/it]
30%|███ | 3/10 [00:05<00:12, 1.77s/it]
40%|████ | 4/10 [00:07<00:10, 1.75s/it]
50%|█████ | 5/10 [00:08<00:08, 1.79s/it]
60%|██████ | 6/10 [00:10<00:07, 1.79s/it]
70%|███████ | 7/10 [00:12<00:05, 1.84s/it]
80%|████████ | 8/10 [00:14<00:03, 1.90s/it]
90%|█████████ | 9/10 [00:16<00:01, 1.91s/it]
100%|██████████| 10/10 [00:18<00:00, 1.91s/it]
100%|██████████| 10/10 [00:18<00:00, 1.85s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 575, 28
- LR fn, tp: 18, 13
- LR f1 score: 0.361
- LR cohens kappa score: 0.323
- LR average precision score: 0.280
- -> test with 'GB'
- GB tn, fp: 601, 2
- GB fn, tp: 6, 25
- GB f1 score: 0.862
- GB cohens kappa score: 0.855
- -> test with 'KNN'
- KNN tn, fp: 593, 10
- KNN fn, tp: 10, 21
- KNN f1 score: 0.677
- KNN cohens kappa score: 0.661
- ------ 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:01<00:17, 1.98s/it]
20%|██ | 2/10 [00:03<00:14, 1.86s/it]
30%|███ | 3/10 [00:05<00:13, 1.87s/it]
40%|████ | 4/10 [00:07<00:11, 2.00s/it]
50%|█████ | 5/10 [00:10<00:10, 2.06s/it]
60%|██████ | 6/10 [00:12<00:08, 2.08s/it]
70%|███████ | 7/10 [00:14<00:06, 2.03s/it]
80%|████████ | 8/10 [00:16<00:04, 2.01s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.03s/it]
100%|██████████| 10/10 [00:20<00:00, 2.01s/it]
100%|██████████| 10/10 [00:20<00:00, 2.00s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 562, 41
- LR fn, tp: 20, 11
- LR f1 score: 0.265
- LR cohens kappa score: 0.217
- LR average precision score: 0.197
- -> test with 'GB'
- GB tn, fp: 601, 2
- GB fn, tp: 5, 26
- GB f1 score: 0.881
- GB cohens kappa score: 0.876
- -> test with 'KNN'
- KNN tn, fp: 584, 19
- KNN fn, tp: 15, 16
- KNN f1 score: 0.485
- KNN cohens kappa score: 0.457
- ------ 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:18, 2.03s/it]
20%|██ | 2/10 [00:04<00:15, 2.00s/it]
30%|███ | 3/10 [00:05<00:13, 1.90s/it]
40%|████ | 4/10 [00:07<00:11, 1.89s/it]
50%|█████ | 5/10 [00:09<00:09, 1.94s/it]
60%|██████ | 6/10 [00:11<00:07, 1.92s/it]
70%|███████ | 7/10 [00:14<00:06, 2.09s/it]
80%|████████ | 8/10 [00:16<00:04, 2.13s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.12s/it]
100%|██████████| 10/10 [00:20<00:00, 2.06s/it]
100%|██████████| 10/10 [00:20<00:00, 2.03s/it]
- -> create 2288 synthetic samples
- -> test with 'LR'
- LR tn, fp: 549, 51
- LR fn, tp: 15, 12
- LR f1 score: 0.267
- LR cohens kappa score: 0.220
- LR average precision score: 0.197
- -> test with 'GB'
- GB tn, fp: 597, 3
- GB fn, tp: 8, 19
- GB f1 score: 0.776
- GB cohens kappa score: 0.766
- -> test with 'KNN'
- KNN tn, fp: 584, 16
- KNN fn, tp: 10, 17
- KNN f1 score: 0.567
- KNN cohens kappa score: 0.545
- ====== 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:20, 2.30s/it]
20%|██ | 2/10 [00:04<00:17, 2.20s/it]
30%|███ | 3/10 [00:06<00:14, 2.05s/it]
40%|████ | 4/10 [00:08<00:12, 2.07s/it]
50%|█████ | 5/10 [00:10<00:10, 2.12s/it]
60%|██████ | 6/10 [00:12<00:08, 2.09s/it]
70%|███████ | 7/10 [00:14<00:06, 2.02s/it]
80%|████████ | 8/10 [00:16<00:04, 2.06s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.02s/it]
100%|██████████| 10/10 [00:20<00:00, 1.98s/it]
100%|██████████| 10/10 [00:20<00:00, 2.05s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 560, 43
- LR fn, tp: 16, 15
- LR f1 score: 0.337
- LR cohens kappa score: 0.292
- LR average precision score: 0.205
- -> test with 'GB'
- GB tn, fp: 599, 4
- GB fn, tp: 8, 23
- GB f1 score: 0.793
- GB cohens kappa score: 0.783
- -> test with 'KNN'
- KNN tn, fp: 586, 17
- KNN fn, tp: 9, 22
- KNN f1 score: 0.629
- KNN cohens kappa score: 0.607
- ------ 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:01<00:16, 1.89s/it]
20%|██ | 2/10 [00:03<00:16, 2.01s/it]
30%|███ | 3/10 [00:06<00:14, 2.01s/it]
40%|████ | 4/10 [00:08<00:12, 2.09s/it]
50%|█████ | 5/10 [00:10<00:10, 2.15s/it]
60%|██████ | 6/10 [00:12<00:08, 2.07s/it]
70%|███████ | 7/10 [00:14<00:06, 2.08s/it]
80%|████████ | 8/10 [00:16<00:04, 2.06s/it]
90%|█████████ | 9/10 [00:21<00:02, 2.83s/it]
100%|██████████| 10/10 [00:23<00:00, 2.57s/it]
100%|██████████| 10/10 [00:23<00:00, 2.30s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 575, 28
- LR fn, tp: 27, 4
- LR f1 score: 0.127
- LR cohens kappa score: 0.081
- LR average precision score: 0.152
- -> test with 'GB'
- GB tn, fp: 603, 0
- GB fn, tp: 6, 25
- GB f1 score: 0.893
- GB cohens kappa score: 0.888
- -> test with 'KNN'
- KNN tn, fp: 591, 12
- KNN fn, tp: 14, 17
- KNN f1 score: 0.567
- KNN cohens kappa score: 0.545
- ------ 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:20, 2.32s/it]
20%|██ | 2/10 [00:04<00:16, 2.09s/it]
30%|███ | 3/10 [00:06<00:15, 2.18s/it]
40%|████ | 4/10 [00:08<00:13, 2.26s/it]
50%|█████ | 5/10 [00:11<00:11, 2.28s/it]
60%|██████ | 6/10 [00:13<00:09, 2.31s/it]
70%|███████ | 7/10 [00:15<00:06, 2.28s/it]
80%|████████ | 8/10 [00:18<00:04, 2.25s/it]
90%|█████████ | 9/10 [00:19<00:02, 2.17s/it]
100%|██████████| 10/10 [00:22<00:00, 2.15s/it]
100%|██████████| 10/10 [00:22<00:00, 2.21s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 544, 59
- LR fn, tp: 20, 11
- LR f1 score: 0.218
- LR cohens kappa score: 0.161
- LR average precision score: 0.159
- -> test with 'GB'
- GB tn, fp: 598, 5
- GB fn, tp: 11, 20
- GB f1 score: 0.714
- GB cohens kappa score: 0.701
- -> test with 'KNN'
- KNN tn, fp: 590, 13
- KNN fn, tp: 14, 17
- KNN f1 score: 0.557
- KNN cohens kappa score: 0.535
- ------ 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:18, 2.10s/it]
20%|██ | 2/10 [00:04<00:16, 2.07s/it]
30%|███ | 3/10 [00:08<00:21, 3.06s/it]
40%|████ | 4/10 [00:10<00:16, 2.69s/it]
50%|█████ | 5/10 [00:12<00:12, 2.52s/it]
60%|██████ | 6/10 [00:14<00:09, 2.31s/it]
70%|███████ | 7/10 [00:16<00:06, 2.20s/it]
80%|████████ | 8/10 [00:18<00:04, 2.12s/it]
90%|█████████ | 9/10 [00:20<00:02, 2.09s/it]
100%|██████████| 10/10 [00:22<00:00, 2.06s/it]
100%|██████████| 10/10 [00:22<00:00, 2.26s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 573, 30
- LR fn, tp: 20, 11
- LR f1 score: 0.306
- LR cohens kappa score: 0.265
- LR average precision score: 0.190
- -> test with 'GB'
- GB tn, fp: 598, 5
- GB fn, tp: 4, 27
- GB f1 score: 0.857
- GB cohens kappa score: 0.850
- -> test with 'KNN'
- KNN tn, fp: 593, 10
- KNN fn, tp: 10, 21
- KNN f1 score: 0.677
- KNN cohens kappa score: 0.661
- ------ 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:18, 2.06s/it]
20%|██ | 2/10 [00:03<00:15, 1.97s/it]
30%|███ | 3/10 [00:06<00:14, 2.02s/it]
40%|████ | 4/10 [00:08<00:12, 2.04s/it]
50%|█████ | 5/10 [00:10<00:09, 2.00s/it]
60%|██████ | 6/10 [00:12<00:07, 1.99s/it]
70%|███████ | 7/10 [00:14<00:06, 2.03s/it]
80%|████████ | 8/10 [00:16<00:03, 1.99s/it]
90%|█████████ | 9/10 [00:18<00:01, 1.99s/it]
100%|██████████| 10/10 [00:19<00:00, 1.95s/it]
100%|██████████| 10/10 [00:19<00:00, 1.99s/it]
- -> create 2288 synthetic samples
- -> test with 'LR'
- LR tn, fp: 556, 44
- LR fn, tp: 15, 12
- LR f1 score: 0.289
- LR cohens kappa score: 0.245
- LR average precision score: 0.168
- -> test with 'GB'
- GB tn, fp: 594, 6
- GB fn, tp: 10, 17
- GB f1 score: 0.680
- GB cohens kappa score: 0.667
- -> test with 'KNN'
- KNN tn, fp: 587, 13
- KNN fn, tp: 7, 20
- KNN f1 score: 0.667
- KNN cohens kappa score: 0.650
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 596, 59
- LR fn, tp: 29, 15
- LR f1 score: 0.361
- LR cohens kappa score: 0.323
- LR average precision score: 0.328
- average:
- LR tn, fp: 569.96, 32.44
- LR fn, tp: 21.16, 9.04
- LR f1 score: 0.248
- LR cohens kappa score: 0.207
- LR average precision score: 0.206
- minimum:
- LR tn, fp: 542, 7
- LR fn, tp: 15, 2
- LR f1 score: 0.091
- LR cohens kappa score: 0.064
- LR average precision score: 0.126
- -----[ GB ]-----
- maximum:
- GB tn, fp: 603, 9
- GB fn, tp: 11, 27
- GB f1 score: 0.893
- GB cohens kappa score: 0.888
- average:
- GB tn, fp: 598.16, 4.24
- GB fn, tp: 7.04, 23.16
- GB f1 score: 0.803
- GB cohens kappa score: 0.794
- minimum:
- GB tn, fp: 594, 0
- GB fn, tp: 4, 17
- GB f1 score: 0.680
- GB cohens kappa score: 0.667
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 597, 19
- KNN fn, tp: 16, 25
- KNN f1 score: 0.694
- KNN cohens kappa score: 0.676
- average:
- KNN tn, fp: 588.96, 13.44
- KNN fn, tp: 11.08, 19.12
- KNN f1 score: 0.608
- KNN cohens kappa score: 0.588
- minimum:
- KNN tn, fp: 582, 6
- KNN fn, tp: 6, 15
- KNN f1 score: 0.485
- KNN cohens kappa score: 0.457
|