| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898 |
- ///////////////////////////////////////////
- // Running CTAB-GAN on folding_car_good
- ///////////////////////////////////////////
- Load 'data_input/folding_car_good'
- from pickle file
- Data loaded.
- -> Shuffling data
- ### Start exercise for synthetic point generator
- ====== Step 1/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 1/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
-
0%| | 0/10 [00:00<?, ?it/s]
10%|█ | 1/10 [00:01<00:10, 1.13s/it]
20%|██ | 2/10 [00:02<00:09, 1.13s/it]
30%|███ | 3/10 [00:03<00:08, 1.28s/it]
40%|████ | 4/10 [00:04<00:07, 1.18s/it]
50%|█████ | 5/10 [00:06<00:06, 1.30s/it]
60%|██████ | 6/10 [00:07<00:04, 1.17s/it]
70%|███████ | 7/10 [00:08<00:03, 1.08s/it]
80%|████████ | 8/10 [00:08<00:01, 1.03it/s]
90%|█████████ | 9/10 [00:09<00:00, 1.20it/s]
100%|██████████| 10/10 [00:09<00:00, 1.38it/s]
100%|██████████| 10/10 [00:09<00:00, 1.02it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 162, 170
- LR fn, tp: 4, 10
- LR f1 score: 0.103
- LR cohens kappa score: 0.030
- LR average precision score: 0.058
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 5, 9
- RF f1 score: 0.783
- RF cohens kappa score: 0.775
- -> test with 'GB'
- GB tn, fp: 329, 3
- GB fn, tp: 6, 8
- GB f1 score: 0.640
- GB cohens kappa score: 0.627
- -> test with 'KNN'
- KNN tn, fp: 294, 38
- KNN fn, tp: 0, 14
- KNN f1 score: 0.424
- KNN cohens kappa score: 0.385
- ------ 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:01<00:12, 1.42s/it]
20%|██ | 2/10 [00:02<00:09, 1.18s/it]
30%|███ | 3/10 [00:03<00:08, 1.15s/it]
40%|████ | 4/10 [00:04<00:06, 1.00s/it]
50%|█████ | 5/10 [00:05<00:04, 1.12it/s]
60%|██████ | 6/10 [00:05<00:03, 1.23it/s]
70%|███████ | 7/10 [00:06<00:02, 1.29it/s]
80%|████████ | 8/10 [00:07<00:01, 1.34it/s]
90%|█████████ | 9/10 [00:07<00:00, 1.46it/s]
100%|██████████| 10/10 [00:08<00:00, 1.56it/s]
100%|██████████| 10/10 [00:08<00:00, 1.22it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 177, 155
- LR fn, tp: 2, 12
- LR f1 score: 0.133
- LR cohens kappa score: 0.063
- LR average precision score: 0.064
- -> test with 'RF'
- RF tn, fp: 331, 1
- RF fn, tp: 5, 9
- RF f1 score: 0.750
- RF cohens kappa score: 0.741
- -> test with 'GB'
- GB tn, fp: 331, 1
- GB fn, tp: 6, 8
- GB f1 score: 0.696
- GB cohens kappa score: 0.686
- -> test with 'KNN'
- KNN tn, fp: 280, 52
- KNN fn, tp: 2, 12
- KNN f1 score: 0.308
- KNN cohens kappa score: 0.258
- ------ 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:00<00:04, 1.90it/s]
20%|██ | 2/10 [00:01<00:05, 1.48it/s]
30%|███ | 3/10 [00:01<00:04, 1.53it/s]
40%|████ | 4/10 [00:02<00:03, 1.59it/s]
50%|█████ | 5/10 [00:03<00:02, 1.67it/s]
60%|██████ | 6/10 [00:03<00:02, 1.56it/s]
70%|███████ | 7/10 [00:04<00:01, 1.64it/s]
80%|████████ | 8/10 [00:04<00:01, 1.69it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.73it/s]
100%|██████████| 10/10 [00:06<00:00, 1.64it/s]
100%|██████████| 10/10 [00:06<00:00, 1.64it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 180, 152
- LR fn, tp: 5, 9
- LR f1 score: 0.103
- LR cohens kappa score: 0.031
- LR average precision score: 0.063
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 7, 7
- RF f1 score: 0.667
- RF cohens kappa score: 0.657
- -> test with 'GB'
- GB tn, fp: 331, 1
- GB fn, tp: 3, 11
- GB f1 score: 0.846
- GB cohens kappa score: 0.840
- -> test with 'KNN'
- KNN tn, fp: 296, 36
- KNN fn, tp: 0, 14
- KNN f1 score: 0.438
- KNN cohens kappa score: 0.400
- ------ 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:00<00:04, 2.06it/s]
20%|██ | 2/10 [00:00<00:03, 2.11it/s]
30%|███ | 3/10 [00:01<00:03, 2.13it/s]
40%|████ | 4/10 [00:01<00:02, 2.03it/s]
50%|█████ | 5/10 [00:02<00:02, 1.97it/s]
60%|██████ | 6/10 [00:02<00:02, 1.97it/s]
70%|███████ | 7/10 [00:03<00:01, 2.02it/s]
80%|████████ | 8/10 [00:03<00:00, 2.05it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.97it/s]
100%|██████████| 10/10 [00:04<00:00, 1.99it/s]
100%|██████████| 10/10 [00:04<00:00, 2.01it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 195, 137
- LR fn, tp: 5, 9
- LR f1 score: 0.112
- LR cohens kappa score: 0.042
- LR average precision score: 0.069
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 8, 6
- RF f1 score: 0.600
- RF cohens kappa score: 0.590
- -> test with 'GB'
- GB tn, fp: 332, 0
- GB fn, tp: 4, 10
- GB f1 score: 0.833
- GB cohens kappa score: 0.828
- -> test with 'KNN'
- KNN tn, fp: 275, 57
- KNN fn, tp: 1, 13
- KNN f1 score: 0.310
- KNN cohens kappa score: 0.260
- ------ 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:00<00:06, 1.41it/s]
20%|██ | 2/10 [00:01<00:04, 1.60it/s]
30%|███ | 3/10 [00:01<00:04, 1.64it/s]
40%|████ | 4/10 [00:02<00:03, 1.65it/s]
50%|█████ | 5/10 [00:03<00:03, 1.61it/s]
60%|██████ | 6/10 [00:03<00:02, 1.64it/s]
70%|███████ | 7/10 [00:04<00:01, 1.61it/s]
80%|████████ | 8/10 [00:04<00:01, 1.62it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.65it/s]
100%|██████████| 10/10 [00:06<00:00, 1.68it/s]
100%|██████████| 10/10 [00:06<00:00, 1.64it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 188, 143
- LR fn, tp: 5, 8
- LR f1 score: 0.098
- LR cohens kappa score: 0.030
- LR average precision score: 0.044
- -> test with 'RF'
- RF tn, fp: 331, 0
- RF fn, tp: 6, 7
- RF f1 score: 0.700
- RF cohens kappa score: 0.692
- -> test with 'GB'
- GB tn, fp: 328, 3
- GB fn, tp: 2, 11
- GB f1 score: 0.815
- GB cohens kappa score: 0.807
- -> test with 'KNN'
- KNN tn, fp: 293, 38
- KNN fn, tp: 1, 12
- KNN f1 score: 0.381
- KNN cohens kappa score: 0.341
- ====== 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:00<00:07, 1.28it/s]
20%|██ | 2/10 [00:01<00:06, 1.29it/s]
30%|███ | 3/10 [00:02<00:04, 1.44it/s]
40%|████ | 4/10 [00:02<00:04, 1.48it/s]
50%|█████ | 5/10 [00:03<00:03, 1.33it/s]
60%|██████ | 6/10 [00:04<00:03, 1.28it/s]
70%|███████ | 7/10 [00:05<00:02, 1.40it/s]
80%|████████ | 8/10 [00:05<00:01, 1.45it/s]
90%|█████████ | 9/10 [00:06<00:00, 1.51it/s]
100%|██████████| 10/10 [00:07<00:00, 1.47it/s]
100%|██████████| 10/10 [00:07<00:00, 1.42it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 170, 162
- LR fn, tp: 5, 9
- LR f1 score: 0.097
- LR cohens kappa score: 0.024
- LR average precision score: 0.066
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 5, 9
- RF f1 score: 0.783
- RF cohens kappa score: 0.775
- -> test with 'GB'
- GB tn, fp: 331, 1
- GB fn, tp: 5, 9
- GB f1 score: 0.750
- GB cohens kappa score: 0.741
- -> test with 'KNN'
- KNN tn, fp: 285, 47
- KNN fn, tp: 3, 11
- KNN f1 score: 0.306
- KNN cohens kappa score: 0.257
- ------ 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:00<00:05, 1.67it/s]
20%|██ | 2/10 [00:01<00:04, 1.69it/s]
30%|███ | 3/10 [00:01<00:03, 1.76it/s]
40%|████ | 4/10 [00:02<00:03, 1.75it/s]
50%|█████ | 5/10 [00:02<00:02, 1.75it/s]
60%|██████ | 6/10 [00:03<00:02, 1.72it/s]
70%|███████ | 7/10 [00:04<00:01, 1.75it/s]
80%|████████ | 8/10 [00:04<00:01, 1.75it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.68it/s]
100%|██████████| 10/10 [00:05<00:00, 1.70it/s]
100%|██████████| 10/10 [00:05<00:00, 1.72it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 170, 162
- LR fn, tp: 4, 10
- LR f1 score: 0.108
- LR cohens kappa score: 0.035
- LR average precision score: 0.068
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 3, 11
- RF f1 score: 0.880
- RF cohens kappa score: 0.876
- -> test with 'GB'
- GB tn, fp: 331, 1
- GB fn, tp: 3, 11
- GB f1 score: 0.846
- GB cohens kappa score: 0.840
- -> test with 'KNN'
- KNN tn, fp: 306, 26
- KNN fn, tp: 0, 14
- KNN f1 score: 0.519
- KNN cohens kappa score: 0.488
- ------ 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:00<00:06, 1.31it/s]
20%|██ | 2/10 [00:01<00:05, 1.42it/s]
30%|███ | 3/10 [00:02<00:04, 1.52it/s]
40%|████ | 4/10 [00:02<00:03, 1.55it/s]
50%|█████ | 5/10 [00:03<00:03, 1.60it/s]
60%|██████ | 6/10 [00:03<00:02, 1.64it/s]
70%|███████ | 7/10 [00:04<00:01, 1.61it/s]
80%|████████ | 8/10 [00:05<00:01, 1.52it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.45it/s]
100%|██████████| 10/10 [00:06<00:00, 1.44it/s]
100%|██████████| 10/10 [00:06<00:00, 1.50it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 190, 142
- LR fn, tp: 4, 10
- LR f1 score: 0.120
- LR cohens kappa score: 0.050
- LR average precision score: 0.064
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 7, 7
- RF f1 score: 0.667
- RF cohens kappa score: 0.657
- -> test with 'GB'
- GB tn, fp: 332, 0
- GB fn, tp: 5, 9
- GB f1 score: 0.783
- GB cohens kappa score: 0.775
- -> test with 'KNN'
- KNN tn, fp: 285, 47
- KNN fn, tp: 4, 10
- KNN f1 score: 0.282
- KNN cohens kappa score: 0.232
- ------ 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:00<00:05, 1.64it/s]
20%|██ | 2/10 [00:01<00:04, 1.64it/s]
30%|███ | 3/10 [00:01<00:04, 1.65it/s]
40%|████ | 4/10 [00:02<00:03, 1.55it/s]
50%|█████ | 5/10 [00:03<00:03, 1.59it/s]
60%|██████ | 6/10 [00:03<00:02, 1.66it/s]
70%|███████ | 7/10 [00:04<00:02, 1.47it/s]
80%|████████ | 8/10 [00:05<00:01, 1.55it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.59it/s]
100%|██████████| 10/10 [00:06<00:00, 1.65it/s]
100%|██████████| 10/10 [00:06<00:00, 1.60it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 185, 147
- LR fn, tp: 6, 8
- LR f1 score: 0.095
- LR cohens kappa score: 0.022
- LR average precision score: 0.052
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 9, 5
- RF f1 score: 0.526
- RF cohens kappa score: 0.516
- -> test with 'GB'
- GB tn, fp: 331, 1
- GB fn, tp: 4, 10
- GB f1 score: 0.800
- GB cohens kappa score: 0.793
- -> test with 'KNN'
- KNN tn, fp: 275, 57
- KNN fn, tp: 0, 14
- KNN f1 score: 0.329
- KNN cohens kappa score: 0.281
- ------ 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:00<00:05, 1.59it/s]
20%|██ | 2/10 [00:01<00:04, 1.63it/s]
30%|███ | 3/10 [00:01<00:04, 1.56it/s]
40%|████ | 4/10 [00:02<00:03, 1.64it/s]
50%|█████ | 5/10 [00:03<00:02, 1.68it/s]
60%|██████ | 6/10 [00:03<00:02, 1.69it/s]
70%|███████ | 7/10 [00:04<00:01, 1.66it/s]
80%|████████ | 8/10 [00:04<00:01, 1.66it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.64it/s]
100%|██████████| 10/10 [00:06<00:00, 1.66it/s]
100%|██████████| 10/10 [00:06<00:00, 1.65it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 196, 135
- LR fn, tp: 3, 10
- LR f1 score: 0.127
- LR cohens kappa score: 0.061
- LR average precision score: 0.079
- -> test with 'RF'
- RF tn, fp: 331, 0
- RF fn, tp: 6, 7
- RF f1 score: 0.700
- RF cohens kappa score: 0.692
- -> test with 'GB'
- GB tn, fp: 330, 1
- GB fn, tp: 4, 9
- GB f1 score: 0.783
- GB cohens kappa score: 0.775
- -> test with 'KNN'
- KNN tn, fp: 282, 49
- KNN fn, tp: 0, 13
- KNN f1 score: 0.347
- KNN cohens kappa score: 0.303
- ====== 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:00<00:06, 1.45it/s]
20%|██ | 2/10 [00:01<00:05, 1.48it/s]
30%|███ | 3/10 [00:01<00:04, 1.57it/s]
40%|████ | 4/10 [00:02<00:03, 1.67it/s]
50%|█████ | 5/10 [00:03<00:02, 1.68it/s]
60%|██████ | 6/10 [00:03<00:02, 1.63it/s]
70%|███████ | 7/10 [00:04<00:01, 1.60it/s]
80%|████████ | 8/10 [00:04<00:01, 1.60it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.58it/s]
100%|██████████| 10/10 [00:06<00:00, 1.59it/s]
100%|██████████| 10/10 [00:06<00:00, 1.60it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 163, 169
- LR fn, tp: 3, 11
- LR f1 score: 0.113
- LR cohens kappa score: 0.041
- LR average precision score: 0.082
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 7, 7
- RF f1 score: 0.667
- RF cohens kappa score: 0.657
- -> test with 'GB'
- GB tn, fp: 332, 0
- GB fn, tp: 2, 12
- GB f1 score: 0.923
- GB cohens kappa score: 0.920
- -> test with 'KNN'
- KNN tn, fp: 270, 62
- KNN fn, tp: 0, 14
- KNN f1 score: 0.311
- KNN cohens kappa score: 0.261
- ------ 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:00<00:05, 1.77it/s]
20%|██ | 2/10 [00:01<00:04, 1.66it/s]
30%|███ | 3/10 [00:01<00:04, 1.55it/s]
40%|████ | 4/10 [00:02<00:03, 1.61it/s]
50%|█████ | 5/10 [00:03<00:03, 1.57it/s]
60%|██████ | 6/10 [00:03<00:02, 1.63it/s]
70%|███████ | 7/10 [00:04<00:01, 1.59it/s]
80%|████████ | 8/10 [00:04<00:01, 1.66it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.64it/s]
100%|██████████| 10/10 [00:06<00:00, 1.57it/s]
100%|██████████| 10/10 [00:06<00:00, 1.60it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 185, 147
- LR fn, tp: 4, 10
- LR f1 score: 0.117
- LR cohens kappa score: 0.046
- LR average precision score: 0.062
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 7, 7
- RF f1 score: 0.667
- RF cohens kappa score: 0.657
- -> test with 'GB'
- GB tn, fp: 330, 2
- GB fn, tp: 4, 10
- GB f1 score: 0.769
- GB cohens kappa score: 0.760
- -> test with 'KNN'
- KNN tn, fp: 274, 58
- KNN fn, tp: 0, 14
- KNN f1 score: 0.326
- KNN cohens kappa score: 0.277
- ------ 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:00<00:06, 1.39it/s]
20%|██ | 2/10 [00:01<00:04, 1.60it/s]
30%|███ | 3/10 [00:01<00:04, 1.68it/s]
40%|████ | 4/10 [00:02<00:03, 1.71it/s]
50%|█████ | 5/10 [00:03<00:03, 1.66it/s]
60%|██████ | 6/10 [00:03<00:02, 1.65it/s]
70%|███████ | 7/10 [00:04<00:01, 1.67it/s]
80%|████████ | 8/10 [00:04<00:01, 1.67it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.61it/s]
100%|██████████| 10/10 [00:06<00:00, 1.66it/s]
100%|██████████| 10/10 [00:06<00:00, 1.65it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 183, 149
- LR fn, tp: 4, 10
- LR f1 score: 0.116
- LR cohens kappa score: 0.045
- LR average precision score: 0.073
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 6, 8
- RF f1 score: 0.727
- RF cohens kappa score: 0.719
- -> test with 'GB'
- GB tn, fp: 330, 2
- GB fn, tp: 7, 7
- GB f1 score: 0.609
- GB cohens kappa score: 0.596
- -> test with 'KNN'
- KNN tn, fp: 284, 48
- KNN fn, tp: 1, 13
- KNN f1 score: 0.347
- KNN cohens kappa score: 0.301
- ------ 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:00<00:05, 1.57it/s]
20%|██ | 2/10 [00:01<00:05, 1.59it/s]
30%|███ | 3/10 [00:01<00:04, 1.69it/s]
40%|████ | 4/10 [00:02<00:03, 1.65it/s]
50%|█████ | 5/10 [00:03<00:02, 1.69it/s]
60%|██████ | 6/10 [00:03<00:02, 1.59it/s]
70%|███████ | 7/10 [00:04<00:01, 1.62it/s]
80%|████████ | 8/10 [00:04<00:01, 1.65it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.66it/s]
100%|██████████| 10/10 [00:06<00:00, 1.63it/s]
100%|██████████| 10/10 [00:06<00:00, 1.63it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 162, 170
- LR fn, tp: 2, 12
- LR f1 score: 0.122
- LR cohens kappa score: 0.051
- LR average precision score: 0.073
- -> test with 'RF'
- RF tn, fp: 331, 1
- RF fn, tp: 6, 8
- RF f1 score: 0.696
- RF cohens kappa score: 0.686
- -> test with 'GB'
- GB tn, fp: 332, 0
- GB fn, tp: 6, 8
- GB f1 score: 0.727
- GB cohens kappa score: 0.719
- -> test with 'KNN'
- KNN tn, fp: 293, 39
- KNN fn, tp: 0, 14
- KNN f1 score: 0.418
- KNN cohens kappa score: 0.378
- ------ 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:00<00:05, 1.73it/s]
20%|██ | 2/10 [00:01<00:04, 1.66it/s]
30%|███ | 3/10 [00:01<00:04, 1.69it/s]
40%|████ | 4/10 [00:02<00:03, 1.57it/s]
50%|█████ | 5/10 [00:03<00:03, 1.57it/s]
60%|██████ | 6/10 [00:03<00:02, 1.61it/s]
70%|███████ | 7/10 [00:04<00:01, 1.61it/s]
80%|████████ | 8/10 [00:04<00:01, 1.62it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.64it/s]
100%|██████████| 10/10 [00:06<00:00, 1.65it/s]
100%|██████████| 10/10 [00:06<00:00, 1.63it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 181, 150
- LR fn, tp: 6, 7
- LR f1 score: 0.082
- LR cohens kappa score: 0.013
- LR average precision score: 0.078
- -> test with 'RF'
- RF tn, fp: 331, 0
- RF fn, tp: 6, 7
- RF f1 score: 0.700
- RF cohens kappa score: 0.692
- -> test with 'GB'
- GB tn, fp: 330, 1
- GB fn, tp: 5, 8
- GB f1 score: 0.727
- GB cohens kappa score: 0.719
- -> test with 'KNN'
- KNN tn, fp: 270, 61
- KNN fn, tp: 0, 13
- KNN f1 score: 0.299
- KNN cohens kappa score: 0.251
- ====== 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:00<00:05, 1.64it/s]
20%|██ | 2/10 [00:01<00:04, 1.67it/s]
30%|███ | 3/10 [00:01<00:04, 1.49it/s]
40%|████ | 4/10 [00:02<00:03, 1.60it/s]
50%|█████ | 5/10 [00:03<00:03, 1.59it/s]
60%|██████ | 6/10 [00:03<00:02, 1.65it/s]
70%|███████ | 7/10 [00:04<00:01, 1.70it/s]
80%|████████ | 8/10 [00:04<00:01, 1.73it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.74it/s]
100%|██████████| 10/10 [00:05<00:00, 1.76it/s]
100%|██████████| 10/10 [00:05<00:00, 1.69it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 171, 161
- LR fn, tp: 4, 10
- LR f1 score: 0.108
- LR cohens kappa score: 0.036
- LR average precision score: 0.075
- -> test with 'RF'
- RF tn, fp: 331, 1
- RF fn, tp: 5, 9
- RF f1 score: 0.750
- RF cohens kappa score: 0.741
- -> test with 'GB'
- GB tn, fp: 332, 0
- GB fn, tp: 0, 14
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 305, 27
- KNN fn, tp: 0, 14
- KNN f1 score: 0.509
- KNN cohens kappa score: 0.478
- ------ 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:00<00:06, 1.32it/s]
20%|██ | 2/10 [00:01<00:05, 1.54it/s]
30%|███ | 3/10 [00:02<00:04, 1.49it/s]
40%|████ | 4/10 [00:02<00:03, 1.61it/s]
50%|█████ | 5/10 [00:03<00:03, 1.64it/s]
60%|██████ | 6/10 [00:03<00:02, 1.65it/s]
70%|███████ | 7/10 [00:04<00:01, 1.64it/s]
80%|████████ | 8/10 [00:05<00:01, 1.62it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.67it/s]
100%|██████████| 10/10 [00:06<00:00, 1.62it/s]
100%|██████████| 10/10 [00:06<00:00, 1.61it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 175, 157
- LR fn, tp: 5, 9
- LR f1 score: 0.100
- LR cohens kappa score: 0.027
- LR average precision score: 0.054
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 11, 3
- RF f1 score: 0.353
- RF cohens kappa score: 0.344
- -> test with 'GB'
- GB tn, fp: 330, 2
- GB fn, tp: 7, 7
- GB f1 score: 0.609
- GB cohens kappa score: 0.596
- -> test with 'KNN'
- KNN tn, fp: 271, 61
- KNN fn, tp: 0, 14
- KNN f1 score: 0.315
- KNN cohens kappa score: 0.264
- ------ 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:00<00:06, 1.50it/s]
20%|██ | 2/10 [00:01<00:05, 1.58it/s]
30%|███ | 3/10 [00:01<00:04, 1.70it/s]
40%|████ | 4/10 [00:02<00:03, 1.53it/s]
50%|█████ | 5/10 [00:03<00:03, 1.58it/s]
60%|██████ | 6/10 [00:03<00:02, 1.58it/s]
70%|███████ | 7/10 [00:04<00:01, 1.57it/s]
80%|████████ | 8/10 [00:05<00:01, 1.51it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.54it/s]
100%|██████████| 10/10 [00:06<00:00, 1.60it/s]
100%|██████████| 10/10 [00:06<00:00, 1.57it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 179, 153
- LR fn, tp: 5, 9
- LR f1 score: 0.102
- LR cohens kappa score: 0.030
- LR average precision score: 0.087
- -> test with 'RF'
- RF tn, fp: 331, 1
- RF fn, tp: 6, 8
- RF f1 score: 0.696
- RF cohens kappa score: 0.686
- -> test with 'GB'
- GB tn, fp: 330, 2
- GB fn, tp: 3, 11
- GB f1 score: 0.815
- GB cohens kappa score: 0.807
- -> test with 'KNN'
- KNN tn, fp: 282, 50
- KNN fn, tp: 0, 14
- KNN f1 score: 0.359
- KNN cohens kappa score: 0.313
- ------ 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:00<00:05, 1.68it/s]
20%|██ | 2/10 [00:01<00:04, 1.71it/s]
30%|███ | 3/10 [00:01<00:04, 1.67it/s]
40%|████ | 4/10 [00:02<00:03, 1.58it/s]
50%|█████ | 5/10 [00:03<00:03, 1.46it/s]
60%|██████ | 6/10 [00:03<00:02, 1.44it/s]
70%|███████ | 7/10 [00:05<00:02, 1.14it/s]
80%|████████ | 8/10 [00:06<00:01, 1.15it/s]
90%|█████████ | 9/10 [00:06<00:00, 1.22it/s]
100%|██████████| 10/10 [00:07<00:00, 1.36it/s]
100%|██████████| 10/10 [00:07<00:00, 1.36it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 178, 154
- LR fn, tp: 6, 8
- LR f1 score: 0.091
- LR cohens kappa score: 0.018
- LR average precision score: 0.053
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 6, 8
- RF f1 score: 0.727
- RF cohens kappa score: 0.719
- -> test with 'GB'
- GB tn, fp: 331, 1
- GB fn, tp: 2, 12
- GB f1 score: 0.889
- GB cohens kappa score: 0.884
- -> test with 'KNN'
- KNN tn, fp: 299, 33
- KNN fn, tp: 0, 14
- KNN f1 score: 0.459
- KNN cohens kappa score: 0.423
- ------ 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:00<00:06, 1.30it/s]
20%|██ | 2/10 [00:01<00:05, 1.48it/s]
30%|███ | 3/10 [00:01<00:04, 1.60it/s]
40%|████ | 4/10 [00:02<00:03, 1.63it/s]
50%|█████ | 5/10 [00:03<00:03, 1.61it/s]
60%|██████ | 6/10 [00:03<00:02, 1.66it/s]
70%|███████ | 7/10 [00:04<00:01, 1.71it/s]
80%|████████ | 8/10 [00:04<00:01, 1.70it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.74it/s]
100%|██████████| 10/10 [00:06<00:00, 1.61it/s]
100%|██████████| 10/10 [00:06<00:00, 1.62it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 162, 169
- LR fn, tp: 1, 12
- LR f1 score: 0.124
- LR cohens kappa score: 0.057
- LR average precision score: 0.121
- -> test with 'RF'
- RF tn, fp: 330, 1
- RF fn, tp: 9, 4
- RF f1 score: 0.444
- RF cohens kappa score: 0.433
- -> test with 'GB'
- GB tn, fp: 330, 1
- GB fn, tp: 5, 8
- GB f1 score: 0.727
- GB cohens kappa score: 0.719
- -> test with 'KNN'
- KNN tn, fp: 312, 19
- KNN fn, tp: 3, 10
- KNN f1 score: 0.476
- KNN cohens kappa score: 0.447
- ====== 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:00<00:06, 1.43it/s]
20%|██ | 2/10 [00:01<00:05, 1.37it/s]
30%|███ | 3/10 [00:02<00:04, 1.46it/s]
40%|████ | 4/10 [00:02<00:03, 1.56it/s]
50%|█████ | 5/10 [00:03<00:03, 1.61it/s]
60%|██████ | 6/10 [00:03<00:02, 1.67it/s]
70%|███████ | 7/10 [00:04<00:01, 1.66it/s]
80%|████████ | 8/10 [00:05<00:01, 1.63it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.62it/s]
100%|██████████| 10/10 [00:06<00:00, 1.65it/s]
100%|██████████| 10/10 [00:06<00:00, 1.60it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 168, 164
- LR fn, tp: 5, 9
- LR f1 score: 0.096
- LR cohens kappa score: 0.023
- LR average precision score: 0.055
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 10, 4
- RF f1 score: 0.444
- RF cohens kappa score: 0.434
- -> test with 'GB'
- GB tn, fp: 331, 1
- GB fn, tp: 9, 5
- GB f1 score: 0.500
- GB cohens kappa score: 0.488
- -> test with 'KNN'
- KNN tn, fp: 295, 37
- KNN fn, tp: 0, 14
- KNN f1 score: 0.431
- KNN cohens kappa score: 0.392
- ------ 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:00<00:07, 1.26it/s]
20%|██ | 2/10 [00:01<00:05, 1.45it/s]
30%|███ | 3/10 [00:02<00:04, 1.47it/s]
40%|████ | 4/10 [00:02<00:04, 1.48it/s]
50%|█████ | 5/10 [00:03<00:03, 1.56it/s]
60%|██████ | 6/10 [00:03<00:02, 1.54it/s]
70%|███████ | 7/10 [00:04<00:01, 1.60it/s]
80%|████████ | 8/10 [00:05<00:01, 1.66it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.70it/s]
100%|██████████| 10/10 [00:06<00:00, 1.71it/s]
100%|██████████| 10/10 [00:06<00:00, 1.60it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 195, 137
- LR fn, tp: 6, 8
- LR f1 score: 0.101
- LR cohens kappa score: 0.029
- LR average precision score: 0.086
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 6, 8
- RF f1 score: 0.727
- RF cohens kappa score: 0.719
- -> test with 'GB'
- GB tn, fp: 331, 1
- GB fn, tp: 7, 7
- GB f1 score: 0.636
- GB cohens kappa score: 0.625
- -> test with 'KNN'
- KNN tn, fp: 280, 52
- KNN fn, tp: 0, 14
- KNN f1 score: 0.350
- KNN cohens kappa score: 0.303
- ------ 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:00<00:07, 1.26it/s]
20%|██ | 2/10 [00:01<00:05, 1.46it/s]
30%|███ | 3/10 [00:02<00:05, 1.21it/s]
40%|████ | 4/10 [00:02<00:04, 1.36it/s]
50%|█████ | 5/10 [00:03<00:03, 1.43it/s]
60%|██████ | 6/10 [00:04<00:03, 1.28it/s]
70%|███████ | 7/10 [00:06<00:03, 1.12s/it]
80%|████████ | 8/10 [00:07<00:02, 1.13s/it]
90%|█████████ | 9/10 [00:08<00:01, 1.01s/it]
100%|██████████| 10/10 [00:09<00:00, 1.01s/it]
100%|██████████| 10/10 [00:09<00:00, 1.08it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 191, 141
- LR fn, tp: 5, 9
- LR f1 score: 0.110
- LR cohens kappa score: 0.039
- LR average precision score: 0.081
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 6, 8
- RF f1 score: 0.727
- RF cohens kappa score: 0.719
- -> test with 'GB'
- GB tn, fp: 329, 3
- GB fn, tp: 3, 11
- GB f1 score: 0.786
- GB cohens kappa score: 0.777
- -> test with 'KNN'
- KNN tn, fp: 294, 38
- KNN fn, tp: 4, 10
- KNN f1 score: 0.323
- KNN cohens kappa score: 0.277
- ------ 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:00<00:07, 1.25it/s]
20%|██ | 2/10 [00:01<00:05, 1.51it/s]
30%|███ | 3/10 [00:01<00:04, 1.56it/s]
40%|████ | 4/10 [00:02<00:03, 1.53it/s]
50%|█████ | 5/10 [00:03<00:03, 1.61it/s]
60%|██████ | 6/10 [00:03<00:02, 1.67it/s]
70%|███████ | 7/10 [00:04<00:01, 1.71it/s]
80%|████████ | 8/10 [00:04<00:01, 1.75it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.78it/s]
100%|██████████| 10/10 [00:05<00:00, 1.78it/s]
100%|██████████| 10/10 [00:05<00:00, 1.67it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 174, 158
- LR fn, tp: 2, 12
- LR f1 score: 0.130
- LR cohens kappa score: 0.060
- LR average precision score: 0.082
- -> test with 'RF'
- RF tn, fp: 332, 0
- RF fn, tp: 7, 7
- RF f1 score: 0.667
- RF cohens kappa score: 0.657
- -> test with 'GB'
- GB tn, fp: 331, 1
- GB fn, tp: 7, 7
- GB f1 score: 0.636
- GB cohens kappa score: 0.625
- -> test with 'KNN'
- KNN tn, fp: 291, 41
- KNN fn, tp: 0, 14
- KNN f1 score: 0.406
- KNN cohens kappa score: 0.365
- ------ 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:00<00:06, 1.39it/s]
20%|██ | 2/10 [00:01<00:05, 1.47it/s]
30%|███ | 3/10 [00:01<00:04, 1.58it/s]
40%|████ | 4/10 [00:02<00:03, 1.60it/s]
50%|█████ | 5/10 [00:03<00:03, 1.55it/s]
60%|██████ | 6/10 [00:03<00:02, 1.54it/s]
70%|███████ | 7/10 [00:04<00:01, 1.55it/s]
80%|████████ | 8/10 [00:05<00:01, 1.58it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.63it/s]
100%|██████████| 10/10 [00:06<00:00, 1.68it/s]
100%|██████████| 10/10 [00:06<00:00, 1.60it/s]
- -> create 1272 synthetic samples
- -> test with 'LR'
- LR tn, fp: 181, 150
- LR fn, tp: 5, 8
- LR f1 score: 0.094
- LR cohens kappa score: 0.026
- LR average precision score: 0.073
- -> test with 'RF'
- RF tn, fp: 330, 1
- RF fn, tp: 6, 7
- RF f1 score: 0.667
- RF cohens kappa score: 0.657
- -> test with 'GB'
- GB tn, fp: 330, 1
- GB fn, tp: 0, 13
- GB f1 score: 0.963
- GB cohens kappa score: 0.961
- -> test with 'KNN'
- KNN tn, fp: 293, 38
- KNN fn, tp: 0, 13
- KNN f1 score: 0.406
- KNN cohens kappa score: 0.368
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 196, 170
- LR fn, tp: 6, 12
- LR f1 score: 0.133
- LR cohens kappa score: 0.063
- LR average precision score: 0.121
- average:
- LR tn, fp: 178.44, 153.36
- LR fn, tp: 4.24, 9.56
- LR f1 score: 0.108
- LR cohens kappa score: 0.037
- LR average precision score: 0.071
- minimum:
- LR tn, fp: 162, 135
- LR fn, tp: 1, 7
- LR f1 score: 0.082
- LR cohens kappa score: 0.013
- LR average precision score: 0.044
- -----[ RF ]-----
- maximum:
- RF tn, fp: 332, 1
- RF fn, tp: 11, 11
- RF f1 score: 0.880
- RF cohens kappa score: 0.876
- average:
- RF tn, fp: 331.56, 0.24
- RF fn, tp: 6.6, 7.2
- RF f1 score: 0.669
- RF cohens kappa score: 0.660
- minimum:
- RF tn, fp: 330, 0
- RF fn, tp: 3, 3
- RF f1 score: 0.353
- RF cohens kappa score: 0.344
- -----[ GB ]-----
- maximum:
- GB tn, fp: 332, 3
- GB fn, tp: 9, 14
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- average:
- GB tn, fp: 330.6, 1.2
- GB fn, tp: 4.36, 9.44
- GB f1 score: 0.764
- GB cohens kappa score: 0.756
- minimum:
- GB tn, fp: 328, 0
- GB fn, tp: 0, 5
- GB f1 score: 0.500
- GB cohens kappa score: 0.488
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 312, 62
- KNN fn, tp: 4, 14
- KNN f1 score: 0.519
- KNN cohens kappa score: 0.488
- average:
- KNN tn, fp: 287.36, 44.44
- KNN fn, tp: 0.76, 13.04
- KNN f1 score: 0.375
- KNN cohens kappa score: 0.332
- minimum:
- KNN tn, fp: 270, 19
- KNN fn, tp: 0, 10
- KNN f1 score: 0.282
- KNN cohens kappa score: 0.232
|