| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726 |
- ///////////////////////////////////////////
- // Running CTAB-GAN on imblearn_protein_homo
- ///////////////////////////////////////////
- Load 'data_input/imblearn_protein_homo'
- 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:11<01:42, 11.43s/it]
20%|██ | 2/10 [00:22<01:31, 11.49s/it]
30%|███ | 3/10 [00:34<01:21, 11.62s/it]
40%|████ | 4/10 [00:46<01:09, 11.67s/it]
50%|█████ | 5/10 [00:57<00:56, 11.38s/it]
60%|██████ | 6/10 [01:08<00:44, 11.18s/it]
70%|███████ | 7/10 [01:18<00:32, 10.95s/it]
80%|████████ | 8/10 [01:29<00:22, 11.02s/it]
90%|█████████ | 9/10 [01:41<00:11, 11.36s/it]
100%|██████████| 10/10 [01:53<00:00, 11.35s/it]
100%|██████████| 10/10 [01:53<00:00, 11.32s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28867, 24
- LR fn, tp: 60, 200
- LR f1 score: 0.826
- LR cohens kappa score: 0.825
- LR average precision score: 0.853
- -> test with 'GB'
- GB tn, fp: 28861, 30
- GB fn, tp: 58, 202
- GB f1 score: 0.821
- GB cohens kappa score: 0.820
- -> test with 'KNN'
- KNN tn, fp: 28883, 8
- KNN fn, tp: 161, 99
- KNN f1 score: 0.540
- KNN cohens kappa score: 0.537
- ------ 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:11<01:47, 12.00s/it]
20%|██ | 2/10 [00:23<01:33, 11.70s/it]
30%|███ | 3/10 [00:34<01:18, 11.21s/it]
40%|████ | 4/10 [00:44<01:05, 10.90s/it]
50%|█████ | 5/10 [00:55<00:54, 10.96s/it]
60%|██████ | 6/10 [01:06<00:43, 10.94s/it]
70%|███████ | 7/10 [01:18<00:33, 11.12s/it]
80%|████████ | 8/10 [01:28<00:21, 10.93s/it]
90%|█████████ | 9/10 [01:40<00:11, 11.21s/it]
100%|██████████| 10/10 [01:51<00:00, 11.32s/it]
100%|██████████| 10/10 [01:51<00:00, 11.19s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28879, 12
- LR fn, tp: 57, 203
- LR f1 score: 0.855
- LR cohens kappa score: 0.854
- LR average precision score: 0.888
- -> test with 'GB'
- GB tn, fp: 28876, 15
- GB fn, tp: 60, 200
- GB f1 score: 0.842
- GB cohens kappa score: 0.841
- -> test with 'KNN'
- KNN tn, fp: 28874, 17
- KNN fn, tp: 144, 116
- KNN f1 score: 0.590
- KNN cohens kappa score: 0.588
- ------ 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:11<01:42, 11.40s/it]
20%|██ | 2/10 [00:23<01:32, 11.58s/it]
30%|███ | 3/10 [00:34<01:21, 11.65s/it]
40%|████ | 4/10 [00:46<01:08, 11.48s/it]
50%|█████ | 5/10 [00:57<00:57, 11.41s/it]
60%|██████ | 6/10 [01:08<00:45, 11.40s/it]
70%|███████ | 7/10 [01:20<00:34, 11.39s/it]
80%|████████ | 8/10 [01:30<00:22, 11.21s/it]
90%|█████████ | 9/10 [01:41<00:11, 11.14s/it]
100%|██████████| 10/10 [01:52<00:00, 11.11s/it]
100%|██████████| 10/10 [01:52<00:00, 11.29s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28870, 21
- LR fn, tp: 62, 198
- LR f1 score: 0.827
- LR cohens kappa score: 0.825
- LR average precision score: 0.886
- -> test with 'GB'
- GB tn, fp: 28867, 24
- GB fn, tp: 73, 187
- GB f1 score: 0.794
- GB cohens kappa score: 0.792
- -> test with 'KNN'
- KNN tn, fp: 28881, 10
- KNN fn, tp: 170, 90
- KNN f1 score: 0.500
- KNN cohens kappa score: 0.498
- ------ 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:12<01:52, 12.45s/it]
20%|██ | 2/10 [00:24<01:37, 12.20s/it]
30%|███ | 3/10 [00:36<01:25, 12.25s/it]
40%|████ | 4/10 [00:47<01:10, 11.78s/it]
50%|█████ | 5/10 [00:59<00:58, 11.76s/it]
60%|██████ | 6/10 [01:11<00:47, 11.89s/it]
70%|███████ | 7/10 [01:23<00:35, 11.92s/it]
80%|████████ | 8/10 [01:35<00:23, 11.93s/it]
90%|█████████ | 9/10 [01:48<00:12, 12.13s/it]
100%|██████████| 10/10 [02:00<00:00, 12.09s/it]
100%|██████████| 10/10 [02:00<00:00, 12.02s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28877, 14
- LR fn, tp: 68, 192
- LR f1 score: 0.824
- LR cohens kappa score: 0.823
- LR average precision score: 0.852
- -> test with 'GB'
- GB tn, fp: 28871, 20
- GB fn, tp: 70, 190
- GB f1 score: 0.809
- GB cohens kappa score: 0.807
- -> test with 'KNN'
- KNN tn, fp: 28884, 7
- KNN fn, tp: 160, 100
- KNN f1 score: 0.545
- KNN cohens kappa score: 0.543
- ------ 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:11<01:44, 11.62s/it]
20%|██ | 2/10 [00:22<01:29, 11.23s/it]
30%|███ | 3/10 [00:35<01:23, 11.89s/it]
40%|████ | 4/10 [00:46<01:09, 11.55s/it]
50%|█████ | 5/10 [00:58<00:59, 11.96s/it]
60%|██████ | 6/10 [01:10<00:46, 11.71s/it]
70%|███████ | 7/10 [01:23<00:36, 12.13s/it]
80%|████████ | 8/10 [01:35<00:24, 12.11s/it]
90%|█████████ | 9/10 [01:46<00:11, 11.81s/it]
100%|██████████| 10/10 [01:57<00:00, 11.53s/it]
100%|██████████| 10/10 [01:57<00:00, 11.73s/it]
- -> create 114524 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28880, 11
- LR fn, tp: 84, 172
- LR f1 score: 0.784
- LR cohens kappa score: 0.782
- LR average precision score: 0.827
- -> test with 'GB'
- GB tn, fp: 28865, 26
- GB fn, tp: 74, 182
- GB f1 score: 0.784
- GB cohens kappa score: 0.783
- -> test with 'KNN'
- KNN tn, fp: 28886, 5
- KNN fn, tp: 173, 83
- KNN f1 score: 0.483
- KNN cohens kappa score: 0.480
- ====== 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:15<02:23, 15.89s/it]
20%|██ | 2/10 [00:28<01:50, 13.77s/it]
30%|███ | 3/10 [00:41<01:33, 13.39s/it]
40%|████ | 4/10 [00:56<01:24, 14.05s/it]
50%|█████ | 5/10 [01:07<01:05, 13.19s/it]
60%|██████ | 6/10 [01:20<00:52, 13.15s/it]
70%|███████ | 7/10 [01:32<00:37, 12.65s/it]
80%|████████ | 8/10 [01:45<00:25, 12.85s/it]
90%|█████████ | 9/10 [01:58<00:12, 12.80s/it]
100%|██████████| 10/10 [02:11<00:00, 12.82s/it]
100%|██████████| 10/10 [02:11<00:00, 13.14s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28881, 10
- LR fn, tp: 75, 185
- LR f1 score: 0.813
- LR cohens kappa score: 0.812
- LR average precision score: 0.874
- -> test with 'GB'
- GB tn, fp: 28868, 23
- GB fn, tp: 74, 186
- GB f1 score: 0.793
- GB cohens kappa score: 0.792
- -> test with 'KNN'
- KNN tn, fp: 28882, 9
- KNN fn, tp: 163, 97
- KNN f1 score: 0.530
- KNN cohens kappa score: 0.528
- ------ 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:13<01:58, 13.22s/it]
20%|██ | 2/10 [00:25<01:41, 12.72s/it]
30%|███ | 3/10 [00:37<01:26, 12.29s/it]
40%|████ | 4/10 [00:49<01:14, 12.33s/it]
50%|█████ | 5/10 [01:01<01:00, 12.10s/it]
60%|██████ | 6/10 [01:13<00:48, 12.09s/it]
70%|███████ | 7/10 [01:25<00:36, 12.18s/it]
80%|████████ | 8/10 [01:38<00:24, 12.23s/it]
90%|█████████ | 9/10 [01:51<00:12, 12.41s/it]
100%|██████████| 10/10 [02:02<00:00, 12.15s/it]
100%|██████████| 10/10 [02:02<00:00, 12.26s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28876, 15
- LR fn, tp: 59, 201
- LR f1 score: 0.845
- LR cohens kappa score: 0.843
- LR average precision score: 0.892
- -> test with 'GB'
- GB tn, fp: 28868, 23
- GB fn, tp: 61, 199
- GB f1 score: 0.826
- GB cohens kappa score: 0.824
- -> test with 'KNN'
- KNN tn, fp: 28890, 1
- KNN fn, tp: 162, 98
- KNN f1 score: 0.546
- KNN cohens kappa score: 0.544
- ------ 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:12<01:52, 12.49s/it]
20%|██ | 2/10 [00:24<01:37, 12.24s/it]
30%|███ | 3/10 [00:36<01:25, 12.28s/it]
40%|████ | 4/10 [00:48<01:12, 12.09s/it]
50%|█████ | 5/10 [01:00<00:59, 11.98s/it]
60%|██████ | 6/10 [01:12<00:47, 11.99s/it]
70%|███████ | 7/10 [01:24<00:35, 11.94s/it]
80%|████████ | 8/10 [01:35<00:23, 11.73s/it]
90%|█████████ | 9/10 [01:47<00:11, 11.73s/it]
100%|██████████| 10/10 [01:59<00:00, 11.97s/it]
100%|██████████| 10/10 [01:59<00:00, 11.98s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28872, 19
- LR fn, tp: 63, 197
- LR f1 score: 0.828
- LR cohens kappa score: 0.826
- LR average precision score: 0.844
- -> test with 'GB'
- GB tn, fp: 28862, 29
- GB fn, tp: 67, 193
- GB f1 score: 0.801
- GB cohens kappa score: 0.799
- -> test with 'KNN'
- KNN tn, fp: 28882, 9
- KNN fn, tp: 152, 108
- KNN f1 score: 0.573
- KNN cohens kappa score: 0.571
- ------ 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:11<01:45, 11.75s/it]
20%|██ | 2/10 [00:23<01:35, 11.92s/it]
30%|███ | 3/10 [00:35<01:23, 11.92s/it]
40%|████ | 4/10 [00:47<01:11, 11.99s/it]
50%|█████ | 5/10 [00:59<00:59, 11.89s/it]
60%|██████ | 6/10 [01:10<00:46, 11.72s/it]
70%|███████ | 7/10 [01:22<00:35, 11.81s/it]
80%|████████ | 8/10 [01:35<00:23, 11.94s/it]
90%|█████████ | 9/10 [01:46<00:11, 11.90s/it]
100%|██████████| 10/10 [01:59<00:00, 12.26s/it]
100%|██████████| 10/10 [01:59<00:00, 12.00s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28867, 24
- LR fn, tp: 65, 195
- LR f1 score: 0.814
- LR cohens kappa score: 0.813
- LR average precision score: 0.860
- -> test with 'GB'
- GB tn, fp: 28861, 30
- GB fn, tp: 67, 193
- GB f1 score: 0.799
- GB cohens kappa score: 0.798
- -> test with 'KNN'
- KNN tn, fp: 28883, 8
- KNN fn, tp: 155, 105
- KNN f1 score: 0.563
- KNN cohens kappa score: 0.561
- ------ 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:11<01:44, 11.63s/it]
20%|██ | 2/10 [00:24<01:39, 12.38s/it]
30%|███ | 3/10 [00:37<01:28, 12.67s/it]
40%|████ | 4/10 [00:49<01:14, 12.34s/it]
50%|█████ | 5/10 [01:02<01:02, 12.47s/it]
60%|██████ | 6/10 [01:14<00:49, 12.42s/it]
70%|███████ | 7/10 [01:27<00:38, 12.69s/it]
80%|████████ | 8/10 [01:39<00:24, 12.47s/it]
90%|█████████ | 9/10 [01:50<00:11, 11.96s/it]
100%|██████████| 10/10 [02:02<00:00, 12.03s/it]
100%|██████████| 10/10 [02:02<00:00, 12.27s/it]
- -> create 114524 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28876, 15
- LR fn, tp: 67, 189
- LR f1 score: 0.822
- LR cohens kappa score: 0.820
- LR average precision score: 0.854
- -> test with 'GB'
- GB tn, fp: 28860, 31
- GB fn, tp: 74, 182
- GB f1 score: 0.776
- GB cohens kappa score: 0.774
- -> test with 'KNN'
- KNN tn, fp: 28884, 7
- KNN fn, tp: 166, 90
- KNN f1 score: 0.510
- KNN cohens kappa score: 0.508
- ====== 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:11<01:40, 11.20s/it]
20%|██ | 2/10 [00:23<01:36, 12.04s/it]
30%|███ | 3/10 [00:36<01:25, 12.15s/it]
40%|████ | 4/10 [00:46<01:09, 11.60s/it]
50%|█████ | 5/10 [00:58<00:58, 11.66s/it]
60%|██████ | 6/10 [01:11<00:47, 11.92s/it]
70%|███████ | 7/10 [01:23<00:36, 12.12s/it]
80%|████████ | 8/10 [01:35<00:23, 11.90s/it]
90%|█████████ | 9/10 [01:46<00:11, 11.85s/it]
100%|██████████| 10/10 [01:58<00:00, 11.78s/it]
100%|██████████| 10/10 [01:58<00:00, 11.84s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28875, 16
- LR fn, tp: 59, 201
- LR f1 score: 0.843
- LR cohens kappa score: 0.841
- LR average precision score: 0.875
- -> test with 'GB'
- GB tn, fp: 28869, 22
- GB fn, tp: 66, 194
- GB f1 score: 0.815
- GB cohens kappa score: 0.814
- -> test with 'KNN'
- KNN tn, fp: 28886, 5
- KNN fn, tp: 168, 92
- KNN f1 score: 0.515
- KNN cohens kappa score: 0.513
- ------ 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:12<01:51, 12.37s/it]
20%|██ | 2/10 [00:24<01:37, 12.14s/it]
30%|███ | 3/10 [00:36<01:24, 12.07s/it]
40%|████ | 4/10 [00:48<01:12, 12.13s/it]
50%|█████ | 5/10 [01:00<00:59, 11.99s/it]
60%|██████ | 6/10 [01:12<00:48, 12.06s/it]
70%|███████ | 7/10 [01:24<00:36, 12.15s/it]
80%|████████ | 8/10 [01:37<00:24, 12.24s/it]
90%|█████████ | 9/10 [01:50<00:12, 12.47s/it]
100%|██████████| 10/10 [02:02<00:00, 12.35s/it]
100%|██████████| 10/10 [02:02<00:00, 12.23s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28874, 17
- LR fn, tp: 67, 193
- LR f1 score: 0.821
- LR cohens kappa score: 0.820
- LR average precision score: 0.858
- -> test with 'GB'
- GB tn, fp: 28874, 17
- GB fn, tp: 70, 190
- GB f1 score: 0.814
- GB cohens kappa score: 0.812
- -> test with 'KNN'
- KNN tn, fp: 28886, 5
- KNN fn, tp: 172, 88
- KNN f1 score: 0.499
- KNN cohens kappa score: 0.496
- ------ 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:12<01:51, 12.37s/it]
20%|██ | 2/10 [00:24<01:39, 12.44s/it]
30%|███ | 3/10 [00:37<01:26, 12.42s/it]
40%|████ | 4/10 [00:48<01:12, 12.11s/it]
50%|█████ | 5/10 [01:01<01:00, 12.14s/it]
60%|██████ | 6/10 [01:13<00:49, 12.37s/it]
70%|███████ | 7/10 [01:27<00:37, 12.66s/it]
80%|████████ | 8/10 [01:41<00:26, 13.17s/it]
90%|█████████ | 9/10 [01:54<00:13, 13.05s/it]
100%|██████████| 10/10 [02:07<00:00, 13.15s/it]
100%|██████████| 10/10 [02:07<00:00, 12.76s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28868, 23
- LR fn, tp: 72, 188
- LR f1 score: 0.798
- LR cohens kappa score: 0.797
- LR average precision score: 0.838
- -> test with 'GB'
- GB tn, fp: 28865, 26
- GB fn, tp: 70, 190
- GB f1 score: 0.798
- GB cohens kappa score: 0.797
- -> test with 'KNN'
- KNN tn, fp: 28878, 13
- KNN fn, tp: 158, 102
- KNN f1 score: 0.544
- KNN cohens kappa score: 0.541
- ------ 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:12<01:48, 12.04s/it]
20%|██ | 2/10 [00:24<01:39, 12.44s/it]
30%|███ | 3/10 [00:36<01:23, 11.93s/it]
40%|████ | 4/10 [00:47<01:11, 11.89s/it]
50%|█████ | 5/10 [00:59<00:58, 11.60s/it]
60%|██████ | 6/10 [01:10<00:46, 11.73s/it]
70%|███████ | 7/10 [01:23<00:35, 11.84s/it]
80%|████████ | 8/10 [01:34<00:23, 11.78s/it]
90%|█████████ | 9/10 [01:46<00:11, 11.63s/it]
100%|██████████| 10/10 [01:56<00:00, 11.35s/it]
100%|██████████| 10/10 [01:56<00:00, 11.67s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28873, 18
- LR fn, tp: 73, 187
- LR f1 score: 0.804
- LR cohens kappa score: 0.803
- LR average precision score: 0.857
- -> test with 'GB'
- GB tn, fp: 28864, 27
- GB fn, tp: 68, 192
- GB f1 score: 0.802
- GB cohens kappa score: 0.800
- -> test with 'KNN'
- KNN tn, fp: 28886, 5
- KNN fn, tp: 165, 95
- KNN f1 score: 0.528
- KNN cohens kappa score: 0.525
- ------ 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:12<01:54, 12.74s/it]
20%|██ | 2/10 [00:25<01:43, 12.99s/it]
30%|███ | 3/10 [00:41<01:40, 14.36s/it]
40%|████ | 4/10 [00:54<01:23, 13.85s/it]
50%|█████ | 5/10 [01:07<01:07, 13.50s/it]
60%|██████ | 6/10 [01:20<00:52, 13.08s/it]
70%|███████ | 7/10 [01:32<00:38, 12.92s/it]
80%|████████ | 8/10 [01:44<00:25, 12.68s/it]
90%|█████████ | 9/10 [01:56<00:12, 12.39s/it]
100%|██████████| 10/10 [02:09<00:00, 12.46s/it]
100%|██████████| 10/10 [02:09<00:00, 12.93s/it]
- -> create 114524 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28880, 11
- LR fn, tp: 62, 194
- LR f1 score: 0.842
- LR cohens kappa score: 0.840
- LR average precision score: 0.882
- -> test with 'GB'
- GB tn, fp: 28872, 19
- GB fn, tp: 62, 194
- GB f1 score: 0.827
- GB cohens kappa score: 0.826
- -> test with 'KNN'
- KNN tn, fp: 28880, 11
- KNN fn, tp: 146, 110
- KNN f1 score: 0.584
- KNN cohens kappa score: 0.581
- ====== 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:10<01:38, 10.94s/it]
20%|██ | 2/10 [00:22<01:30, 11.37s/it]
30%|███ | 3/10 [00:34<01:21, 11.60s/it]
40%|████ | 4/10 [00:46<01:11, 11.89s/it]
50%|█████ | 5/10 [00:59<01:00, 12.04s/it]
60%|██████ | 6/10 [01:12<00:49, 12.50s/it]
70%|███████ | 7/10 [01:25<00:37, 12.57s/it]
80%|████████ | 8/10 [01:36<00:24, 12.18s/it]
90%|█████████ | 9/10 [01:47<00:11, 11.66s/it]
100%|██████████| 10/10 [01:58<00:00, 11.73s/it]
100%|██████████| 10/10 [01:58<00:00, 11.90s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28875, 16
- LR fn, tp: 62, 198
- LR f1 score: 0.835
- LR cohens kappa score: 0.834
- LR average precision score: 0.884
- -> test with 'GB'
- GB tn, fp: 28859, 32
- GB fn, tp: 61, 199
- GB f1 score: 0.811
- GB cohens kappa score: 0.809
- -> test with 'KNN'
- KNN tn, fp: 28888, 3
- KNN fn, tp: 160, 100
- KNN f1 score: 0.551
- KNN cohens kappa score: 0.549
- ------ 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:11<01:44, 11.66s/it]
20%|██ | 2/10 [00:22<01:29, 11.13s/it]
30%|███ | 3/10 [00:35<01:23, 11.92s/it]
40%|████ | 4/10 [00:46<01:10, 11.67s/it]
50%|█████ | 5/10 [00:57<00:57, 11.46s/it]
60%|██████ | 6/10 [01:09<00:46, 11.69s/it]
70%|███████ | 7/10 [01:21<00:34, 11.67s/it]
80%|████████ | 8/10 [01:33<00:23, 11.66s/it]
90%|█████████ | 9/10 [01:45<00:11, 11.78s/it]
100%|██████████| 10/10 [01:56<00:00, 11.63s/it]
100%|██████████| 10/10 [01:56<00:00, 11.64s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28870, 21
- LR fn, tp: 75, 185
- LR f1 score: 0.794
- LR cohens kappa score: 0.792
- LR average precision score: 0.841
- -> test with 'GB'
- GB tn, fp: 28856, 35
- GB fn, tp: 72, 188
- GB f1 score: 0.778
- GB cohens kappa score: 0.777
- -> test with 'KNN'
- KNN tn, fp: 28880, 11
- KNN fn, tp: 162, 98
- KNN f1 score: 0.531
- KNN cohens kappa score: 0.529
- ------ 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:11<01:47, 11.95s/it]
20%|██ | 2/10 [00:24<01:36, 12.09s/it]
30%|███ | 3/10 [00:35<01:23, 11.95s/it]
40%|████ | 4/10 [00:47<01:11, 11.92s/it]
50%|█████ | 5/10 [00:59<00:59, 11.85s/it]
60%|██████ | 6/10 [01:11<00:47, 11.91s/it]
70%|███████ | 7/10 [01:23<00:35, 11.98s/it]
80%|████████ | 8/10 [01:35<00:23, 11.81s/it]
90%|█████████ | 9/10 [01:47<00:11, 11.93s/it]
100%|██████████| 10/10 [01:58<00:00, 11.70s/it]
100%|██████████| 10/10 [01:58<00:00, 11.85s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28876, 15
- LR fn, tp: 60, 200
- LR f1 score: 0.842
- LR cohens kappa score: 0.841
- LR average precision score: 0.855
- -> test with 'GB'
- GB tn, fp: 28866, 25
- GB fn, tp: 61, 199
- GB f1 score: 0.822
- GB cohens kappa score: 0.821
- -> test with 'KNN'
- KNN tn, fp: 28883, 8
- KNN fn, tp: 168, 92
- KNN f1 score: 0.511
- KNN cohens kappa score: 0.509
- ------ 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:16<02:26, 16.24s/it]
20%|██ | 2/10 [00:28<01:49, 13.69s/it]
30%|███ | 3/10 [00:40<01:30, 12.89s/it]
40%|████ | 4/10 [00:52<01:15, 12.61s/it]
50%|█████ | 5/10 [01:04<01:02, 12.46s/it]
60%|██████ | 6/10 [01:16<00:49, 12.41s/it]
70%|███████ | 7/10 [01:28<00:36, 12.31s/it]
80%|████████ | 8/10 [01:41<00:24, 12.30s/it]
90%|█████████ | 9/10 [01:53<00:12, 12.41s/it]
100%|██████████| 10/10 [02:04<00:00, 12.03s/it]
100%|██████████| 10/10 [02:04<00:00, 12.50s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28875, 16
- LR fn, tp: 67, 193
- LR f1 score: 0.823
- LR cohens kappa score: 0.822
- LR average precision score: 0.877
- -> test with 'GB'
- GB tn, fp: 28868, 23
- GB fn, tp: 75, 185
- GB f1 score: 0.791
- GB cohens kappa score: 0.789
- -> test with 'KNN'
- KNN tn, fp: 28886, 5
- KNN fn, tp: 159, 101
- KNN f1 score: 0.552
- KNN cohens kappa score: 0.550
- ------ Step 4/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
0%| | 0/10 [00:00<?, ?it/s]
10%|█ | 1/10 [07:09<1:04:22, 429.14s/it]
20%|██ | 2/10 [10:09<37:41, 282.65s/it]
30%|███ | 3/10 [10:20<18:30, 158.60s/it]
40%|████ | 4/10 [10:31<10:03, 100.51s/it]
50%|█████ | 5/10 [10:43<05:43, 68.67s/it]
60%|██████ | 6/10 [10:55<03:16, 49.16s/it]
70%|███████ | 7/10 [11:06<01:50, 36.88s/it]
80%|████████ | 8/10 [11:18<00:57, 28.94s/it]
90%|█████████ | 9/10 [11:29<00:23, 23.42s/it]
100%|██████████| 10/10 [11:42<00:00, 19.95s/it]
100%|██████████| 10/10 [11:42<00:00, 70.22s/it]
- -> create 114524 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28875, 16
- LR fn, tp: 67, 189
- LR f1 score: 0.820
- LR cohens kappa score: 0.819
- LR average precision score: 0.854
- -> test with 'GB'
- GB tn, fp: 28861, 30
- GB fn, tp: 68, 188
- GB f1 score: 0.793
- GB cohens kappa score: 0.792
- -> test with 'KNN'
- KNN tn, fp: 28882, 9
- KNN fn, tp: 156, 100
- KNN f1 score: 0.548
- KNN cohens kappa score: 0.546
- ====== 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:13<01:59, 13.24s/it]
20%|██ | 2/10 [00:26<01:44, 13.06s/it]
30%|███ | 3/10 [00:38<01:28, 12.58s/it]
40%|████ | 4/10 [00:50<01:15, 12.57s/it]
50%|█████ | 5/10 [01:02<01:01, 12.38s/it]
60%|██████ | 6/10 [01:15<00:49, 12.45s/it]
70%|███████ | 7/10 [01:26<00:36, 12.11s/it]
80%|████████ | 8/10 [01:38<00:24, 12.08s/it]
90%|█████████ | 9/10 [01:50<00:12, 12.11s/it]
100%|██████████| 10/10 [02:02<00:00, 12.03s/it]
100%|██████████| 10/10 [02:02<00:00, 12.28s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28868, 23
- LR fn, tp: 61, 199
- LR f1 score: 0.826
- LR cohens kappa score: 0.824
- LR average precision score: 0.867
- -> test with 'GB'
- GB tn, fp: 28864, 27
- GB fn, tp: 62, 198
- GB f1 score: 0.816
- GB cohens kappa score: 0.815
- -> test with 'KNN'
- KNN tn, fp: 28883, 8
- KNN fn, tp: 164, 96
- KNN f1 score: 0.527
- KNN cohens kappa score: 0.525
- ------ Step 5/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
0%| | 0/10 [00:00<?, ?it/s]
10%|█ | 1/10 [05:15<47:16, 315.15s/it]
20%|██ | 2/10 [05:29<18:26, 138.27s/it]
30%|███ | 3/10 [05:43<09:28, 81.28s/it]
40%|████ | 4/10 [05:56<05:26, 54.45s/it]
50%|█████ | 5/10 [06:09<03:17, 39.54s/it]
60%|██████ | 6/10 [06:22<02:02, 30.55s/it]
70%|███████ | 7/10 [06:34<01:13, 24.57s/it]
80%|████████ | 8/10 [06:48<00:42, 21.18s/it]
90%|█████████ | 9/10 [07:02<00:18, 18.71s/it]
100%|██████████| 10/10 [07:14<00:00, 16.81s/it]
100%|██████████| 10/10 [07:14<00:00, 43.46s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28880, 11
- LR fn, tp: 66, 194
- LR f1 score: 0.834
- LR cohens kappa score: 0.833
- LR average precision score: 0.866
- -> test with 'GB'
- GB tn, fp: 28861, 30
- GB fn, tp: 71, 189
- GB f1 score: 0.789
- GB cohens kappa score: 0.787
- -> test with 'KNN'
- KNN tn, fp: 28888, 3
- KNN fn, tp: 160, 100
- KNN f1 score: 0.551
- KNN cohens kappa score: 0.549
- ------ 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:12<01:55, 12.82s/it]
20%|██ | 2/10 [00:27<01:49, 13.74s/it]
30%|███ | 3/10 [00:39<01:30, 12.96s/it]
40%|████ | 4/10 [00:51<01:15, 12.58s/it]
50%|█████ | 5/10 [01:03<01:02, 12.48s/it]
60%|██████ | 6/10 [01:16<00:51, 12.80s/it]
70%|███████ | 7/10 [01:29<00:38, 12.76s/it]
80%|████████ | 8/10 [01:41<00:24, 12.49s/it]
90%|█████████ | 9/10 [01:53<00:12, 12.23s/it]
100%|██████████| 10/10 [02:05<00:00, 12.33s/it]
100%|██████████| 10/10 [02:05<00:00, 12.57s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28874, 17
- LR fn, tp: 74, 186
- LR f1 score: 0.803
- LR cohens kappa score: 0.802
- LR average precision score: 0.860
- -> test with 'GB'
- GB tn, fp: 28871, 20
- GB fn, tp: 76, 184
- GB f1 score: 0.793
- GB cohens kappa score: 0.791
- -> test with 'KNN'
- KNN tn, fp: 28883, 8
- KNN fn, tp: 165, 95
- KNN f1 score: 0.523
- KNN cohens kappa score: 0.521
- ------ 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:12<01:49, 12.17s/it]
20%|██ | 2/10 [00:24<01:38, 12.28s/it]
30%|███ | 3/10 [00:37<01:29, 12.77s/it]
40%|████ | 4/10 [00:50<01:17, 12.86s/it]
50%|█████ | 5/10 [01:03<01:03, 12.72s/it]
60%|██████ | 6/10 [01:15<00:50, 12.62s/it]
70%|███████ | 7/10 [01:30<00:39, 13.30s/it]
80%|████████ | 8/10 [01:42<00:26, 13.00s/it]
90%|█████████ | 9/10 [01:56<00:13, 13.06s/it]
100%|██████████| 10/10 [02:08<00:00, 12.98s/it]
100%|██████████| 10/10 [02:08<00:00, 12.88s/it]
- -> create 114528 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28877, 14
- LR fn, tp: 65, 195
- LR f1 score: 0.832
- LR cohens kappa score: 0.830
- LR average precision score: 0.857
- -> test with 'GB'
- GB tn, fp: 28863, 28
- GB fn, tp: 67, 193
- GB f1 score: 0.802
- GB cohens kappa score: 0.801
- -> test with 'KNN'
- KNN tn, fp: 28884, 7
- KNN fn, tp: 165, 95
- KNN f1 score: 0.525
- KNN cohens kappa score: 0.522
- ------ 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:12<01:52, 12.52s/it]
20%|██ | 2/10 [00:25<01:42, 12.86s/it]
30%|███ | 3/10 [00:38<01:29, 12.81s/it]
40%|████ | 4/10 [00:51<01:16, 12.83s/it]
50%|█████ | 5/10 [01:03<01:02, 12.53s/it]
60%|██████ | 6/10 [01:15<00:50, 12.58s/it]
70%|███████ | 7/10 [01:28<00:37, 12.51s/it]
80%|████████ | 8/10 [01:40<00:24, 12.41s/it]
90%|█████████ | 9/10 [01:53<00:12, 12.58s/it]
100%|██████████| 10/10 [02:05<00:00, 12.42s/it]
100%|██████████| 10/10 [02:05<00:00, 12.55s/it]
- -> create 114524 synthetic samples
- -> test with 'LR'
- LR tn, fp: 28872, 19
- LR fn, tp: 63, 193
- LR f1 score: 0.825
- LR cohens kappa score: 0.823
- LR average precision score: 0.861
- -> test with 'GB'
- GB tn, fp: 28866, 25
- GB fn, tp: 66, 190
- GB f1 score: 0.807
- GB cohens kappa score: 0.805
- -> test with 'KNN'
- KNN tn, fp: 28880, 11
- KNN fn, tp: 147, 109
- KNN f1 score: 0.580
- KNN cohens kappa score: 0.577
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 28881, 24
- LR fn, tp: 84, 203
- LR f1 score: 0.855
- LR cohens kappa score: 0.854
- LR average precision score: 0.892
- average:
- LR tn, fp: 28874.28, 16.72
- LR fn, tp: 66.12, 193.08
- LR f1 score: 0.823
- LR cohens kappa score: 0.822
- LR average precision score: 0.862
- minimum:
- LR tn, fp: 28867, 10
- LR fn, tp: 57, 172
- LR f1 score: 0.784
- LR cohens kappa score: 0.782
- LR average precision score: 0.827
- -----[ GB ]-----
- maximum:
- GB tn, fp: 28876, 35
- GB fn, tp: 76, 202
- GB f1 score: 0.842
- GB cohens kappa score: 0.841
- average:
- GB tn, fp: 28865.52, 25.48
- GB fn, tp: 67.72, 191.48
- GB f1 score: 0.804
- GB cohens kappa score: 0.803
- minimum:
- GB tn, fp: 28856, 15
- GB fn, tp: 58, 182
- GB f1 score: 0.776
- GB cohens kappa score: 0.774
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 28890, 17
- KNN fn, tp: 173, 116
- KNN f1 score: 0.590
- KNN cohens kappa score: 0.588
- average:
- KNN tn, fp: 28883.28, 7.72
- KNN fn, tp: 160.84, 98.36
- KNN f1 score: 0.538
- KNN cohens kappa score: 0.536
- minimum:
- KNN tn, fp: 28874, 1
- KNN fn, tp: 144, 83
- KNN f1 score: 0.483
- KNN cohens kappa score: 0.480
|