| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899 |
- ///////////////////////////////////////////
- // 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.13s/it]
20%|██ | 2/10 [00:04<00:16, 2.08s/it]
30%|███ | 3/10 [00:06<00:14, 2.07s/it]
40%|████ | 4/10 [00:08<00:12, 2.09s/it]
50%|█████ | 5/10 [00:10<00:10, 2.09s/it]
60%|██████ | 6/10 [00:12<00:08, 2.08s/it]
70%|███████ | 7/10 [00:14<00:06, 2.05s/it]
80%|████████ | 8/10 [00:16<00:04, 2.08s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.08s/it]
100%|██████████| 10/10 [00:20<00:00, 2.07s/it]
100%|██████████| 10/10 [00:20<00:00, 2.08s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 559, 44
- LR fn, tp: 19, 12
- LR f1 score: 0.276
- LR cohens kappa score: 0.227
- LR average precision score: 0.207
- -> test with 'RF'
- RF tn, fp: 599, 4
- RF fn, tp: 9, 22
- RF f1 score: 0.772
- RF cohens kappa score: 0.761
- -> 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: 587, 16
- KNN fn, tp: 10, 21
- KNN f1 score: 0.618
- KNN cohens kappa score: 0.596
- ------ 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.01s/it]
20%|██ | 2/10 [00:04<00:16, 2.07s/it]
30%|███ | 3/10 [00:06<00:14, 2.08s/it]
40%|████ | 4/10 [00:08<00:12, 2.07s/it]
50%|█████ | 5/10 [00:10<00:10, 2.10s/it]
60%|██████ | 6/10 [00:12<00:08, 2.11s/it]
70%|███████ | 7/10 [00:14<00:06, 2.09s/it]
80%|████████ | 8/10 [00:16<00:04, 2.04s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.04s/it]
100%|██████████| 10/10 [00:20<00:00, 2.06s/it]
100%|██████████| 10/10 [00:20<00:00, 2.07s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 564, 39
- LR fn, tp: 23, 8
- LR f1 score: 0.205
- LR cohens kappa score: 0.155
- LR average precision score: 0.181
- -> test with 'RF'
- RF tn, fp: 595, 8
- RF fn, tp: 10, 21
- RF f1 score: 0.700
- RF cohens kappa score: 0.685
- -> 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: 580, 23
- KNN fn, tp: 6, 25
- KNN f1 score: 0.633
- KNN cohens kappa score: 0.610
- ------ 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:19, 2.19s/it]
20%|██ | 2/10 [00:04<00:17, 2.19s/it]
30%|███ | 3/10 [00:06<00:15, 2.22s/it]
40%|████ | 4/10 [00:08<00:13, 2.17s/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.15s/it]
80%|████████ | 8/10 [00:17<00:04, 2.13s/it]
90%|█████████ | 9/10 [00:19<00:02, 2.13s/it]
100%|██████████| 10/10 [00:21<00:00, 2.14s/it]
100%|██████████| 10/10 [00:21<00:00, 2.15s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 528, 75
- LR fn, tp: 19, 12
- LR f1 score: 0.203
- LR cohens kappa score: 0.141
- LR average precision score: 0.136
- -> test with 'RF'
- RF tn, fp: 600, 3
- RF fn, tp: 5, 26
- RF f1 score: 0.867
- RF cohens kappa score: 0.860
- -> test with 'GB'
- GB tn, fp: 598, 5
- GB fn, tp: 6, 25
- GB f1 score: 0.820
- GB cohens kappa score: 0.811
- -> test with 'KNN'
- KNN tn, fp: 591, 12
- KNN fn, tp: 15, 16
- KNN f1 score: 0.542
- KNN cohens kappa score: 0.520
- ------ 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.21s/it]
20%|██ | 2/10 [00:04<00:17, 2.18s/it]
30%|███ | 3/10 [00:06<00:15, 2.18s/it]
40%|████ | 4/10 [00:08<00:12, 2.16s/it]
50%|█████ | 5/10 [00:10<00:11, 2.21s/it]
60%|██████ | 6/10 [00:13<00:08, 2.22s/it]
70%|███████ | 7/10 [00:15<00:06, 2.23s/it]
80%|████████ | 8/10 [00:17<00:04, 2.26s/it]
90%|█████████ | 9/10 [00:19<00:02, 2.24s/it]
100%|██████████| 10/10 [00:22<00:00, 2.25s/it]
100%|██████████| 10/10 [00:22<00:00, 2.23s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 558, 45
- LR fn, tp: 22, 9
- LR f1 score: 0.212
- LR cohens kappa score: 0.160
- LR average precision score: 0.143
- -> test with 'RF'
- RF tn, fp: 603, 0
- RF fn, tp: 13, 18
- RF f1 score: 0.735
- RF cohens kappa score: 0.725
- -> test with 'GB'
- GB tn, fp: 600, 3
- GB fn, tp: 12, 19
- GB f1 score: 0.717
- GB cohens kappa score: 0.705
- -> 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 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.26s/it]
20%|██ | 2/10 [00:04<00:17, 2.21s/it]
30%|███ | 3/10 [00:06<00:15, 2.23s/it]
40%|████ | 4/10 [00:09<00:13, 2.27s/it]
50%|█████ | 5/10 [00:11<00:10, 2.20s/it]
60%|██████ | 6/10 [00:13<00:08, 2.14s/it]
70%|███████ | 7/10 [00:15<00:06, 2.10s/it]
80%|████████ | 8/10 [00:17<00:04, 2.06s/it]
90%|█████████ | 9/10 [00:19<00:02, 2.05s/it]
100%|██████████| 10/10 [00:21<00:00, 2.01s/it]
100%|██████████| 10/10 [00:21<00:00, 2.11s/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.208
- -> test with 'RF'
- RF tn, fp: 597, 3
- RF fn, tp: 8, 19
- RF f1 score: 0.776
- RF cohens kappa score: 0.766
- -> test with 'GB'
- GB tn, fp: 596, 4
- GB fn, tp: 4, 23
- GB f1 score: 0.852
- GB cohens kappa score: 0.845
- -> test with 'KNN'
- KNN tn, fp: 582, 18
- KNN fn, tp: 10, 17
- KNN f1 score: 0.548
- KNN cohens kappa score: 0.525
- ====== 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:01<00:16, 1.84s/it]
20%|██ | 2/10 [00:03<00:15, 1.91s/it]
30%|███ | 3/10 [00:05<00:13, 1.95s/it]
40%|████ | 4/10 [00:07<00:11, 1.93s/it]
50%|█████ | 5/10 [00:09<00:09, 1.93s/it]
60%|██████ | 6/10 [00:11<00:07, 1.91s/it]
70%|███████ | 7/10 [00:13<00:05, 1.94s/it]
80%|████████ | 8/10 [00:15<00:03, 1.94s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.93s/it]
100%|██████████| 10/10 [00:19<00:00, 1.94s/it]
100%|██████████| 10/10 [00:19<00:00, 1.93s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 559, 44
- LR fn, tp: 23, 8
- LR f1 score: 0.193
- LR cohens kappa score: 0.140
- LR average precision score: 0.121
- -> test with 'RF'
- RF tn, fp: 597, 6
- RF fn, tp: 11, 20
- RF f1 score: 0.702
- RF cohens kappa score: 0.688
- -> test with 'GB'
- GB tn, fp: 596, 7
- GB fn, tp: 10, 21
- GB f1 score: 0.712
- GB cohens kappa score: 0.698
- -> test with 'KNN'
- KNN tn, fp: 589, 14
- KNN fn, tp: 15, 16
- KNN f1 score: 0.525
- KNN cohens kappa score: 0.501
- ------ 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.90s/it]
30%|███ | 3/10 [00:05<00:12, 1.86s/it]
40%|████ | 4/10 [00:07<00:11, 1.87s/it]
50%|█████ | 5/10 [00:09<00:09, 1.84s/it]
60%|██████ | 6/10 [00:11<00:07, 1.87s/it]
70%|███████ | 7/10 [00:13<00:05, 1.91s/it]
80%|████████ | 8/10 [00:15<00:03, 1.88s/it]
90%|█████████ | 9/10 [00:16<00:01, 1.88s/it]
100%|██████████| 10/10 [00:18<00:00, 1.88s/it]
100%|██████████| 10/10 [00:18<00:00, 1.88s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 570, 33
- LR fn, tp: 22, 9
- LR f1 score: 0.247
- LR cohens kappa score: 0.202
- LR average precision score: 0.185
- -> test with 'RF'
- RF tn, fp: 596, 7
- RF fn, tp: 7, 24
- RF f1 score: 0.774
- RF cohens kappa score: 0.763
- -> test with 'GB'
- GB tn, fp: 597, 6
- GB fn, tp: 4, 27
- GB f1 score: 0.844
- GB cohens kappa score: 0.835
- -> test with 'KNN'
- KNN tn, fp: 589, 14
- KNN fn, tp: 8, 23
- KNN f1 score: 0.676
- KNN cohens kappa score: 0.658
- ------ 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:01<00:16, 1.80s/it]
20%|██ | 2/10 [00:03<00:14, 1.81s/it]
30%|███ | 3/10 [00:05<00:12, 1.85s/it]
40%|████ | 4/10 [00:07<00:11, 1.84s/it]
50%|█████ | 5/10 [00:09<00:09, 1.84s/it]
60%|██████ | 6/10 [00:11<00:07, 1.87s/it]
70%|███████ | 7/10 [00:13<00:05, 1.90s/it]
80%|████████ | 8/10 [00:14<00:03, 1.88s/it]
90%|█████████ | 9/10 [00:16<00:01, 1.92s/it]
100%|██████████| 10/10 [00:18<00:00, 1.94s/it]
100%|██████████| 10/10 [00:18<00:00, 1.89s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 561, 42
- LR fn, tp: 22, 9
- LR f1 score: 0.220
- LR cohens kappa score: 0.169
- LR average precision score: 0.169
- -> test with 'RF'
- RF tn, fp: 601, 2
- RF fn, tp: 11, 20
- RF f1 score: 0.755
- RF cohens kappa score: 0.744
- -> 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: 593, 10
- KNN fn, tp: 13, 18
- KNN f1 score: 0.610
- KNN cohens kappa score: 0.591
- ------ 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:16, 1.83s/it]
20%|██ | 2/10 [00:03<00:14, 1.87s/it]
30%|███ | 3/10 [00:05<00:13, 1.93s/it]
40%|████ | 4/10 [00:07<00:11, 1.92s/it]
50%|█████ | 5/10 [00:09<00:09, 1.89s/it]
60%|██████ | 6/10 [00:11<00:07, 1.93s/it]
70%|███████ | 7/10 [00:13<00:05, 1.95s/it]
80%|████████ | 8/10 [00:15<00:03, 1.91s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.88s/it]
100%|██████████| 10/10 [00:18<00:00, 1.86s/it]
100%|██████████| 10/10 [00:18<00:00, 1.89s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 553, 50
- LR fn, tp: 19, 12
- LR f1 score: 0.258
- LR cohens kappa score: 0.206
- LR average precision score: 0.237
- -> test with 'RF'
- RF tn, fp: 600, 3
- RF fn, tp: 6, 25
- RF f1 score: 0.847
- RF cohens kappa score: 0.840
- -> test with 'GB'
- GB tn, fp: 600, 3
- GB fn, tp: 8, 23
- GB f1 score: 0.807
- GB cohens kappa score: 0.798
- -> test with 'KNN'
- KNN tn, fp: 592, 11
- KNN fn, tp: 10, 21
- KNN f1 score: 0.667
- KNN cohens kappa score: 0.649
- ------ 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:01<00:16, 1.82s/it]
20%|██ | 2/10 [00:03<00:14, 1.83s/it]
30%|███ | 3/10 [00:05<00:12, 1.85s/it]
40%|████ | 4/10 [00:07<00:11, 1.84s/it]
50%|█████ | 5/10 [00:09<00:09, 1.90s/it]
60%|██████ | 6/10 [00:11<00:07, 1.89s/it]
70%|███████ | 7/10 [00:13<00:05, 1.87s/it]
80%|████████ | 8/10 [00:15<00:03, 1.90s/it]
90%|█████████ | 9/10 [00:16<00:01, 1.90s/it]
100%|██████████| 10/10 [00:18<00:00, 1.93s/it]
100%|██████████| 10/10 [00:18<00:00, 1.89s/it]
- -> create 2288 synthetic samples
- -> test with 'LR'
- LR tn, fp: 559, 41
- LR fn, tp: 24, 3
- LR f1 score: 0.085
- LR cohens kappa score: 0.033
- LR average precision score: 0.123
- -> test with 'RF'
- RF tn, fp: 598, 2
- RF fn, tp: 6, 21
- RF f1 score: 0.840
- RF cohens kappa score: 0.833
- -> test with 'GB'
- GB tn, fp: 597, 3
- GB fn, tp: 6, 21
- GB f1 score: 0.824
- GB cohens kappa score: 0.816
- -> 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 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:18, 2.01s/it]
20%|██ | 2/10 [00:04<00:16, 2.01s/it]
30%|███ | 3/10 [00:06<00:14, 2.01s/it]
40%|████ | 4/10 [00:08<00:12, 2.01s/it]
50%|█████ | 5/10 [00:09<00:09, 1.95s/it]
60%|██████ | 6/10 [00:11<00:07, 1.96s/it]
70%|███████ | 7/10 [00:13<00:05, 1.93s/it]
80%|████████ | 8/10 [00:15<00:03, 1.95s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.93s/it]
100%|██████████| 10/10 [00:19<00:00, 1.94s/it]
100%|██████████| 10/10 [00:19<00:00, 1.96s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 570, 33
- LR fn, tp: 21, 10
- LR f1 score: 0.270
- LR cohens kappa score: 0.226
- LR average precision score: 0.229
- -> test with 'RF'
- RF tn, fp: 602, 1
- RF fn, tp: 14, 17
- RF f1 score: 0.694
- RF cohens kappa score: 0.682
- -> 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: 598, 5
- KNN fn, tp: 15, 16
- KNN f1 score: 0.615
- KNN cohens kappa score: 0.600
- ------ 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:16, 1.86s/it]
20%|██ | 2/10 [00:03<00:14, 1.84s/it]
30%|███ | 3/10 [00:05<00:13, 1.86s/it]
40%|████ | 4/10 [00:07<00:11, 1.85s/it]
50%|█████ | 5/10 [00:09<00:09, 1.85s/it]
60%|██████ | 6/10 [00:11<00:07, 1.83s/it]
70%|███████ | 7/10 [00:13<00:05, 1.87s/it]
80%|████████ | 8/10 [00:14<00:03, 1.88s/it]
90%|█████████ | 9/10 [00:16<00:01, 1.88s/it]
100%|██████████| 10/10 [00:18<00:00, 1.92s/it]
100%|██████████| 10/10 [00:18<00:00, 1.88s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 594, 9
- LR fn, tp: 26, 5
- LR f1 score: 0.222
- LR cohens kappa score: 0.198
- LR average precision score: 0.269
- -> test with 'RF'
- RF tn, fp: 595, 8
- RF fn, tp: 5, 26
- RF f1 score: 0.800
- RF cohens kappa score: 0.789
- -> test with 'GB'
- GB tn, fp: 594, 9
- GB fn, tp: 4, 27
- GB f1 score: 0.806
- GB cohens kappa score: 0.795
- -> test with 'KNN'
- KNN tn, fp: 580, 23
- KNN fn, tp: 14, 17
- KNN f1 score: 0.479
- KNN cohens kappa score: 0.448
- ------ 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:18, 2.06s/it]
20%|██ | 2/10 [00:04<00:16, 2.07s/it]
30%|███ | 3/10 [00:06<00:14, 2.04s/it]
40%|████ | 4/10 [00:08<00:12, 2.04s/it]
50%|█████ | 5/10 [00:10<00:10, 2.05s/it]
60%|██████ | 6/10 [00:12<00:07, 1.99s/it]
70%|███████ | 7/10 [00:14<00:05, 1.98s/it]
80%|████████ | 8/10 [00:15<00:03, 1.95s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.97s/it]
100%|██████████| 10/10 [00:19<00:00, 1.94s/it]
100%|██████████| 10/10 [00:19<00:00, 1.98s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 570, 33
- LR fn, tp: 24, 7
- LR f1 score: 0.197
- LR cohens kappa score: 0.150
- LR average precision score: 0.173
- -> test with 'RF'
- RF tn, fp: 599, 4
- RF fn, tp: 8, 23
- RF f1 score: 0.793
- RF cohens kappa score: 0.783
- -> 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: 586, 17
- KNN fn, tp: 10, 21
- KNN f1 score: 0.609
- KNN cohens kappa score: 0.586
- ------ 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:05<00:51, 5.70s/it]
20%|██ | 2/10 [00:07<00:28, 3.53s/it]
30%|███ | 3/10 [00:09<00:19, 2.84s/it]
40%|████ | 4/10 [00:11<00:15, 2.51s/it]
50%|█████ | 5/10 [00:13<00:11, 2.35s/it]
60%|██████ | 6/10 [00:15<00:08, 2.24s/it]
70%|███████ | 7/10 [00:17<00:06, 2.17s/it]
80%|████████ | 8/10 [00:19<00:04, 2.15s/it]
90%|█████████ | 9/10 [00:22<00:02, 2.12s/it]
100%|██████████| 10/10 [00:23<00:00, 2.05s/it]
100%|██████████| 10/10 [00:23<00:00, 2.39s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 556, 47
- LR fn, tp: 18, 13
- LR f1 score: 0.286
- LR cohens kappa score: 0.236
- LR average precision score: 0.230
- -> test with 'RF'
- RF tn, fp: 597, 6
- RF fn, tp: 9, 22
- RF f1 score: 0.746
- RF cohens kappa score: 0.733
- -> 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: 589, 14
- KNN fn, tp: 11, 20
- KNN f1 score: 0.615
- KNN cohens kappa score: 0.595
- ------ 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:01<00:16, 1.82s/it]
20%|██ | 2/10 [00:03<00:15, 1.88s/it]
30%|███ | 3/10 [00:05<00:12, 1.84s/it]
40%|████ | 4/10 [00:07<00:11, 1.87s/it]
50%|█████ | 5/10 [00:09<00:09, 1.91s/it]
60%|██████ | 6/10 [00:11<00:07, 1.89s/it]
70%|███████ | 7/10 [00:13<00:05, 1.86s/it]
80%|████████ | 8/10 [00:14<00:03, 1.87s/it]
90%|█████████ | 9/10 [00:16<00:01, 1.88s/it]
100%|██████████| 10/10 [00:18<00:00, 1.92s/it]
100%|██████████| 10/10 [00:18<00:00, 1.89s/it]
- -> create 2288 synthetic samples
- -> test with 'LR'
- LR tn, fp: 539, 61
- LR fn, tp: 20, 7
- LR f1 score: 0.147
- LR cohens kappa score: 0.091
- LR average precision score: 0.139
- -> test with 'RF'
- RF tn, fp: 598, 2
- RF fn, tp: 6, 21
- RF f1 score: 0.840
- RF cohens kappa score: 0.833
- -> test with 'GB'
- GB tn, fp: 598, 2
- GB fn, tp: 6, 21
- GB f1 score: 0.840
- GB cohens kappa score: 0.833
- -> test with 'KNN'
- KNN tn, fp: 587, 13
- KNN fn, tp: 10, 17
- KNN f1 score: 0.596
- KNN cohens kappa score: 0.577
- ====== 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:01<00:17, 1.90s/it]
20%|██ | 2/10 [00:03<00:14, 1.87s/it]
30%|███ | 3/10 [00:05<00:13, 1.87s/it]
40%|████ | 4/10 [00:07<00:11, 1.92s/it]
50%|█████ | 5/10 [00:09<00:09, 1.90s/it]
60%|██████ | 6/10 [00:11<00:07, 1.88s/it]
70%|███████ | 7/10 [00:13<00:05, 1.87s/it]
80%|████████ | 8/10 [00:15<00:03, 1.86s/it]
90%|█████████ | 9/10 [00:16<00:01, 1.87s/it]
100%|██████████| 10/10 [00:18<00:00, 1.85s/it]
100%|██████████| 10/10 [00:18<00:00, 1.87s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 551, 52
- LR fn, tp: 21, 10
- LR f1 score: 0.215
- LR cohens kappa score: 0.160
- LR average precision score: 0.136
- -> test with 'RF'
- RF tn, fp: 597, 6
- RF fn, tp: 9, 22
- RF f1 score: 0.746
- RF cohens kappa score: 0.733
- -> test with 'GB'
- GB tn, fp: 596, 7
- GB fn, tp: 4, 27
- GB f1 score: 0.831
- GB cohens kappa score: 0.822
- -> test with 'KNN'
- KNN tn, fp: 586, 17
- KNN fn, tp: 10, 21
- KNN f1 score: 0.609
- KNN cohens kappa score: 0.586
- ------ 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:01<00:17, 1.98s/it]
20%|██ | 2/10 [00:03<00:15, 1.89s/it]
30%|███ | 3/10 [00:05<00:13, 1.93s/it]
40%|████ | 4/10 [00:07<00:11, 1.90s/it]
50%|█████ | 5/10 [00:09<00:09, 1.93s/it]
60%|██████ | 6/10 [00:11<00:07, 1.95s/it]
70%|███████ | 7/10 [00:13<00:05, 1.97s/it]
80%|████████ | 8/10 [00:15<00:03, 1.94s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.89s/it]
100%|██████████| 10/10 [00:19<00:00, 1.91s/it]
100%|██████████| 10/10 [00:19<00:00, 1.92s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 562, 41
- LR fn, tp: 26, 5
- LR f1 score: 0.130
- LR cohens kappa score: 0.076
- LR average precision score: 0.113
- -> test with 'RF'
- RF tn, fp: 600, 3
- RF fn, tp: 9, 22
- RF f1 score: 0.786
- RF cohens kappa score: 0.776
- -> test with 'GB'
- GB tn, fp: 598, 5
- GB fn, tp: 7, 24
- GB f1 score: 0.800
- GB cohens kappa score: 0.790
- -> 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 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:15, 1.93s/it]
30%|███ | 3/10 [00:05<00:13, 1.96s/it]
40%|████ | 4/10 [00:07<00:11, 1.97s/it]
50%|█████ | 5/10 [00:09<00:09, 1.97s/it]
60%|██████ | 6/10 [00:11<00:07, 1.96s/it]
70%|███████ | 7/10 [00:13<00:05, 1.98s/it]
80%|████████ | 8/10 [00:15<00:03, 1.93s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.93s/it]
100%|██████████| 10/10 [00:19<00:00, 1.88s/it]
100%|██████████| 10/10 [00:19<00:00, 1.93s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 545, 58
- LR fn, tp: 21, 10
- LR f1 score: 0.202
- LR cohens kappa score: 0.145
- LR average precision score: 0.150
- -> test with 'RF'
- RF tn, fp: 602, 1
- RF fn, tp: 8, 23
- RF f1 score: 0.836
- RF cohens kappa score: 0.829
- -> 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: 594, 9
- KNN fn, tp: 10, 21
- KNN f1 score: 0.689
- KNN cohens kappa score: 0.673
- ------ 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.89s/it]
20%|██ | 2/10 [00:03<00:14, 1.85s/it]
30%|███ | 3/10 [00:05<00:12, 1.84s/it]
40%|████ | 4/10 [00:07<00:11, 1.86s/it]
50%|█████ | 5/10 [00:09<00:09, 1.88s/it]
60%|██████ | 6/10 [00:11<00:07, 1.91s/it]
70%|███████ | 7/10 [00:13<00:05, 1.94s/it]
80%|████████ | 8/10 [00:15<00:03, 1.96s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.97s/it]
100%|██████████| 10/10 [00:19<00:00, 1.98s/it]
100%|██████████| 10/10 [00:19<00:00, 1.93s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 559, 44
- LR fn, tp: 20, 11
- LR f1 score: 0.256
- LR cohens kappa score: 0.206
- LR average precision score: 0.181
- -> test with 'RF'
- RF tn, fp: 601, 2
- RF fn, tp: 6, 25
- RF f1 score: 0.862
- RF cohens kappa score: 0.855
- -> test with 'GB'
- GB tn, fp: 601, 2
- GB fn, tp: 4, 27
- GB f1 score: 0.900
- GB cohens kappa score: 0.895
- -> test with 'KNN'
- KNN tn, fp: 590, 13
- KNN fn, tp: 12, 19
- KNN f1 score: 0.603
- KNN cohens kappa score: 0.582
- ------ 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.02s/it]
20%|██ | 2/10 [00:03<00:15, 1.92s/it]
30%|███ | 3/10 [00:05<00:13, 1.91s/it]
40%|████ | 4/10 [00:07<00:11, 1.95s/it]
50%|█████ | 5/10 [00:09<00:09, 1.97s/it]
60%|██████ | 6/10 [00:11<00:07, 1.95s/it]
70%|███████ | 7/10 [00:13<00:05, 1.91s/it]
80%|████████ | 8/10 [00:15<00:03, 1.94s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.91s/it]
100%|██████████| 10/10 [00:19<00:00, 1.92s/it]
100%|██████████| 10/10 [00:19<00:00, 1.93s/it]
- -> create 2288 synthetic samples
- -> test with 'LR'
- LR tn, fp: 574, 26
- LR fn, tp: 20, 7
- LR f1 score: 0.233
- LR cohens kappa score: 0.195
- LR average precision score: 0.255
- -> test with 'RF'
- RF tn, fp: 597, 3
- RF fn, tp: 9, 18
- RF f1 score: 0.750
- RF cohens kappa score: 0.740
- -> test with 'GB'
- GB tn, fp: 597, 3
- GB fn, tp: 7, 20
- GB f1 score: 0.800
- GB cohens kappa score: 0.792
- -> test with 'KNN'
- KNN tn, fp: 587, 13
- KNN fn, tp: 10, 17
- KNN f1 score: 0.596
- KNN cohens kappa score: 0.577
- ====== 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:01<00:16, 1.85s/it]
20%|██ | 2/10 [00:03<00:15, 1.89s/it]
30%|███ | 3/10 [00:05<00:13, 1.89s/it]
40%|████ | 4/10 [00:07<00:11, 1.87s/it]
50%|█████ | 5/10 [00:09<00:09, 1.87s/it]
60%|██████ | 6/10 [00:11<00:07, 1.92s/it]
70%|███████ | 7/10 [00:13<00:05, 1.90s/it]
80%|████████ | 8/10 [00:15<00:03, 1.94s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.96s/it]
100%|██████████| 10/10 [00:19<00:00, 1.92s/it]
100%|██████████| 10/10 [00:19<00:00, 1.91s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 559, 44
- LR fn, tp: 19, 12
- LR f1 score: 0.276
- LR cohens kappa score: 0.227
- LR average precision score: 0.204
- -> test with 'RF'
- RF tn, fp: 599, 4
- RF fn, tp: 11, 20
- RF f1 score: 0.727
- RF cohens kappa score: 0.715
- -> 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: 589, 14
- KNN fn, tp: 9, 22
- KNN f1 score: 0.657
- KNN cohens kappa score: 0.638
- ------ 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:17, 1.99s/it]
20%|██ | 2/10 [00:03<00:16, 2.00s/it]
30%|███ | 3/10 [00:05<00:13, 1.96s/it]
40%|████ | 4/10 [00:07<00:11, 1.91s/it]
50%|█████ | 5/10 [00:09<00:09, 1.95s/it]
60%|██████ | 6/10 [00:11<00:07, 1.94s/it]
70%|███████ | 7/10 [00:13<00:05, 1.90s/it]
80%|████████ | 8/10 [00:15<00:03, 1.93s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.91s/it]
100%|██████████| 10/10 [00:19<00:00, 1.89s/it]
100%|██████████| 10/10 [00:19<00:00, 1.92s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 572, 31
- LR fn, tp: 27, 4
- LR f1 score: 0.121
- LR cohens kappa score: 0.073
- LR average precision score: 0.185
- -> test with 'RF'
- RF tn, fp: 602, 1
- RF fn, tp: 9, 22
- RF f1 score: 0.815
- RF cohens kappa score: 0.807
- -> 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: 588, 15
- KNN fn, tp: 14, 17
- KNN f1 score: 0.540
- KNN cohens kappa score: 0.516
- ------ 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:01<00:16, 1.85s/it]
20%|██ | 2/10 [00:03<00:15, 1.92s/it]
30%|███ | 3/10 [00:05<00:13, 1.90s/it]
40%|████ | 4/10 [00:07<00:11, 1.95s/it]
50%|█████ | 5/10 [00:09<00:09, 1.94s/it]
60%|██████ | 6/10 [00:11<00:07, 1.91s/it]
70%|███████ | 7/10 [00:13<00:05, 1.87s/it]
80%|████████ | 8/10 [00:15<00:03, 1.90s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.95s/it]
100%|██████████| 10/10 [00:19<00:00, 2.03s/it]
100%|██████████| 10/10 [00:19<00:00, 1.95s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 559, 44
- LR fn, tp: 15, 16
- LR f1 score: 0.352
- LR cohens kappa score: 0.307
- LR average precision score: 0.214
- -> test with 'RF'
- RF tn, fp: 601, 2
- RF fn, tp: 11, 20
- RF f1 score: 0.755
- RF cohens kappa score: 0.744
- -> test with 'GB'
- GB tn, fp: 598, 5
- GB fn, tp: 10, 21
- GB f1 score: 0.737
- GB cohens kappa score: 0.725
- -> test with 'KNN'
- KNN tn, fp: 585, 18
- KNN fn, tp: 9, 22
- KNN f1 score: 0.620
- KNN cohens kappa score: 0.598
- ------ 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:01<00:16, 1.85s/it]
20%|██ | 2/10 [00:03<00:15, 1.94s/it]
30%|███ | 3/10 [00:05<00:13, 1.91s/it]
40%|████ | 4/10 [00:07<00:11, 1.92s/it]
50%|█████ | 5/10 [00:09<00:09, 1.95s/it]
60%|██████ | 6/10 [00:11<00:07, 1.91s/it]
70%|███████ | 7/10 [00:13<00:05, 1.94s/it]
80%|████████ | 8/10 [00:15<00:03, 1.96s/it]
90%|█████████ | 9/10 [00:17<00:01, 1.98s/it]
100%|██████████| 10/10 [00:26<00:00, 4.10s/it]
100%|██████████| 10/10 [00:26<00:00, 2.64s/it]
- -> create 2289 synthetic samples
- -> test with 'LR'
- LR tn, fp: 578, 25
- LR fn, tp: 23, 8
- LR f1 score: 0.250
- LR cohens kappa score: 0.210
- LR average precision score: 0.207
- -> test with 'RF'
- RF tn, fp: 600, 3
- RF fn, tp: 6, 25
- RF f1 score: 0.847
- RF cohens kappa score: 0.840
- -> 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: 594, 9
- KNN fn, tp: 10, 21
- KNN f1 score: 0.689
- KNN cohens kappa score: 0.673
- ------ 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:01<00:17, 1.95s/it]
20%|██ | 2/10 [00:03<00:16, 2.00s/it]
30%|███ | 3/10 [00:06<00:14, 2.01s/it]
40%|████ | 4/10 [00:08<00:12, 2.01s/it]
50%|█████ | 5/10 [00:10<00:10, 2.01s/it]
60%|██████ | 6/10 [00:12<00:08, 2.01s/it]
70%|███████ | 7/10 [00:14<00:06, 2.02s/it]
80%|████████ | 8/10 [00:16<00:04, 2.03s/it]
90%|█████████ | 9/10 [00:18<00:02, 2.01s/it]
100%|██████████| 10/10 [00:19<00:00, 1.97s/it]
100%|██████████| 10/10 [00:19<00:00, 2.00s/it]
- -> create 2288 synthetic samples
- -> test with 'LR'
- LR tn, fp: 576, 24
- LR fn, tp: 20, 7
- LR f1 score: 0.241
- LR cohens kappa score: 0.205
- LR average precision score: 0.196
- -> test with 'RF'
- RF tn, fp: 594, 6
- RF fn, tp: 9, 18
- RF f1 score: 0.706
- RF cohens kappa score: 0.693
- -> test with 'GB'
- GB tn, fp: 594, 6
- GB fn, tp: 9, 18
- GB f1 score: 0.706
- GB cohens kappa score: 0.693
- -> test with 'KNN'
- KNN tn, fp: 588, 12
- KNN fn, tp: 14, 13
- KNN f1 score: 0.500
- KNN cohens kappa score: 0.478
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 594, 75
- LR fn, tp: 27, 16
- LR f1 score: 0.352
- LR cohens kappa score: 0.307
- LR average precision score: 0.269
- average:
- LR tn, fp: 561.24, 41.16
- LR fn, tp: 21.16, 9.04
- LR f1 score: 0.223
- LR cohens kappa score: 0.175
- LR average precision score: 0.184
- minimum:
- LR tn, fp: 528, 9
- LR fn, tp: 15, 3
- LR f1 score: 0.085
- LR cohens kappa score: 0.033
- LR average precision score: 0.113
- -----[ RF ]-----
- maximum:
- RF tn, fp: 603, 8
- RF fn, tp: 14, 26
- RF f1 score: 0.867
- RF cohens kappa score: 0.860
- average:
- RF tn, fp: 598.8, 3.6
- RF fn, tp: 8.6, 21.6
- RF f1 score: 0.779
- RF cohens kappa score: 0.769
- minimum:
- RF tn, fp: 594, 0
- RF fn, tp: 5, 17
- RF f1 score: 0.694
- RF cohens kappa score: 0.682
- -----[ GB ]-----
- maximum:
- GB tn, fp: 603, 9
- GB fn, tp: 12, 27
- GB f1 score: 0.900
- GB cohens kappa score: 0.895
- average:
- GB tn, fp: 597.88, 4.52
- GB fn, tp: 6.6, 23.6
- GB f1 score: 0.809
- GB cohens kappa score: 0.800
- minimum:
- GB tn, fp: 594, 0
- GB fn, tp: 4, 18
- GB f1 score: 0.706
- GB cohens kappa score: 0.693
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 598, 23
- KNN fn, tp: 15, 25
- KNN f1 score: 0.689
- KNN cohens kappa score: 0.673
- average:
- KNN tn, fp: 588.4, 14.0
- KNN fn, tp: 11.16, 19.04
- KNN f1 score: 0.601
- KNN cohens kappa score: 0.580
- minimum:
- KNN tn, fp: 580, 5
- KNN fn, tp: 6, 13
- KNN f1 score: 0.479
- KNN cohens kappa score: 0.448
|