| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725 |
- ///////////////////////////////////////////
- // Running CTAB-GAN on kaggle_creditcard
- ///////////////////////////////////////////
- Load 'data_input/kaggle_creditcard'
- 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:22, 2.54s/it]
20%|██ | 2/10 [00:05<00:20, 2.55s/it]
30%|███ | 3/10 [00:07<00:17, 2.48s/it]
40%|████ | 4/10 [00:09<00:14, 2.46s/it]
50%|█████ | 5/10 [00:12<00:11, 2.39s/it]
60%|██████ | 6/10 [00:14<00:09, 2.32s/it]
70%|███████ | 7/10 [00:16<00:06, 2.29s/it]
80%|████████ | 8/10 [00:18<00:04, 2.32s/it]
90%|█████████ | 9/10 [00:21<00:02, 2.30s/it]
100%|██████████| 10/10 [00:23<00:00, 2.29s/it]
100%|██████████| 10/10 [00:23<00:00, 2.35s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56837, 26
- LR fn, tp: 30, 69
- LR f1 score: 0.711
- LR cohens kappa score: 0.711
- LR average precision score: 0.560
- -> test with 'GB'
- GB tn, fp: 56848, 15
- GB fn, tp: 27, 72
- GB f1 score: 0.774
- GB cohens kappa score: 0.774
- -> test with 'KNN'
- KNN tn, fp: 56509, 354
- KNN fn, tp: 92, 7
- KNN f1 score: 0.030
- KNN cohens kappa score: 0.028
- ------ 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:19, 2.16s/it]
20%|██ | 2/10 [00:04<00:17, 2.17s/it]
30%|███ | 3/10 [00:06<00:14, 2.10s/it]
40%|████ | 4/10 [00:08<00:12, 2.11s/it]
50%|█████ | 5/10 [00:10<00:10, 2.06s/it]
60%|██████ | 6/10 [00:12<00:08, 2.13s/it]
70%|███████ | 7/10 [00:14<00:06, 2.15s/it]
80%|████████ | 8/10 [00:17<00:04, 2.16s/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.17s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56847, 16
- LR fn, tp: 20, 79
- LR f1 score: 0.814
- LR cohens kappa score: 0.814
- LR average precision score: 0.744
- -> test with 'GB'
- GB tn, fp: 56856, 7
- GB fn, tp: 26, 73
- GB f1 score: 0.816
- GB cohens kappa score: 0.815
- -> test with 'KNN'
- KNN tn, fp: 56523, 340
- KNN fn, tp: 93, 6
- KNN f1 score: 0.027
- KNN cohens kappa score: 0.024
- ------ 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:01<00:17, 1.92s/it]
20%|██ | 2/10 [00:03<00:15, 1.92s/it]
30%|███ | 3/10 [00:05<00:13, 1.97s/it]
40%|████ | 4/10 [00:09<00:16, 2.81s/it]
50%|█████ | 5/10 [00:12<00:12, 2.55s/it]
60%|██████ | 6/10 [00:13<00:09, 2.34s/it]
70%|███████ | 7/10 [00:15<00:06, 2.23s/it]
80%|████████ | 8/10 [00:18<00:04, 2.34s/it]
90%|█████████ | 9/10 [00:20<00:02, 2.18s/it]
100%|██████████| 10/10 [00:22<00:00, 2.12s/it]
100%|██████████| 10/10 [00:22<00:00, 2.24s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56838, 25
- LR fn, tp: 20, 79
- LR f1 score: 0.778
- LR cohens kappa score: 0.778
- LR average precision score: 0.657
- -> test with 'GB'
- GB tn, fp: 56851, 12
- GB fn, tp: 20, 79
- GB f1 score: 0.832
- GB cohens kappa score: 0.831
- -> test with 'KNN'
- KNN tn, fp: 56600, 263
- KNN fn, tp: 97, 2
- KNN f1 score: 0.011
- KNN cohens kappa score: 0.008
- ------ 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:21, 2.41s/it]
20%|██ | 2/10 [00:04<00:18, 2.33s/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:10<00:10, 2.12s/it]
60%|██████ | 6/10 [00:13<00:08, 2.11s/it]
70%|███████ | 7/10 [00:15<00:06, 2.18s/it]
80%|████████ | 8/10 [00:17<00:04, 2.14s/it]
90%|█████████ | 9/10 [00:19<00:02, 2.09s/it]
100%|██████████| 10/10 [00:21<00:00, 2.12s/it]
100%|██████████| 10/10 [00:21<00:00, 2.16s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56829, 34
- LR fn, tp: 15, 84
- LR f1 score: 0.774
- LR cohens kappa score: 0.774
- LR average precision score: 0.757
- -> test with 'GB'
- GB tn, fp: 56851, 12
- GB fn, tp: 17, 82
- GB f1 score: 0.850
- GB cohens kappa score: 0.849
- -> test with 'KNN'
- KNN tn, fp: 56548, 315
- KNN fn, tp: 98, 1
- KNN f1 score: 0.005
- KNN cohens kappa score: 0.002
- ------ 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:22, 2.48s/it]
20%|██ | 2/10 [00:04<00:19, 2.42s/it]
30%|███ | 3/10 [00:06<00:15, 2.18s/it]
40%|████ | 4/10 [00:08<00:13, 2.20s/it]
50%|█████ | 5/10 [00:11<00:10, 2.16s/it]
60%|██████ | 6/10 [00:13<00:08, 2.19s/it]
70%|███████ | 7/10 [00:15<00:06, 2.08s/it]
80%|████████ | 8/10 [00:17<00:04, 2.07s/it]
90%|█████████ | 9/10 [00:19<00:02, 2.12s/it]
100%|██████████| 10/10 [00:21<00:00, 2.11s/it]
100%|██████████| 10/10 [00:21<00:00, 2.15s/it]
- -> create 227056 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56850, 13
- LR fn, tp: 19, 77
- LR f1 score: 0.828
- LR cohens kappa score: 0.828
- LR average precision score: 0.812
- -> test with 'GB'
- GB tn, fp: 56856, 7
- GB fn, tp: 18, 78
- GB f1 score: 0.862
- GB cohens kappa score: 0.862
- -> test with 'KNN'
- KNN tn, fp: 56543, 320
- KNN fn, tp: 94, 2
- KNN f1 score: 0.010
- KNN cohens kappa score: 0.007
- ====== 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:20, 2.28s/it]
20%|██ | 2/10 [00:04<00:19, 2.38s/it]
30%|███ | 3/10 [00:06<00:16, 2.30s/it]
40%|████ | 4/10 [00:09<00:13, 2.24s/it]
50%|█████ | 5/10 [00:10<00:10, 2.11s/it]
60%|██████ | 6/10 [00:13<00:08, 2.15s/it]
70%|███████ | 7/10 [00:15<00:06, 2.12s/it]
80%|████████ | 8/10 [00:17<00:04, 2.13s/it]
90%|█████████ | 9/10 [00:19<00:02, 2.15s/it]
100%|██████████| 10/10 [00:21<00:00, 2.20s/it]
100%|██████████| 10/10 [00:21<00:00, 2.19s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56810, 53
- LR fn, tp: 15, 84
- LR f1 score: 0.712
- LR cohens kappa score: 0.711
- LR average precision score: 0.694
- -> test with 'GB'
- GB tn, fp: 56847, 16
- GB fn, tp: 19, 80
- GB f1 score: 0.821
- GB cohens kappa score: 0.820
- -> test with 'KNN'
- KNN tn, fp: 56522, 341
- KNN fn, tp: 96, 3
- KNN f1 score: 0.014
- KNN cohens kappa score: 0.011
- ------ 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:18, 2.04s/it]
20%|██ | 2/10 [00:04<00:19, 2.38s/it]
30%|███ | 3/10 [00:07<00:16, 2.43s/it]
40%|████ | 4/10 [00:09<00:14, 2.36s/it]
50%|█████ | 5/10 [00:13<00:14, 2.87s/it]
60%|██████ | 6/10 [00:15<00:10, 2.60s/it]
70%|███████ | 7/10 [00:17<00:07, 2.37s/it]
80%|████████ | 8/10 [00:19<00:04, 2.27s/it]
90%|█████████ | 9/10 [00:21<00:02, 2.25s/it]
100%|██████████| 10/10 [00:23<00:00, 2.20s/it]
100%|██████████| 10/10 [00:23<00:00, 2.35s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56835, 28
- LR fn, tp: 17, 82
- LR f1 score: 0.785
- LR cohens kappa score: 0.784
- LR average precision score: 0.619
- -> test with 'GB'
- GB tn, fp: 56850, 13
- GB fn, tp: 19, 80
- GB f1 score: 0.833
- GB cohens kappa score: 0.833
- -> test with 'KNN'
- KNN tn, fp: 56508, 355
- KNN fn, tp: 98, 1
- KNN f1 score: 0.004
- KNN cohens kappa score: 0.002
- ------ 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:19, 2.12s/it]
20%|██ | 2/10 [00:04<00:17, 2.17s/it]
30%|███ | 3/10 [00:06<00:16, 2.29s/it]
40%|████ | 4/10 [00:08<00:13, 2.27s/it]
50%|█████ | 5/10 [00:11<00:11, 2.22s/it]
60%|██████ | 6/10 [00:13<00:08, 2.23s/it]
70%|███████ | 7/10 [00:15<00:06, 2.20s/it]
80%|████████ | 8/10 [00:17<00:04, 2.17s/it]
90%|█████████ | 9/10 [00:19<00:02, 2.14s/it]
100%|██████████| 10/10 [00:21<00:00, 2.12s/it]
100%|██████████| 10/10 [00:21<00:00, 2.18s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56840, 23
- LR fn, tp: 23, 76
- LR f1 score: 0.768
- LR cohens kappa score: 0.767
- LR average precision score: 0.646
- -> test with 'GB'
- GB tn, fp: 56850, 13
- GB fn, tp: 23, 76
- GB f1 score: 0.809
- GB cohens kappa score: 0.808
- -> test with 'KNN'
- KNN tn, fp: 56557, 306
- KNN fn, tp: 94, 5
- KNN f1 score: 0.024
- KNN cohens kappa score: 0.022
- ------ 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:24, 2.69s/it]
20%|██ | 2/10 [00:05<00:21, 2.73s/it]
30%|███ | 3/10 [00:07<00:18, 2.64s/it]
40%|████ | 4/10 [00:10<00:14, 2.50s/it]
50%|█████ | 5/10 [00:12<00:12, 2.42s/it]
60%|██████ | 6/10 [00:15<00:10, 2.51s/it]
70%|███████ | 7/10 [00:17<00:07, 2.46s/it]
80%|████████ | 8/10 [00:19<00:04, 2.35s/it]
90%|█████████ | 9/10 [00:21<00:02, 2.23s/it]
100%|██████████| 10/10 [00:23<00:00, 2.23s/it]
100%|██████████| 10/10 [00:23<00:00, 2.39s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56836, 27
- LR fn, tp: 21, 78
- LR f1 score: 0.765
- LR cohens kappa score: 0.764
- LR average precision score: 0.713
- -> test with 'GB'
- GB tn, fp: 56856, 7
- GB fn, tp: 21, 78
- GB f1 score: 0.848
- GB cohens kappa score: 0.848
- -> test with 'KNN'
- KNN tn, fp: 56433, 430
- KNN fn, tp: 95, 4
- KNN f1 score: 0.015
- KNN cohens kappa score: 0.012
- ------ 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:20, 2.24s/it]
20%|██ | 2/10 [00:04<00:17, 2.23s/it]
30%|███ | 3/10 [00:06<00:15, 2.26s/it]
40%|████ | 4/10 [00:08<00:13, 2.23s/it]
50%|█████ | 5/10 [00:11<00:11, 2.29s/it]
60%|██████ | 6/10 [00:13<00:09, 2.28s/it]
70%|███████ | 7/10 [00:15<00:06, 2.27s/it]
80%|████████ | 8/10 [00:17<00:04, 2.22s/it]
90%|█████████ | 9/10 [00:20<00:02, 2.24s/it]
100%|██████████| 10/10 [00:22<00:00, 2.35s/it]
100%|██████████| 10/10 [00:22<00:00, 2.28s/it]
- -> create 227056 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56850, 13
- LR fn, tp: 23, 73
- LR f1 score: 0.802
- LR cohens kappa score: 0.802
- LR average precision score: 0.750
- -> test with 'GB'
- GB tn, fp: 56852, 11
- GB fn, tp: 23, 73
- GB f1 score: 0.811
- GB cohens kappa score: 0.811
- -> test with 'KNN'
- KNN tn, fp: 56594, 269
- KNN fn, tp: 93, 3
- KNN f1 score: 0.016
- KNN cohens kappa score: 0.014
- ====== 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:20, 2.54s/it]
30%|███ | 3/10 [00:07<00:17, 2.47s/it]
40%|████ | 4/10 [00:09<00:14, 2.35s/it]
50%|█████ | 5/10 [00:11<00:11, 2.23s/it]
60%|██████ | 6/10 [00:13<00:08, 2.17s/it]
70%|███████ | 7/10 [00:15<00:06, 2.17s/it]
80%|████████ | 8/10 [00:17<00:04, 2.15s/it]
90%|█████████ | 9/10 [00:20<00:02, 2.21s/it]
100%|██████████| 10/10 [00:22<00:00, 2.19s/it]
100%|██████████| 10/10 [00:22<00:00, 2.24s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56838, 25
- LR fn, tp: 21, 78
- LR f1 score: 0.772
- LR cohens kappa score: 0.772
- LR average precision score: 0.703
- -> test with 'GB'
- GB tn, fp: 56852, 11
- GB fn, tp: 25, 74
- GB f1 score: 0.804
- GB cohens kappa score: 0.804
- -> test with 'KNN'
- KNN tn, fp: 56349, 514
- KNN fn, tp: 95, 4
- KNN f1 score: 0.013
- KNN cohens kappa score: 0.010
- ------ 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:19, 2.18s/it]
20%|██ | 2/10 [00:04<00:18, 2.32s/it]
30%|███ | 3/10 [00:06<00:16, 2.32s/it]
40%|████ | 4/10 [00:09<00:14, 2.38s/it]
50%|█████ | 5/10 [00:11<00:11, 2.30s/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:18<00:04, 2.20s/it]
90%|█████████ | 9/10 [00:20<00:02, 2.25s/it]
100%|██████████| 10/10 [00:22<00:00, 2.23s/it]
100%|██████████| 10/10 [00:22<00:00, 2.26s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56836, 27
- LR fn, tp: 22, 77
- LR f1 score: 0.759
- LR cohens kappa score: 0.758
- LR average precision score: 0.666
- -> test with 'GB'
- GB tn, fp: 56851, 12
- GB fn, tp: 21, 78
- GB f1 score: 0.825
- GB cohens kappa score: 0.825
- -> test with 'KNN'
- KNN tn, fp: 56501, 362
- KNN fn, tp: 95, 4
- KNN f1 score: 0.017
- KNN cohens kappa score: 0.015
- ------ 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.28s/it]
20%|██ | 2/10 [00:04<00:20, 2.52s/it]
30%|███ | 3/10 [00:07<00:17, 2.51s/it]
40%|████ | 4/10 [00:10<00:15, 2.66s/it]
50%|█████ | 5/10 [00:12<00:12, 2.51s/it]
60%|██████ | 6/10 [00:14<00:09, 2.44s/it]
70%|███████ | 7/10 [00:17<00:07, 2.41s/it]
80%|████████ | 8/10 [00:19<00:04, 2.33s/it]
90%|█████████ | 9/10 [00:21<00:02, 2.32s/it]
100%|██████████| 10/10 [00:24<00:00, 2.31s/it]
100%|██████████| 10/10 [00:24<00:00, 2.40s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56844, 19
- LR fn, tp: 25, 74
- LR f1 score: 0.771
- LR cohens kappa score: 0.770
- LR average precision score: 0.733
- -> test with 'GB'
- GB tn, fp: 56858, 5
- GB fn, tp: 18, 81
- GB f1 score: 0.876
- GB cohens kappa score: 0.875
- -> test with 'KNN'
- KNN tn, fp: 56504, 359
- KNN fn, tp: 95, 4
- KNN f1 score: 0.017
- KNN cohens kappa score: 0.015
- ------ 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.41s/it]
20%|██ | 2/10 [00:04<00:18, 2.35s/it]
30%|███ | 3/10 [00:06<00:15, 2.18s/it]
40%|████ | 4/10 [00:08<00:13, 2.22s/it]
50%|█████ | 5/10 [00:11<00:10, 2.17s/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.20s/it]
90%|█████████ | 9/10 [00:20<00:02, 2.24s/it]
100%|██████████| 10/10 [00:22<00:00, 2.27s/it]
100%|██████████| 10/10 [00:22<00:00, 2.24s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56839, 24
- LR fn, tp: 20, 79
- LR f1 score: 0.782
- LR cohens kappa score: 0.782
- LR average precision score: 0.747
- -> test with 'GB'
- GB tn, fp: 56853, 10
- GB fn, tp: 16, 83
- GB f1 score: 0.865
- GB cohens kappa score: 0.864
- -> test with 'KNN'
- KNN tn, fp: 56447, 416
- KNN fn, tp: 92, 7
- KNN f1 score: 0.027
- KNN cohens kappa score: 0.024
- ------ 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:21, 2.42s/it]
20%|██ | 2/10 [00:04<00:19, 2.39s/it]
30%|███ | 3/10 [00:07<00:16, 2.37s/it]
40%|████ | 4/10 [00:09<00:13, 2.26s/it]
50%|█████ | 5/10 [00:11<00:11, 2.24s/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.19s/it]
90%|█████████ | 9/10 [00:20<00:02, 2.17s/it]
100%|██████████| 10/10 [00:22<00:00, 2.31s/it]
100%|██████████| 10/10 [00:22<00:00, 2.27s/it]
- -> create 227056 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56844, 19
- LR fn, tp: 21, 75
- LR f1 score: 0.789
- LR cohens kappa score: 0.789
- LR average precision score: 0.757
- -> test with 'GB'
- GB tn, fp: 56853, 10
- GB fn, tp: 24, 72
- GB f1 score: 0.809
- GB cohens kappa score: 0.809
- -> test with 'KNN'
- KNN tn, fp: 56518, 345
- KNN fn, tp: 94, 2
- KNN f1 score: 0.009
- KNN cohens kappa score: 0.006
- ====== 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:20, 2.23s/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.20s/it]
50%|█████ | 5/10 [00:11<00:12, 2.44s/it]
60%|██████ | 6/10 [00:14<00:09, 2.47s/it]
70%|███████ | 7/10 [00:16<00:07, 2.51s/it]
80%|████████ | 8/10 [00:18<00:04, 2.34s/it]
90%|█████████ | 9/10 [00:21<00:02, 2.34s/it]
100%|██████████| 10/10 [00:23<00:00, 2.38s/it]
100%|██████████| 10/10 [00:23<00:00, 2.36s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56837, 26
- LR fn, tp: 16, 83
- LR f1 score: 0.798
- LR cohens kappa score: 0.798
- LR average precision score: 0.680
- -> test with 'GB'
- GB tn, fp: 56849, 14
- GB fn, tp: 17, 82
- GB f1 score: 0.841
- GB cohens kappa score: 0.841
- -> test with 'KNN'
- KNN tn, fp: 56571, 292
- KNN fn, tp: 97, 2
- KNN f1 score: 0.010
- KNN cohens kappa score: 0.008
- ------ 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:21, 2.42s/it]
20%|██ | 2/10 [00:04<00:18, 2.30s/it]
30%|███ | 3/10 [00:07<00:16, 2.43s/it]
40%|████ | 4/10 [00:09<00:14, 2.39s/it]
50%|█████ | 5/10 [00:11<00:11, 2.34s/it]
60%|██████ | 6/10 [00:14<00:09, 2.38s/it]
70%|███████ | 7/10 [00:16<00:07, 2.42s/it]
80%|████████ | 8/10 [00:19<00:04, 2.44s/it]
90%|█████████ | 9/10 [00:21<00:02, 2.36s/it]
100%|██████████| 10/10 [00:23<00:00, 2.34s/it]
100%|██████████| 10/10 [00:23<00:00, 2.37s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56844, 19
- LR fn, tp: 32, 67
- LR f1 score: 0.724
- LR cohens kappa score: 0.724
- LR average precision score: 0.646
- -> test with 'GB'
- GB tn, fp: 56851, 12
- GB fn, tp: 21, 78
- GB f1 score: 0.825
- GB cohens kappa score: 0.825
- -> test with 'KNN'
- KNN tn, fp: 56551, 312
- KNN fn, tp: 96, 3
- KNN f1 score: 0.014
- KNN cohens kappa score: 0.012
- ------ 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.38s/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:09<00:13, 2.24s/it]
50%|█████ | 5/10 [00:11<00:11, 2.28s/it]
60%|██████ | 6/10 [00:13<00:08, 2.23s/it]
70%|███████ | 7/10 [00:15<00:06, 2.19s/it]
80%|████████ | 8/10 [00:17<00:04, 2.22s/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 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56837, 26
- LR fn, tp: 22, 77
- LR f1 score: 0.762
- LR cohens kappa score: 0.762
- LR average precision score: 0.680
- -> test with 'GB'
- GB tn, fp: 56854, 9
- GB fn, tp: 25, 74
- GB f1 score: 0.813
- GB cohens kappa score: 0.813
- -> test with 'KNN'
- KNN tn, fp: 56591, 272
- KNN fn, tp: 94, 5
- KNN f1 score: 0.027
- KNN cohens kappa score: 0.024
- ------ 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:21, 2.42s/it]
20%|██ | 2/10 [00:05<00:21, 2.73s/it]
30%|███ | 3/10 [00:07<00:17, 2.49s/it]
40%|████ | 4/10 [00:09<00:13, 2.30s/it]
50%|█████ | 5/10 [00:11<00:11, 2.26s/it]
60%|██████ | 6/10 [00:14<00:09, 2.27s/it]
70%|███████ | 7/10 [00:16<00:07, 2.34s/it]
80%|████████ | 8/10 [00:18<00:04, 2.24s/it]
90%|█████████ | 9/10 [00:20<00:02, 2.27s/it]
100%|██████████| 10/10 [00:23<00:00, 2.27s/it]
100%|██████████| 10/10 [00:23<00:00, 2.32s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56851, 12
- LR fn, tp: 19, 80
- LR f1 score: 0.838
- LR cohens kappa score: 0.837
- LR average precision score: 0.775
- -> test with 'GB'
- GB tn, fp: 56852, 11
- GB fn, tp: 17, 82
- GB f1 score: 0.854
- GB cohens kappa score: 0.854
- -> test with 'KNN'
- KNN tn, fp: 56552, 311
- KNN fn, tp: 96, 3
- KNN f1 score: 0.015
- KNN cohens kappa score: 0.012
- ------ 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:20, 2.33s/it]
20%|██ | 2/10 [00:04<00:16, 2.11s/it]
30%|███ | 3/10 [00:06<00:14, 2.03s/it]
40%|████ | 4/10 [00:08<00:13, 2.26s/it]
50%|█████ | 5/10 [00:11<00:11, 2.24s/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.22s/it]
90%|█████████ | 9/10 [00:19<00:02, 2.21s/it]
100%|██████████| 10/10 [00:22<00:00, 2.24s/it]
100%|██████████| 10/10 [00:22<00:00, 2.22s/it]
- -> create 227056 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56847, 16
- LR fn, tp: 25, 71
- LR f1 score: 0.776
- LR cohens kappa score: 0.776
- LR average precision score: 0.710
- -> test with 'GB'
- GB tn, fp: 56845, 18
- GB fn, tp: 21, 75
- GB f1 score: 0.794
- GB cohens kappa score: 0.793
- -> test with 'KNN'
- KNN tn, fp: 56541, 322
- KNN fn, tp: 88, 8
- KNN f1 score: 0.038
- KNN cohens kappa score: 0.035
- ====== 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:22, 2.53s/it]
20%|██ | 2/10 [00:04<00:18, 2.36s/it]
30%|███ | 3/10 [00:07<00:16, 2.32s/it]
40%|████ | 4/10 [00:09<00:14, 2.35s/it]
50%|█████ | 5/10 [00:11<00:11, 2.34s/it]
60%|██████ | 6/10 [00:13<00:08, 2.25s/it]
70%|███████ | 7/10 [00:15<00:06, 2.15s/it]
80%|████████ | 8/10 [00:18<00:04, 2.26s/it]
90%|█████████ | 9/10 [00:20<00:02, 2.27s/it]
100%|██████████| 10/10 [00:22<00:00, 2.24s/it]
100%|██████████| 10/10 [00:22<00:00, 2.27s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56841, 22
- LR fn, tp: 24, 75
- LR f1 score: 0.765
- LR cohens kappa score: 0.765
- LR average precision score: 0.677
- -> test with 'GB'
- GB tn, fp: 56857, 6
- GB fn, tp: 25, 74
- GB f1 score: 0.827
- GB cohens kappa score: 0.827
- -> test with 'KNN'
- KNN tn, fp: 56487, 376
- KNN fn, tp: 96, 3
- KNN f1 score: 0.013
- KNN cohens kappa score: 0.010
- ------ 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:20, 2.29s/it]
20%|██ | 2/10 [00:04<00:17, 2.15s/it]
30%|███ | 3/10 [00:06<00:15, 2.18s/it]
40%|████ | 4/10 [00:08<00:13, 2.24s/it]
50%|█████ | 5/10 [00:11<00:11, 2.24s/it]
60%|██████ | 6/10 [00:13<00:08, 2.18s/it]
70%|███████ | 7/10 [00:15<00:06, 2.20s/it]
80%|████████ | 8/10 [00:17<00:04, 2.20s/it]
90%|█████████ | 9/10 [00:21<00:02, 2.61s/it]
100%|██████████| 10/10 [00:23<00:00, 2.41s/it]
100%|██████████| 10/10 [00:23<00:00, 2.31s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56799, 64
- LR fn, tp: 16, 83
- LR f1 score: 0.675
- LR cohens kappa score: 0.674
- LR average precision score: 0.733
- -> test with 'GB'
- GB tn, fp: 56854, 9
- GB fn, tp: 20, 79
- GB f1 score: 0.845
- GB cohens kappa score: 0.845
- -> test with 'KNN'
- KNN tn, fp: 56409, 454
- KNN fn, tp: 93, 6
- KNN f1 score: 0.021
- KNN cohens kappa score: 0.019
- ------ 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:22, 2.53s/it]
20%|██ | 2/10 [00:05<00:21, 2.66s/it]
30%|███ | 3/10 [00:07<00:17, 2.53s/it]
40%|████ | 4/10 [00:10<00:14, 2.50s/it]
50%|█████ | 5/10 [00:12<00:12, 2.43s/it]
60%|██████ | 6/10 [00:14<00:09, 2.41s/it]
70%|███████ | 7/10 [00:16<00:06, 2.31s/it]
80%|████████ | 8/10 [00:18<00:04, 2.23s/it]
90%|█████████ | 9/10 [00:21<00:02, 2.26s/it]
100%|██████████| 10/10 [00:23<00:00, 2.22s/it]
100%|██████████| 10/10 [00:23<00:00, 2.34s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56841, 22
- LR fn, tp: 24, 75
- LR f1 score: 0.765
- LR cohens kappa score: 0.765
- LR average precision score: 0.677
- -> test with 'GB'
- GB tn, fp: 56852, 11
- GB fn, tp: 20, 79
- GB f1 score: 0.836
- GB cohens kappa score: 0.836
- -> test with 'KNN'
- KNN tn, fp: 56608, 255
- KNN fn, tp: 96, 3
- KNN f1 score: 0.017
- KNN cohens kappa score: 0.014
- ------ 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:04<00:36, 4.06s/it]
20%|██ | 2/10 [00:06<00:25, 3.15s/it]
30%|███ | 3/10 [00:09<00:19, 2.82s/it]
40%|████ | 4/10 [00:11<00:15, 2.60s/it]
50%|█████ | 5/10 [00:13<00:12, 2.51s/it]
60%|██████ | 6/10 [00:15<00:09, 2.41s/it]
70%|███████ | 7/10 [00:18<00:07, 2.38s/it]
80%|████████ | 8/10 [00:20<00:04, 2.41s/it]
90%|█████████ | 9/10 [00:23<00:02, 2.41s/it]
100%|██████████| 10/10 [00:25<00:00, 2.45s/it]
100%|██████████| 10/10 [00:25<00:00, 2.56s/it]
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56841, 22
- LR fn, tp: 18, 81
- LR f1 score: 0.802
- LR cohens kappa score: 0.802
- LR average precision score: 0.734
- -> test with 'GB'
- GB tn, fp: 56856, 7
- GB fn, tp: 20, 79
- GB f1 score: 0.854
- GB cohens kappa score: 0.854
- -> test with 'KNN'
- KNN tn, fp: 56449, 414
- KNN fn, tp: 97, 2
- KNN f1 score: 0.008
- KNN cohens kappa score: 0.005
- ------ 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:24, 2.70s/it]
20%|██ | 2/10 [00:05<00:19, 2.50s/it]
30%|███ | 3/10 [00:07<00:17, 2.47s/it]
40%|████ | 4/10 [00:09<00:14, 2.40s/it]
50%|█████ | 5/10 [00:12<00:12, 2.41s/it]
60%|██████ | 6/10 [00:14<00:09, 2.33s/it]
70%|███████ | 7/10 [00:16<00:06, 2.23s/it]
80%|████████ | 8/10 [00:18<00:04, 2.30s/it]
90%|█████████ | 9/10 [00:20<00:02, 2.20s/it]
100%|██████████| 10/10 [00:23<00:00, 2.22s/it]
100%|██████████| 10/10 [00:23<00:00, 2.31s/it]
- -> create 227056 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56843, 20
- LR fn, tp: 19, 77
- LR f1 score: 0.798
- LR cohens kappa score: 0.798
- LR average precision score: 0.661
- -> test with 'GB'
- GB tn, fp: 56846, 17
- GB fn, tp: 22, 74
- GB f1 score: 0.791
- GB cohens kappa score: 0.791
- -> test with 'KNN'
- KNN tn, fp: 56548, 315
- KNN fn, tp: 94, 2
- KNN f1 score: 0.010
- KNN cohens kappa score: 0.007
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 56851, 64
- LR fn, tp: 32, 84
- LR f1 score: 0.838
- LR cohens kappa score: 0.837
- LR average precision score: 0.812
- average:
- LR tn, fp: 56838.16, 24.84
- LR fn, tp: 21.08, 77.32
- LR f1 score: 0.773
- LR cohens kappa score: 0.772
- LR average precision score: 0.701
- minimum:
- LR tn, fp: 56799, 12
- LR fn, tp: 15, 67
- LR f1 score: 0.675
- LR cohens kappa score: 0.674
- LR average precision score: 0.560
- -----[ GB ]-----
- maximum:
- GB tn, fp: 56858, 18
- GB fn, tp: 27, 83
- GB f1 score: 0.876
- GB cohens kappa score: 0.875
- average:
- GB tn, fp: 56852.0, 11.0
- GB fn, tp: 21.0, 77.4
- GB f1 score: 0.829
- GB cohens kappa score: 0.828
- minimum:
- GB tn, fp: 56845, 5
- GB fn, tp: 16, 72
- GB f1 score: 0.774
- GB cohens kappa score: 0.774
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 56608, 514
- KNN fn, tp: 98, 8
- KNN f1 score: 0.038
- KNN cohens kappa score: 0.035
- average:
- KNN tn, fp: 56518.52, 344.48
- KNN fn, tp: 94.72, 3.68
- KNN f1 score: 0.016
- KNN cohens kappa score: 0.014
- minimum:
- KNN tn, fp: 56349, 255
- KNN fn, tp: 88, 1
- KNN f1 score: 0.004
- KNN cohens kappa score: 0.002
|