| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898 |
- ///////////////////////////////////////////
- // Running CTAB-GAN on folding_car-vgood
- ///////////////////////////////////////////
- Load 'data_input/folding_car-vgood'
- 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:00<00:05, 1.52it/s]
20%|██ | 2/10 [00:01<00:05, 1.54it/s]
30%|███ | 3/10 [00:01<00:04, 1.54it/s]
40%|████ | 4/10 [00:02<00:03, 1.58it/s]
50%|█████ | 5/10 [00:03<00:03, 1.62it/s]
60%|██████ | 6/10 [00:03<00:02, 1.60it/s]
70%|███████ | 7/10 [00:04<00:01, 1.63it/s]
80%|████████ | 8/10 [00:04<00:01, 1.69it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.71it/s]
100%|██████████| 10/10 [00:06<00:00, 1.67it/s]
100%|██████████| 10/10 [00:06<00:00, 1.63it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 295, 38
- LR fn, tp: 0, 13
- LR f1 score: 0.406
- LR cohens kappa score: 0.368
- LR average precision score: 0.335
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 0, 13
- RF f1 score: 1.000
- RF cohens kappa score: 1.000
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 0, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 322, 11
- KNN fn, tp: 0, 13
- KNN f1 score: 0.703
- KNN cohens kappa score: 0.687
- ------ 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:00<00:05, 1.73it/s]
20%|██ | 2/10 [00:01<00:04, 1.77it/s]
30%|███ | 3/10 [00:01<00:03, 1.75it/s]
40%|████ | 4/10 [00:02<00:03, 1.57it/s]
50%|█████ | 5/10 [00:03<00:04, 1.24it/s]
60%|██████ | 6/10 [00:04<00:03, 1.31it/s]
70%|███████ | 7/10 [00:04<00:02, 1.37it/s]
80%|████████ | 8/10 [00:05<00:01, 1.44it/s]
90%|█████████ | 9/10 [00:06<00:00, 1.49it/s]
100%|██████████| 10/10 [00:06<00:00, 1.54it/s]
100%|██████████| 10/10 [00:06<00:00, 1.48it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 314, 19
- LR fn, tp: 6, 7
- LR f1 score: 0.359
- LR cohens kappa score: 0.325
- LR average precision score: 0.274
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 2, 11
- RF f1 score: 0.917
- RF cohens kappa score: 0.914
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 0, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 312, 21
- KNN fn, tp: 0, 13
- KNN f1 score: 0.553
- KNN cohens kappa score: 0.528
- ------ 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:05, 1.62it/s]
20%|██ | 2/10 [00:01<00:05, 1.51it/s]
30%|███ | 3/10 [00:01<00:04, 1.57it/s]
40%|████ | 4/10 [00:02<00:03, 1.61it/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.67it/s]
80%|████████ | 8/10 [00:04<00:01, 1.68it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.61it/s]
100%|██████████| 10/10 [00:06<00:00, 1.60it/s]
100%|██████████| 10/10 [00:06<00:00, 1.61it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 302, 31
- LR fn, tp: 1, 12
- LR f1 score: 0.429
- LR cohens kappa score: 0.394
- LR average precision score: 0.397
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 2, 11
- RF f1 score: 0.917
- RF cohens kappa score: 0.914
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 1, 12
- GB f1 score: 0.960
- GB cohens kappa score: 0.959
- -> test with 'KNN'
- KNN tn, fp: 313, 20
- KNN fn, tp: 0, 13
- KNN f1 score: 0.565
- KNN cohens kappa score: 0.540
- ------ 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:05, 1.71it/s]
20%|██ | 2/10 [00:01<00:04, 1.65it/s]
30%|███ | 3/10 [00:01<00:04, 1.50it/s]
40%|████ | 4/10 [00:02<00:04, 1.40it/s]
50%|█████ | 5/10 [00:03<00:03, 1.49it/s]
60%|██████ | 6/10 [00:04<00:02, 1.45it/s]
70%|███████ | 7/10 [00:04<00:02, 1.45it/s]
80%|████████ | 8/10 [00:05<00:01, 1.41it/s]
90%|█████████ | 9/10 [00:06<00:00, 1.46it/s]
100%|██████████| 10/10 [00:06<00:00, 1.55it/s]
100%|██████████| 10/10 [00:06<00:00, 1.50it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 283, 50
- LR fn, tp: 0, 13
- LR f1 score: 0.342
- LR cohens kappa score: 0.298
- LR average precision score: 0.392
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 1, 12
- RF f1 score: 0.960
- RF cohens kappa score: 0.959
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 0, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 320, 13
- KNN fn, tp: 0, 13
- KNN f1 score: 0.667
- KNN cohens kappa score: 0.649
- ------ 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:05, 1.68it/s]
20%|██ | 2/10 [00:01<00:04, 1.68it/s]
30%|███ | 3/10 [00:01<00:04, 1.64it/s]
40%|████ | 4/10 [00:02<00:03, 1.64it/s]
50%|█████ | 5/10 [00:03<00:03, 1.64it/s]
60%|██████ | 6/10 [00:03<00:02, 1.70it/s]
70%|███████ | 7/10 [00:04<00:01, 1.58it/s]
80%|████████ | 8/10 [00:04<00:01, 1.63it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.65it/s]
100%|██████████| 10/10 [00:06<00:00, 1.69it/s]
100%|██████████| 10/10 [00:06<00:00, 1.66it/s]
- -> create 1280 synthetic samples
- -> test with 'LR'
- LR tn, fp: 302, 29
- LR fn, tp: 3, 10
- LR f1 score: 0.385
- LR cohens kappa score: 0.348
- LR average precision score: 0.403
- -> test with 'RF'
- RF tn, fp: 331, 0
- RF fn, tp: 2, 11
- RF f1 score: 0.917
- RF cohens kappa score: 0.914
- -> test with 'GB'
- GB tn, fp: 329, 2
- GB fn, tp: 0, 13
- GB f1 score: 0.929
- GB cohens kappa score: 0.926
- -> test with 'KNN'
- KNN tn, fp: 318, 13
- KNN fn, tp: 0, 13
- KNN f1 score: 0.667
- KNN cohens kappa score: 0.649
- ====== 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:06, 1.31it/s]
20%|██ | 2/10 [00:01<00:05, 1.51it/s]
30%|███ | 3/10 [00:02<00:04, 1.53it/s]
40%|████ | 4/10 [00:02<00:03, 1.62it/s]
50%|█████ | 5/10 [00:03<00:03, 1.58it/s]
60%|██████ | 6/10 [00:03<00:02, 1.66it/s]
70%|███████ | 7/10 [00:04<00:01, 1.62it/s]
80%|████████ | 8/10 [00:05<00:01, 1.60it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.64it/s]
100%|██████████| 10/10 [00:06<00:00, 1.68it/s]
100%|██████████| 10/10 [00:06<00:00, 1.61it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 279, 54
- LR fn, tp: 0, 13
- LR f1 score: 0.325
- LR cohens kappa score: 0.280
- LR average precision score: 0.259
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 1, 12
- RF f1 score: 0.960
- RF cohens kappa score: 0.959
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 0, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 310, 23
- KNN fn, tp: 0, 13
- KNN f1 score: 0.531
- KNN cohens kappa score: 0.503
- ------ 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.63it/s]
20%|██ | 2/10 [00:01<00:04, 1.73it/s]
30%|███ | 3/10 [00:01<00:04, 1.65it/s]
40%|████ | 4/10 [00:02<00:03, 1.70it/s]
50%|█████ | 5/10 [00:02<00:02, 1.75it/s]
60%|██████ | 6/10 [00:03<00:02, 1.68it/s]
70%|███████ | 7/10 [00:04<00:01, 1.65it/s]
80%|████████ | 8/10 [00:04<00:01, 1.67it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.65it/s]
100%|██████████| 10/10 [00:05<00:00, 1.65it/s]
100%|██████████| 10/10 [00:05<00:00, 1.67it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 305, 28
- LR fn, tp: 5, 8
- LR f1 score: 0.327
- LR cohens kappa score: 0.287
- LR average precision score: 0.274
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 0, 13
- RF f1 score: 1.000
- RF cohens kappa score: 1.000
- -> test with 'GB'
- GB tn, fp: 332, 1
- GB fn, tp: 0, 13
- GB f1 score: 0.963
- GB cohens kappa score: 0.961
- -> test with 'KNN'
- KNN tn, fp: 313, 20
- KNN fn, tp: 3, 10
- KNN f1 score: 0.465
- KNN cohens kappa score: 0.436
- ------ 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.40it/s]
30%|███ | 3/10 [00:01<00:04, 1.57it/s]
40%|████ | 4/10 [00:02<00:03, 1.56it/s]
50%|█████ | 5/10 [00:03<00:03, 1.64it/s]
60%|██████ | 6/10 [00:03<00:02, 1.61it/s]
70%|███████ | 7/10 [00:04<00:01, 1.57it/s]
80%|████████ | 8/10 [00:05<00:01, 1.62it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.65it/s]
100%|██████████| 10/10 [00:06<00:00, 1.58it/s]
100%|██████████| 10/10 [00:06<00:00, 1.57it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 311, 22
- LR fn, tp: 4, 9
- LR f1 score: 0.409
- LR cohens kappa score: 0.376
- LR average precision score: 0.355
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 1, 12
- RF f1 score: 0.960
- RF cohens kappa score: 0.959
- -> test with 'GB'
- GB tn, fp: 332, 1
- GB fn, tp: 1, 12
- GB f1 score: 0.923
- GB cohens kappa score: 0.920
- -> test with 'KNN'
- KNN tn, fp: 319, 14
- KNN fn, tp: 0, 13
- KNN f1 score: 0.650
- KNN cohens kappa score: 0.631
- ------ 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:06, 1.42it/s]
20%|██ | 2/10 [00:01<00:05, 1.60it/s]
30%|███ | 3/10 [00:01<00:04, 1.69it/s]
40%|████ | 4/10 [00:02<00:03, 1.72it/s]
50%|█████ | 5/10 [00:03<00:03, 1.60it/s]
60%|██████ | 6/10 [00:03<00:02, 1.61it/s]
70%|███████ | 7/10 [00:04<00:01, 1.64it/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.61it/s]
100%|██████████| 10/10 [00:06<00:00, 1.63it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 317, 16
- LR fn, tp: 6, 7
- LR f1 score: 0.389
- LR cohens kappa score: 0.358
- LR average precision score: 0.357
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 1, 12
- RF f1 score: 0.960
- RF cohens kappa score: 0.959
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 2, 11
- GB f1 score: 0.917
- GB cohens kappa score: 0.914
- -> test with 'KNN'
- KNN tn, fp: 322, 11
- KNN fn, tp: 0, 13
- KNN f1 score: 0.703
- KNN cohens kappa score: 0.687
- ------ 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.71it/s]
20%|██ | 2/10 [00:01<00:04, 1.78it/s]
30%|███ | 3/10 [00:01<00:04, 1.69it/s]
40%|████ | 4/10 [00:02<00:03, 1.59it/s]
50%|█████ | 5/10 [00:03<00:03, 1.65it/s]
60%|██████ | 6/10 [00:03<00:02, 1.62it/s]
70%|███████ | 7/10 [00:04<00:01, 1.66it/s]
80%|████████ | 8/10 [00:04<00:01, 1.71it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.76it/s]
100%|██████████| 10/10 [00:06<00:00, 1.61it/s]
100%|██████████| 10/10 [00:06<00:00, 1.66it/s]
- -> create 1280 synthetic samples
- -> test with 'LR'
- LR tn, fp: 318, 13
- LR fn, tp: 4, 9
- LR f1 score: 0.514
- LR cohens kappa score: 0.490
- LR average precision score: 0.434
- -> test with 'RF'
- RF tn, fp: 331, 0
- RF fn, tp: 1, 12
- RF f1 score: 0.960
- RF cohens kappa score: 0.958
- -> test with 'GB'
- GB tn, fp: 331, 0
- GB fn, tp: 0, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 326, 5
- KNN fn, tp: 6, 7
- KNN f1 score: 0.560
- KNN cohens kappa score: 0.543
- ====== 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.32it/s]
20%|██ | 2/10 [00:01<00:05, 1.53it/s]
30%|███ | 3/10 [00:01<00:04, 1.59it/s]
40%|████ | 4/10 [00:02<00:03, 1.50it/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.72it/s]
80%|████████ | 8/10 [00:04<00:01, 1.68it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.63it/s]
100%|██████████| 10/10 [00:06<00:00, 1.67it/s]
100%|██████████| 10/10 [00:06<00:00, 1.62it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 286, 47
- LR fn, tp: 0, 13
- LR f1 score: 0.356
- LR cohens kappa score: 0.314
- LR average precision score: 0.312
- -> test with 'RF'
- RF tn, fp: 332, 1
- RF fn, tp: 3, 10
- RF f1 score: 0.833
- RF cohens kappa score: 0.827
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 1, 12
- GB f1 score: 0.960
- GB cohens kappa score: 0.959
- -> test with 'KNN'
- KNN tn, fp: 320, 13
- KNN fn, tp: 1, 12
- KNN f1 score: 0.632
- KNN cohens kappa score: 0.612
- ------ 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:08, 1.05it/s]
20%|██ | 2/10 [00:01<00:06, 1.31it/s]
30%|███ | 3/10 [00:02<00:05, 1.31it/s]
40%|████ | 4/10 [00:03<00:04, 1.39it/s]
50%|█████ | 5/10 [00:03<00:03, 1.43it/s]
60%|██████ | 6/10 [00:04<00:02, 1.54it/s]
70%|███████ | 7/10 [00:04<00:01, 1.62it/s]
80%|████████ | 8/10 [00:05<00:01, 1.67it/s]
90%|█████████ | 9/10 [00:06<00:00, 1.51it/s]
100%|██████████| 10/10 [00:06<00:00, 1.60it/s]
100%|██████████| 10/10 [00:06<00:00, 1.50it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 291, 42
- LR fn, tp: 0, 13
- LR f1 score: 0.382
- LR cohens kappa score: 0.342
- LR average precision score: 0.397
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 2, 11
- RF f1 score: 0.917
- RF cohens kappa score: 0.914
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 0, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 318, 15
- KNN fn, tp: 1, 12
- KNN f1 score: 0.600
- KNN cohens kappa score: 0.579
- ------ 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:05, 1.56it/s]
20%|██ | 2/10 [00:01<00:05, 1.60it/s]
30%|███ | 3/10 [00:01<00:04, 1.65it/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.64it/s]
70%|███████ | 7/10 [00:04<00:01, 1.68it/s]
80%|████████ | 8/10 [00:04<00:01, 1.72it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.75it/s]
100%|██████████| 10/10 [00:05<00:00, 1.66it/s]
100%|██████████| 10/10 [00:05<00:00, 1.67it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 297, 36
- LR fn, tp: 2, 11
- LR f1 score: 0.367
- LR cohens kappa score: 0.327
- LR average precision score: 0.327
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 1, 12
- RF f1 score: 0.960
- RF cohens kappa score: 0.959
- -> test with 'GB'
- GB tn, fp: 331, 2
- GB fn, tp: 0, 13
- GB f1 score: 0.929
- GB cohens kappa score: 0.926
- -> test with 'KNN'
- KNN tn, fp: 307, 26
- KNN fn, tp: 0, 13
- KNN f1 score: 0.500
- KNN cohens kappa score: 0.470
- ------ 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.56it/s]
20%|██ | 2/10 [00:01<00:05, 1.53it/s]
30%|███ | 3/10 [00:01<00:04, 1.63it/s]
40%|████ | 4/10 [00:02<00:03, 1.69it/s]
50%|█████ | 5/10 [00:03<00:02, 1.67it/s]
60%|██████ | 6/10 [00:03<00:02, 1.65it/s]
70%|███████ | 7/10 [00:04<00:01, 1.63it/s]
80%|████████ | 8/10 [00:05<00:01, 1.53it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.56it/s]
100%|██████████| 10/10 [00:06<00:00, 1.60it/s]
100%|██████████| 10/10 [00:06<00:00, 1.61it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 294, 39
- LR fn, tp: 1, 12
- LR f1 score: 0.375
- LR cohens kappa score: 0.335
- LR average precision score: 0.332
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 0, 13
- RF f1 score: 1.000
- RF cohens kappa score: 1.000
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 0, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 318, 15
- KNN fn, tp: 2, 11
- KNN f1 score: 0.564
- KNN cohens kappa score: 0.541
- ------ 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.78it/s]
20%|██ | 2/10 [00:01<00:05, 1.59it/s]
30%|███ | 3/10 [00:01<00:04, 1.63it/s]
40%|████ | 4/10 [00:02<00:03, 1.50it/s]
50%|█████ | 5/10 [00:03<00:03, 1.52it/s]
60%|██████ | 6/10 [00:03<00:02, 1.47it/s]
70%|███████ | 7/10 [00:04<00:02, 1.30it/s]
80%|████████ | 8/10 [00:06<00:01, 1.00it/s]
90%|█████████ | 9/10 [00:07<00:00, 1.10it/s]
100%|██████████| 10/10 [00:07<00:00, 1.19it/s]
100%|██████████| 10/10 [00:07<00:00, 1.28it/s]
- -> create 1280 synthetic samples
- -> test with 'LR'
- LR tn, fp: 317, 14
- LR fn, tp: 8, 5
- LR f1 score: 0.312
- LR cohens kappa score: 0.280
- LR average precision score: 0.370
- -> test with 'RF'
- RF tn, fp: 331, 0
- RF fn, tp: 2, 11
- RF f1 score: 0.917
- RF cohens kappa score: 0.914
- -> test with 'GB'
- GB tn, fp: 331, 0
- GB fn, tp: 1, 12
- GB f1 score: 0.960
- GB cohens kappa score: 0.958
- -> test with 'KNN'
- KNN tn, fp: 320, 11
- KNN fn, tp: 0, 13
- KNN f1 score: 0.703
- KNN cohens kappa score: 0.687
- ====== 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.76it/s]
20%|██ | 2/10 [00:01<00:04, 1.74it/s]
30%|███ | 3/10 [00:01<00:03, 1.77it/s]
40%|████ | 4/10 [00:02<00:03, 1.62it/s]
50%|█████ | 5/10 [00:03<00:03, 1.63it/s]
60%|██████ | 6/10 [00:03<00:02, 1.69it/s]
70%|███████ | 7/10 [00:04<00:01, 1.73it/s]
80%|████████ | 8/10 [00:04<00:01, 1.64it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.67it/s]
100%|██████████| 10/10 [00:05<00:00, 1.71it/s]
100%|██████████| 10/10 [00:05<00:00, 1.69it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 318, 15
- LR fn, tp: 5, 8
- LR f1 score: 0.444
- LR cohens kappa score: 0.416
- LR average precision score: 0.355
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 0, 13
- RF f1 score: 1.000
- RF cohens kappa score: 1.000
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 0, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 315, 18
- KNN fn, tp: 1, 12
- KNN f1 score: 0.558
- KNN cohens kappa score: 0.534
- ------ 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:05, 1.73it/s]
20%|██ | 2/10 [00:01<00:04, 1.79it/s]
30%|███ | 3/10 [00:01<00:04, 1.72it/s]
40%|████ | 4/10 [00:02<00:03, 1.74it/s]
50%|█████ | 5/10 [00:02<00:02, 1.78it/s]
60%|██████ | 6/10 [00:03<00:02, 1.58it/s]
70%|███████ | 7/10 [00:04<00:01, 1.62it/s]
80%|████████ | 8/10 [00:04<00:01, 1.64it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.58it/s]
100%|██████████| 10/10 [00:06<00:00, 1.38it/s]
100%|██████████| 10/10 [00:06<00:00, 1.56it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 303, 30
- LR fn, tp: 1, 12
- LR f1 score: 0.436
- LR cohens kappa score: 0.402
- LR average precision score: 0.506
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 1, 12
- RF f1 score: 0.960
- RF cohens kappa score: 0.959
- -> test with 'GB'
- GB tn, fp: 332, 1
- GB fn, tp: 0, 13
- GB f1 score: 0.963
- GB cohens kappa score: 0.961
- -> test with 'KNN'
- KNN tn, fp: 316, 17
- KNN fn, tp: 0, 13
- KNN f1 score: 0.605
- KNN cohens kappa score: 0.583
- ------ 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:05, 1.60it/s]
20%|██ | 2/10 [00:01<00:04, 1.68it/s]
30%|███ | 3/10 [00:01<00:04, 1.56it/s]
40%|████ | 4/10 [00:02<00:03, 1.52it/s]
50%|█████ | 5/10 [00:03<00:03, 1.61it/s]
60%|██████ | 6/10 [00:03<00:02, 1.58it/s]
70%|███████ | 7/10 [00:04<00:01, 1.63it/s]
80%|████████ | 8/10 [00:04<00:01, 1.67it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.69it/s]
100%|██████████| 10/10 [00:06<00:00, 1.49it/s]
100%|██████████| 10/10 [00:06<00:00, 1.57it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 272, 61
- LR fn, tp: 0, 13
- LR f1 score: 0.299
- LR cohens kappa score: 0.251
- LR average precision score: 0.316
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 0, 13
- RF f1 score: 1.000
- RF cohens kappa score: 1.000
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 0, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 328, 5
- KNN fn, tp: 0, 13
- KNN f1 score: 0.839
- KNN cohens kappa score: 0.831
- ------ 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.73it/s]
20%|██ | 2/10 [00:01<00:04, 1.72it/s]
30%|███ | 3/10 [00:02<00:05, 1.30it/s]
40%|████ | 4/10 [00:02<00:04, 1.43it/s]
50%|█████ | 5/10 [00:03<00:03, 1.48it/s]
60%|██████ | 6/10 [00:04<00:03, 1.30it/s]
70%|███████ | 7/10 [00:05<00:02, 1.05it/s]
80%|████████ | 8/10 [00:06<00:02, 1.04s/it]
90%|█████████ | 9/10 [00:07<00:00, 1.06it/s]
100%|██████████| 10/10 [00:08<00:00, 1.05it/s]
100%|██████████| 10/10 [00:08<00:00, 1.16it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 313, 20
- LR fn, tp: 3, 10
- LR f1 score: 0.465
- LR cohens kappa score: 0.436
- LR average precision score: 0.288
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 2, 11
- RF f1 score: 0.917
- RF cohens kappa score: 0.914
- -> test with 'GB'
- GB tn, fp: 332, 1
- GB fn, tp: 0, 13
- GB f1 score: 0.963
- GB cohens kappa score: 0.961
- -> test with 'KNN'
- KNN tn, fp: 318, 15
- KNN fn, tp: 0, 13
- KNN f1 score: 0.634
- KNN cohens kappa score: 0.614
- ------ 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:07, 1.14it/s]
20%|██ | 2/10 [00:01<00:05, 1.44it/s]
30%|███ | 3/10 [00:02<00:04, 1.54it/s]
40%|████ | 4/10 [00:02<00:03, 1.51it/s]
50%|█████ | 5/10 [00:03<00:03, 1.57it/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:05<00:01, 1.56it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.65it/s]
100%|██████████| 10/10 [00:06<00:00, 1.69it/s]
100%|██████████| 10/10 [00:06<00:00, 1.60it/s]
- -> create 1280 synthetic samples
- -> test with 'LR'
- LR tn, fp: 284, 47
- LR fn, tp: 0, 13
- LR f1 score: 0.356
- LR cohens kappa score: 0.314
- LR average precision score: 0.335
- -> test with 'RF'
- RF tn, fp: 331, 0
- RF fn, tp: 2, 11
- RF f1 score: 0.917
- RF cohens kappa score: 0.914
- -> test with 'GB'
- GB tn, fp: 331, 0
- GB fn, tp: 0, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 312, 19
- KNN fn, tp: 1, 12
- KNN f1 score: 0.545
- KNN cohens kappa score: 0.520
- ====== 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.38it/s]
20%|██ | 2/10 [00:01<00:05, 1.46it/s]
30%|███ | 3/10 [00:01<00:04, 1.58it/s]
40%|████ | 4/10 [00:02<00:03, 1.63it/s]
50%|█████ | 5/10 [00:03<00:03, 1.59it/s]
60%|██████ | 6/10 [00:03<00:02, 1.61it/s]
70%|███████ | 7/10 [00:04<00:01, 1.64it/s]
80%|████████ | 8/10 [00:05<00:01, 1.61it/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.58it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 276, 57
- LR fn, tp: 0, 13
- LR f1 score: 0.313
- LR cohens kappa score: 0.267
- LR average precision score: 0.261
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 3, 10
- RF f1 score: 0.870
- RF cohens kappa score: 0.865
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 0, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 317, 16
- KNN fn, tp: 1, 12
- KNN f1 score: 0.585
- KNN cohens kappa score: 0.563
- ------ 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:04, 1.89it/s]
20%|██ | 2/10 [00:01<00:04, 1.87it/s]
30%|███ | 3/10 [00:01<00:03, 1.84it/s]
40%|████ | 4/10 [00:02<00:03, 1.85it/s]
50%|█████ | 5/10 [00:02<00:02, 1.85it/s]
60%|██████ | 6/10 [00:03<00:02, 1.86it/s]
70%|███████ | 7/10 [00:03<00:01, 1.79it/s]
80%|████████ | 8/10 [00:04<00:01, 1.77it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.79it/s]
100%|██████████| 10/10 [00:05<00:00, 1.80it/s]
100%|██████████| 10/10 [00:05<00:00, 1.82it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 281, 52
- LR fn, tp: 0, 13
- LR f1 score: 0.333
- LR cohens kappa score: 0.289
- LR average precision score: 0.331
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 3, 10
- RF f1 score: 0.870
- RF cohens kappa score: 0.865
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 0, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 323, 10
- KNN fn, tp: 0, 13
- KNN f1 score: 0.722
- KNN cohens kappa score: 0.708
- ------ 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:04, 1.97it/s]
20%|██ | 2/10 [00:00<00:03, 2.05it/s]
30%|███ | 3/10 [00:01<00:03, 2.02it/s]
40%|████ | 4/10 [00:01<00:02, 2.00it/s]
50%|█████ | 5/10 [00:02<00:02, 2.00it/s]
60%|██████ | 6/10 [00:03<00:02, 1.97it/s]
70%|███████ | 7/10 [00:03<00:01, 1.94it/s]
80%|████████ | 8/10 [00:04<00:01, 1.92it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.90it/s]
100%|██████████| 10/10 [00:05<00:00, 1.90it/s]
100%|██████████| 10/10 [00:05<00:00, 1.94it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 307, 26
- LR fn, tp: 3, 10
- LR f1 score: 0.408
- LR cohens kappa score: 0.374
- LR average precision score: 0.361
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 1, 12
- RF f1 score: 0.960
- RF cohens kappa score: 0.959
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 0, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- -> test with 'KNN'
- KNN tn, fp: 316, 17
- KNN fn, tp: 0, 13
- KNN f1 score: 0.605
- KNN cohens kappa score: 0.583
- ------ 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:04, 1.83it/s]
20%|██ | 2/10 [00:01<00:04, 1.92it/s]
30%|███ | 3/10 [00:01<00:03, 1.87it/s]
40%|████ | 4/10 [00:02<00:03, 1.78it/s]
50%|█████ | 5/10 [00:02<00:02, 1.75it/s]
60%|██████ | 6/10 [00:03<00:02, 1.75it/s]
70%|███████ | 7/10 [00:03<00:01, 1.72it/s]
80%|████████ | 8/10 [00:04<00:01, 1.75it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.81it/s]
100%|██████████| 10/10 [00:05<00:00, 1.81it/s]
100%|██████████| 10/10 [00:05<00:00, 1.79it/s]
- -> create 1278 synthetic samples
- -> test with 'LR'
- LR tn, fp: 314, 19
- LR fn, tp: 8, 5
- LR f1 score: 0.270
- LR cohens kappa score: 0.233
- LR average precision score: 0.289
- -> test with 'RF'
- RF tn, fp: 333, 0
- RF fn, tp: 1, 12
- RF f1 score: 0.960
- RF cohens kappa score: 0.959
- -> test with 'GB'
- GB tn, fp: 333, 0
- GB fn, tp: 1, 12
- GB f1 score: 0.960
- GB cohens kappa score: 0.959
- -> test with 'KNN'
- KNN tn, fp: 317, 16
- KNN fn, tp: 0, 13
- KNN f1 score: 0.619
- KNN cohens kappa score: 0.598
- ------ 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:05, 1.74it/s]
20%|██ | 2/10 [00:01<00:04, 1.81it/s]
30%|███ | 3/10 [00:01<00:03, 1.81it/s]
40%|████ | 4/10 [00:02<00:03, 1.84it/s]
50%|█████ | 5/10 [00:02<00:02, 1.85it/s]
60%|██████ | 6/10 [00:03<00:02, 1.85it/s]
70%|███████ | 7/10 [00:03<00:01, 1.83it/s]
80%|████████ | 8/10 [00:04<00:01, 1.78it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.79it/s]
100%|██████████| 10/10 [00:05<00:00, 1.79it/s]
100%|██████████| 10/10 [00:05<00:00, 1.81it/s]
- -> create 1280 synthetic samples
- -> test with 'LR'
- LR tn, fp: 311, 20
- LR fn, tp: 3, 10
- LR f1 score: 0.465
- LR cohens kappa score: 0.435
- LR average precision score: 0.447
- -> test with 'RF'
- RF tn, fp: 331, 0
- RF fn, tp: 1, 12
- RF f1 score: 0.960
- RF cohens kappa score: 0.958
- -> test with 'GB'
- GB tn, fp: 329, 2
- GB fn, tp: 0, 13
- GB f1 score: 0.929
- GB cohens kappa score: 0.926
- -> test with 'KNN'
- KNN tn, fp: 318, 13
- KNN fn, tp: 0, 13
- KNN f1 score: 0.667
- KNN cohens kappa score: 0.649
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 318, 61
- LR fn, tp: 8, 13
- LR f1 score: 0.514
- LR cohens kappa score: 0.490
- LR average precision score: 0.506
- average:
- LR tn, fp: 299.6, 33.0
- LR fn, tp: 2.52, 10.48
- LR f1 score: 0.379
- LR cohens kappa score: 0.342
- LR average precision score: 0.348
- minimum:
- LR tn, fp: 272, 13
- LR fn, tp: 0, 5
- LR f1 score: 0.270
- LR cohens kappa score: 0.233
- LR average precision score: 0.259
- -----[ RF ]-----
- maximum:
- RF tn, fp: 333, 1
- RF fn, tp: 3, 13
- RF f1 score: 1.000
- RF cohens kappa score: 1.000
- average:
- RF tn, fp: 332.56, 0.04
- RF fn, tp: 1.32, 11.68
- RF f1 score: 0.944
- RF cohens kappa score: 0.942
- minimum:
- RF tn, fp: 331, 0
- RF fn, tp: 0, 10
- RF f1 score: 0.833
- RF cohens kappa score: 0.827
- -----[ GB ]-----
- maximum:
- GB tn, fp: 333, 2
- GB fn, tp: 2, 13
- GB f1 score: 1.000
- GB cohens kappa score: 1.000
- average:
- GB tn, fp: 332.2, 0.4
- GB fn, tp: 0.28, 12.72
- GB f1 score: 0.974
- GB cohens kappa score: 0.973
- minimum:
- GB tn, fp: 329, 0
- GB fn, tp: 0, 11
- GB f1 score: 0.917
- GB cohens kappa score: 0.914
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 328, 26
- KNN fn, tp: 6, 13
- KNN f1 score: 0.839
- KNN cohens kappa score: 0.831
- average:
- KNN tn, fp: 317.52, 15.08
- KNN fn, tp: 0.64, 12.36
- KNN f1 score: 0.618
- KNN cohens kappa score: 0.597
- minimum:
- KNN tn, fp: 307, 5
- KNN fn, tp: 0, 7
- KNN f1 score: 0.465
- KNN cohens kappa score: 0.436
|