| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898 |
- ///////////////////////////////////////////
- // Running CTAB-GAN on folding_abalone9-18
- ///////////////////////////////////////////
- Load 'data_input/folding_abalone9-18'
- 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.54it/s]
20%|██ | 2/10 [00:01<00:04, 1.71it/s]
30%|███ | 3/10 [00:01<00:04, 1.73it/s]
40%|████ | 4/10 [00:02<00:03, 1.77it/s]
50%|█████ | 5/10 [00:02<00:02, 1.72it/s]
60%|██████ | 6/10 [00:03<00:02, 1.79it/s]
70%|███████ | 7/10 [00:03<00:01, 1.84it/s]
80%|████████ | 8/10 [00:04<00:01, 1.60it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.67it/s]
100%|██████████| 10/10 [00:05<00:00, 1.63it/s]
100%|██████████| 10/10 [00:05<00:00, 1.68it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 124, 14
- LR fn, tp: 2, 7
- LR f1 score: 0.467
- LR cohens kappa score: 0.417
- LR average precision score: 0.666
- -> test with 'RF'
- RF tn, fp: 137, 1
- RF fn, tp: 7, 2
- RF f1 score: 0.333
- RF cohens kappa score: 0.312
- -> test with 'GB'
- GB tn, fp: 136, 2
- GB fn, tp: 4, 5
- GB f1 score: 0.625
- GB cohens kappa score: 0.604
- -> test with 'KNN'
- KNN tn, fp: 137, 1
- KNN fn, tp: 8, 1
- KNN f1 score: 0.182
- KNN cohens kappa score: 0.163
- ------ 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.68it/s]
20%|██ | 2/10 [00:01<00:04, 1.64it/s]
30%|███ | 3/10 [00:01<00:04, 1.61it/s]
40%|████ | 4/10 [00:02<00:03, 1.66it/s]
50%|█████ | 5/10 [00:03<00:02, 1.67it/s]
60%|██████ | 6/10 [00:03<00:02, 1.71it/s]
70%|███████ | 7/10 [00:04<00:01, 1.59it/s]
80%|████████ | 8/10 [00:04<00:01, 1.68it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.78it/s]
100%|██████████| 10/10 [00:05<00:00, 1.85it/s]
100%|██████████| 10/10 [00:05<00:00, 1.73it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 136, 2
- LR fn, tp: 4, 5
- LR f1 score: 0.625
- LR cohens kappa score: 0.604
- LR average precision score: 0.546
- -> test with 'RF'
- RF tn, fp: 136, 2
- RF fn, tp: 7, 2
- RF f1 score: 0.308
- RF cohens kappa score: 0.281
- -> test with 'GB'
- GB tn, fp: 135, 3
- GB fn, tp: 7, 2
- GB f1 score: 0.286
- GB cohens kappa score: 0.253
- -> test with 'KNN'
- KNN tn, fp: 136, 2
- KNN fn, tp: 8, 1
- KNN f1 score: 0.167
- KNN cohens kappa score: 0.140
- ------ 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.70it/s]
20%|██ | 2/10 [00:01<00:04, 1.65it/s]
30%|███ | 3/10 [00:01<00:04, 1.67it/s]
40%|████ | 4/10 [00:02<00:03, 1.59it/s]
50%|█████ | 5/10 [00:03<00:03, 1.55it/s]
60%|██████ | 6/10 [00:03<00:02, 1.56it/s]
70%|███████ | 7/10 [00:04<00:01, 1.53it/s]
80%|████████ | 8/10 [00:05<00:01, 1.61it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.60it/s]
100%|██████████| 10/10 [00:06<00:00, 1.57it/s]
100%|██████████| 10/10 [00:06<00:00, 1.58it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 129, 9
- LR fn, tp: 2, 7
- LR f1 score: 0.560
- LR cohens kappa score: 0.523
- LR average precision score: 0.637
- -> test with 'RF'
- RF tn, fp: 137, 1
- RF fn, tp: 7, 2
- RF f1 score: 0.333
- RF cohens kappa score: 0.312
- -> test with 'GB'
- GB tn, fp: 134, 4
- GB fn, tp: 6, 3
- GB f1 score: 0.375
- GB cohens kappa score: 0.340
- -> test with 'KNN'
- KNN tn, fp: 138, 0
- KNN fn, tp: 8, 1
- KNN f1 score: 0.200
- KNN cohens kappa score: 0.190
- ------ 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:06, 1.32it/s]
20%|██ | 2/10 [00:01<00:05, 1.41it/s]
30%|███ | 3/10 [00:02<00:04, 1.46it/s]
40%|████ | 4/10 [00:02<00:04, 1.40it/s]
50%|█████ | 5/10 [00:03<00:03, 1.42it/s]
60%|██████ | 6/10 [00:04<00:02, 1.52it/s]
70%|███████ | 7/10 [00:04<00:01, 1.58it/s]
80%|████████ | 8/10 [00:05<00:01, 1.52it/s]
90%|█████████ | 9/10 [00:06<00:00, 1.55it/s]
100%|██████████| 10/10 [00:06<00:00, 1.58it/s]
100%|██████████| 10/10 [00:06<00:00, 1.51it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 131, 7
- LR fn, tp: 2, 7
- LR f1 score: 0.609
- LR cohens kappa score: 0.577
- LR average precision score: 0.729
- -> test with 'RF'
- RF tn, fp: 138, 0
- RF fn, tp: 7, 2
- RF f1 score: 0.364
- RF cohens kappa score: 0.349
- -> test with 'GB'
- GB tn, fp: 136, 2
- GB fn, tp: 6, 3
- GB f1 score: 0.429
- GB cohens kappa score: 0.402
- -> test with 'KNN'
- KNN tn, fp: 137, 1
- KNN fn, tp: 9, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.012
- ------ 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:04, 1.92it/s]
20%|██ | 2/10 [00:01<00:05, 1.54it/s]
30%|███ | 3/10 [00:01<00:04, 1.61it/s]
40%|████ | 4/10 [00:02<00:03, 1.67it/s]
50%|█████ | 5/10 [00:03<00:03, 1.56it/s]
60%|██████ | 6/10 [00:03<00:02, 1.61it/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.40it/s]
100%|██████████| 10/10 [00:06<00:00, 1.35it/s]
100%|██████████| 10/10 [00:06<00:00, 1.51it/s]
- -> create 516 synthetic samples
- -> test with 'LR'
- LR tn, fp: 123, 14
- LR fn, tp: 3, 3
- LR f1 score: 0.261
- LR cohens kappa score: 0.212
- LR average precision score: 0.458
- -> test with 'RF'
- RF tn, fp: 135, 2
- RF fn, tp: 6, 0
- RF f1 score: 0.000
- RF cohens kappa score: -0.021
- -> test with 'GB'
- GB tn, fp: 134, 3
- GB fn, tp: 5, 1
- GB f1 score: 0.200
- GB cohens kappa score: 0.172
- -> test with 'KNN'
- KNN tn, fp: 133, 4
- KNN fn, tp: 6, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.035
- ====== 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:05, 1.64it/s]
20%|██ | 2/10 [00:01<00:04, 1.81it/s]
30%|███ | 3/10 [00:01<00:03, 1.87it/s]
40%|████ | 4/10 [00:02<00:03, 1.84it/s]
50%|█████ | 5/10 [00:02<00:03, 1.58it/s]
60%|██████ | 6/10 [00:03<00:02, 1.59it/s]
70%|███████ | 7/10 [00:04<00:01, 1.61it/s]
80%|████████ | 8/10 [00:04<00:01, 1.60it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.55it/s]
100%|██████████| 10/10 [00:06<00:00, 1.57it/s]
100%|██████████| 10/10 [00:06<00:00, 1.63it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 125, 13
- LR fn, tp: 2, 7
- LR f1 score: 0.483
- LR cohens kappa score: 0.435
- LR average precision score: 0.726
- -> test with 'RF'
- RF tn, fp: 137, 1
- RF fn, tp: 9, 0
- RF f1 score: 0.000
- RF cohens kappa score: -0.012
- -> test with 'GB'
- GB tn, fp: 135, 3
- GB fn, tp: 7, 2
- GB f1 score: 0.286
- GB cohens kappa score: 0.253
- -> test with 'KNN'
- KNN tn, fp: 138, 0
- KNN fn, tp: 8, 1
- KNN f1 score: 0.200
- KNN cohens kappa score: 0.190
- ------ 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.71it/s]
20%|██ | 2/10 [00:01<00:04, 1.72it/s]
30%|███ | 3/10 [00:01<00:04, 1.56it/s]
40%|████ | 4/10 [00:02<00:03, 1.59it/s]
50%|█████ | 5/10 [00:02<00:02, 1.71it/s]
60%|██████ | 6/10 [00:03<00:02, 1.81it/s]
70%|███████ | 7/10 [00:04<00:01, 1.55it/s]
80%|████████ | 8/10 [00:04<00:01, 1.57it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.65it/s]
100%|██████████| 10/10 [00:06<00:00, 1.62it/s]
100%|██████████| 10/10 [00:06<00:00, 1.63it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 132, 6
- LR fn, tp: 3, 6
- LR f1 score: 0.571
- LR cohens kappa score: 0.539
- LR average precision score: 0.594
- -> test with 'RF'
- RF tn, fp: 137, 1
- RF fn, tp: 7, 2
- RF f1 score: 0.333
- RF cohens kappa score: 0.312
- -> test with 'GB'
- GB tn, fp: 133, 5
- GB fn, tp: 6, 3
- GB f1 score: 0.353
- GB cohens kappa score: 0.313
- -> test with 'KNN'
- KNN tn, fp: 137, 1
- KNN fn, tp: 7, 2
- KNN f1 score: 0.333
- KNN cohens kappa score: 0.312
- ------ 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:04, 1.80it/s]
20%|██ | 2/10 [00:01<00:04, 1.66it/s]
30%|███ | 3/10 [00:01<00:04, 1.70it/s]
40%|████ | 4/10 [00:02<00:04, 1.43it/s]
50%|█████ | 5/10 [00:03<00:03, 1.47it/s]
60%|██████ | 6/10 [00:03<00:02, 1.58it/s]
70%|███████ | 7/10 [00:04<00:01, 1.67it/s]
80%|████████ | 8/10 [00:05<00:01, 1.62it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.54it/s]
100%|██████████| 10/10 [00:06<00:00, 1.48it/s]
100%|██████████| 10/10 [00:06<00:00, 1.55it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 131, 7
- LR fn, tp: 3, 6
- LR f1 score: 0.545
- LR cohens kappa score: 0.510
- LR average precision score: 0.532
- -> test with 'RF'
- RF tn, fp: 135, 3
- RF fn, tp: 8, 1
- RF f1 score: 0.154
- RF cohens kappa score: 0.121
- -> test with 'GB'
- GB tn, fp: 133, 5
- GB fn, tp: 5, 4
- GB f1 score: 0.444
- GB cohens kappa score: 0.408
- -> test with 'KNN'
- KNN tn, fp: 138, 0
- KNN fn, tp: 9, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ------ 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.59it/s]
20%|██ | 2/10 [00:01<00:05, 1.56it/s]
30%|███ | 3/10 [00:01<00:04, 1.58it/s]
40%|████ | 4/10 [00:02<00:03, 1.53it/s]
50%|█████ | 5/10 [00:03<00:03, 1.52it/s]
60%|██████ | 6/10 [00:03<00:02, 1.57it/s]
70%|███████ | 7/10 [00:04<00:01, 1.55it/s]
80%|████████ | 8/10 [00:04<00:01, 1.68it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.74it/s]
100%|██████████| 10/10 [00:06<00:00, 1.62it/s]
100%|██████████| 10/10 [00:06<00:00, 1.60it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 126, 12
- LR fn, tp: 1, 8
- LR f1 score: 0.552
- LR cohens kappa score: 0.510
- LR average precision score: 0.720
- -> test with 'RF'
- RF tn, fp: 137, 1
- RF fn, tp: 6, 3
- RF f1 score: 0.462
- RF cohens kappa score: 0.440
- -> test with 'GB'
- GB tn, fp: 136, 2
- GB fn, tp: 5, 4
- GB f1 score: 0.533
- GB cohens kappa score: 0.509
- -> test with 'KNN'
- KNN tn, fp: 136, 2
- KNN fn, tp: 8, 1
- KNN f1 score: 0.167
- KNN cohens kappa score: 0.140
- ------ 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.62it/s]
20%|██ | 2/10 [00:01<00:04, 1.73it/s]
30%|███ | 3/10 [00:01<00:03, 1.78it/s]
40%|████ | 4/10 [00:02<00:03, 1.67it/s]
50%|█████ | 5/10 [00:03<00:03, 1.63it/s]
60%|██████ | 6/10 [00:03<00:02, 1.67it/s]
70%|███████ | 7/10 [00:04<00:01, 1.69it/s]
80%|████████ | 8/10 [00:04<00:01, 1.71it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.56it/s]
100%|██████████| 10/10 [00:05<00:00, 1.67it/s]
100%|██████████| 10/10 [00:05<00:00, 1.67it/s]
- -> create 516 synthetic samples
- -> test with 'LR'
- LR tn, fp: 132, 5
- LR fn, tp: 2, 4
- LR f1 score: 0.533
- LR cohens kappa score: 0.509
- LR average precision score: 0.648
- -> test with 'RF'
- RF tn, fp: 136, 1
- RF fn, tp: 4, 2
- RF f1 score: 0.444
- RF cohens kappa score: 0.428
- -> test with 'GB'
- GB tn, fp: 134, 3
- GB fn, tp: 3, 3
- GB f1 score: 0.500
- GB cohens kappa score: 0.478
- -> test with 'KNN'
- KNN tn, fp: 137, 0
- KNN fn, tp: 6, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ====== 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:04, 1.81it/s]
20%|██ | 2/10 [00:01<00:04, 1.80it/s]
30%|███ | 3/10 [00:01<00:04, 1.74it/s]
40%|████ | 4/10 [00:02<00:03, 1.75it/s]
50%|█████ | 5/10 [00:02<00:02, 1.67it/s]
60%|██████ | 6/10 [00:03<00:02, 1.68it/s]
70%|███████ | 7/10 [00:04<00:01, 1.69it/s]
80%|████████ | 8/10 [00:04<00:01, 1.64it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.66it/s]
100%|██████████| 10/10 [00:05<00:00, 1.64it/s]
100%|██████████| 10/10 [00:05<00:00, 1.68it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 127, 11
- LR fn, tp: 3, 6
- LR f1 score: 0.462
- LR cohens kappa score: 0.415
- LR average precision score: 0.398
- -> test with 'RF'
- RF tn, fp: 136, 2
- RF fn, tp: 9, 0
- RF f1 score: 0.000
- RF cohens kappa score: -0.023
- -> test with 'GB'
- GB tn, fp: 134, 4
- GB fn, tp: 7, 2
- GB f1 score: 0.267
- GB cohens kappa score: 0.229
- -> test with 'KNN'
- KNN tn, fp: 138, 0
- KNN fn, tp: 9, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ------ 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:04, 2.04it/s]
20%|██ | 2/10 [00:01<00:04, 1.74it/s]
30%|███ | 3/10 [00:01<00:04, 1.57it/s]
40%|████ | 4/10 [00:02<00:03, 1.53it/s]
50%|█████ | 5/10 [00:03<00:03, 1.47it/s]
60%|██████ | 6/10 [00:03<00:02, 1.57it/s]
70%|███████ | 7/10 [00:04<00:01, 1.62it/s]
80%|████████ | 8/10 [00:05<00:01, 1.53it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.61it/s]
100%|██████████| 10/10 [00:06<00:00, 1.55it/s]
100%|██████████| 10/10 [00:06<00:00, 1.57it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 131, 7
- LR fn, tp: 0, 9
- LR f1 score: 0.720
- LR cohens kappa score: 0.696
- LR average precision score: 0.707
- -> test with 'RF'
- RF tn, fp: 138, 0
- RF fn, tp: 9, 0
- RF f1 score: 0.000
- RF cohens kappa score: 0.000
- -> test with 'GB'
- GB tn, fp: 138, 0
- GB fn, tp: 8, 1
- GB f1 score: 0.200
- GB cohens kappa score: 0.190
- -> test with 'KNN'
- KNN tn, fp: 137, 1
- KNN fn, tp: 9, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.012
- ------ 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.57it/s]
20%|██ | 2/10 [00:01<00:04, 1.76it/s]
30%|███ | 3/10 [00:01<00:04, 1.68it/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.55it/s]
70%|███████ | 7/10 [00:04<00:01, 1.57it/s]
80%|████████ | 8/10 [00:04<00:01, 1.63it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.66it/s]
100%|██████████| 10/10 [00:06<00:00, 1.68it/s]
100%|██████████| 10/10 [00:06<00:00, 1.64it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 129, 9
- LR fn, tp: 4, 5
- LR f1 score: 0.435
- LR cohens kappa score: 0.389
- LR average precision score: 0.557
- -> test with 'RF'
- RF tn, fp: 137, 1
- RF fn, tp: 7, 2
- RF f1 score: 0.333
- RF cohens kappa score: 0.312
- -> test with 'GB'
- GB tn, fp: 136, 2
- GB fn, tp: 7, 2
- GB f1 score: 0.308
- GB cohens kappa score: 0.281
- -> test with 'KNN'
- KNN tn, fp: 135, 3
- KNN fn, tp: 8, 1
- KNN f1 score: 0.154
- KNN cohens kappa score: 0.121
- ------ 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.58it/s]
30%|███ | 3/10 [00:01<00:04, 1.54it/s]
40%|████ | 4/10 [00:02<00:03, 1.70it/s]
50%|█████ | 5/10 [00:02<00:02, 1.81it/s]
60%|██████ | 6/10 [00:03<00:02, 1.76it/s]
70%|███████ | 7/10 [00:04<00:01, 1.63it/s]
80%|████████ | 8/10 [00:04<00:01, 1.63it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.66it/s]
100%|██████████| 10/10 [00:06<00:00, 1.65it/s]
100%|██████████| 10/10 [00:06<00:00, 1.66it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 129, 9
- LR fn, tp: 2, 7
- LR f1 score: 0.560
- LR cohens kappa score: 0.523
- LR average precision score: 0.724
- -> test with 'RF'
- RF tn, fp: 137, 1
- RF fn, tp: 7, 2
- RF f1 score: 0.333
- RF cohens kappa score: 0.312
- -> test with 'GB'
- GB tn, fp: 135, 3
- GB fn, tp: 5, 4
- GB f1 score: 0.500
- GB cohens kappa score: 0.472
- -> test with 'KNN'
- KNN tn, fp: 137, 1
- KNN fn, tp: 6, 3
- KNN f1 score: 0.462
- KNN cohens kappa score: 0.440
- ------ 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:04, 1.81it/s]
20%|██ | 2/10 [00:01<00:04, 1.68it/s]
30%|███ | 3/10 [00:01<00:04, 1.71it/s]
40%|████ | 4/10 [00:02<00:03, 1.67it/s]
50%|█████ | 5/10 [00:03<00:03, 1.54it/s]
60%|██████ | 6/10 [00:03<00:02, 1.64it/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.58it/s]
100%|██████████| 10/10 [00:06<00:00, 1.63it/s]
100%|██████████| 10/10 [00:06<00:00, 1.65it/s]
- -> create 516 synthetic samples
- -> test with 'LR'
- LR tn, fp: 127, 10
- LR fn, tp: 2, 4
- LR f1 score: 0.400
- LR cohens kappa score: 0.363
- LR average precision score: 0.610
- -> test with 'RF'
- RF tn, fp: 136, 1
- RF fn, tp: 5, 1
- RF f1 score: 0.250
- RF cohens kappa score: 0.234
- -> test with 'GB'
- GB tn, fp: 135, 2
- GB fn, tp: 4, 2
- GB f1 score: 0.400
- GB cohens kappa score: 0.379
- -> test with 'KNN'
- KNN tn, fp: 137, 0
- KNN fn, tp: 6, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ====== 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.51it/s]
20%|██ | 2/10 [00:01<00:05, 1.56it/s]
30%|███ | 3/10 [00:01<00:04, 1.60it/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.68it/s]
70%|███████ | 7/10 [00:04<00:01, 1.71it/s]
80%|████████ | 8/10 [00:04<00:01, 1.68it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.77it/s]
100%|██████████| 10/10 [00:05<00:00, 1.86it/s]
100%|██████████| 10/10 [00:05<00:00, 1.72it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 129, 9
- LR fn, tp: 4, 5
- LR f1 score: 0.435
- LR cohens kappa score: 0.389
- LR average precision score: 0.624
- -> test with 'RF'
- RF tn, fp: 137, 1
- RF fn, tp: 6, 3
- RF f1 score: 0.462
- RF cohens kappa score: 0.440
- -> test with 'GB'
- GB tn, fp: 134, 4
- GB fn, tp: 5, 4
- GB f1 score: 0.471
- GB cohens kappa score: 0.438
- -> test with 'KNN'
- KNN tn, fp: 138, 0
- KNN fn, tp: 7, 2
- KNN f1 score: 0.364
- KNN cohens kappa score: 0.349
- ------ 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.31it/s]
20%|██ | 2/10 [00:01<00:05, 1.47it/s]
30%|███ | 3/10 [00:01<00:04, 1.55it/s]
40%|████ | 4/10 [00:02<00:03, 1.50it/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.69it/s]
80%|████████ | 8/10 [00:05<00:01, 1.65it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.61it/s]
100%|██████████| 10/10 [00:06<00:00, 1.63it/s]
100%|██████████| 10/10 [00:06<00:00, 1.60it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 122, 16
- LR fn, tp: 3, 6
- LR f1 score: 0.387
- LR cohens kappa score: 0.329
- LR average precision score: 0.632
- -> test with 'RF'
- RF tn, fp: 135, 3
- RF fn, tp: 6, 3
- RF f1 score: 0.400
- RF cohens kappa score: 0.369
- -> test with 'GB'
- GB tn, fp: 132, 6
- GB fn, tp: 5, 4
- GB f1 score: 0.421
- GB cohens kappa score: 0.381
- -> test with 'KNN'
- KNN tn, fp: 138, 0
- KNN fn, tp: 9, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ------ 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.43it/s]
20%|██ | 2/10 [00:01<00:05, 1.35it/s]
30%|███ | 3/10 [00:02<00:05, 1.31it/s]
40%|████ | 4/10 [00:03<00:04, 1.28it/s]
50%|█████ | 5/10 [00:03<00:03, 1.28it/s]
60%|██████ | 6/10 [00:04<00:02, 1.37it/s]
70%|███████ | 7/10 [00:05<00:02, 1.38it/s]
80%|████████ | 8/10 [00:05<00:01, 1.46it/s]
90%|█████████ | 9/10 [00:06<00:00, 1.49it/s]
100%|██████████| 10/10 [00:07<00:00, 1.53it/s]
100%|██████████| 10/10 [00:07<00:00, 1.42it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 131, 7
- LR fn, tp: 2, 7
- LR f1 score: 0.609
- LR cohens kappa score: 0.577
- LR average precision score: 0.752
- -> test with 'RF'
- RF tn, fp: 138, 0
- RF fn, tp: 8, 1
- RF f1 score: 0.200
- RF cohens kappa score: 0.190
- -> test with 'GB'
- GB tn, fp: 135, 3
- GB fn, tp: 6, 3
- GB f1 score: 0.400
- GB cohens kappa score: 0.369
- -> test with 'KNN'
- KNN tn, fp: 138, 0
- KNN fn, tp: 9, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ------ 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.69it/s]
20%|██ | 2/10 [00:01<00:04, 1.89it/s]
30%|███ | 3/10 [00:01<00:03, 1.98it/s]
40%|████ | 4/10 [00:02<00:03, 1.67it/s]
50%|█████ | 5/10 [00:02<00:03, 1.64it/s]
60%|██████ | 6/10 [00:03<00:02, 1.59it/s]
70%|███████ | 7/10 [00:04<00:01, 1.61it/s]
80%|████████ | 8/10 [00:04<00:01, 1.67it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.43it/s]
100%|██████████| 10/10 [00:06<00:00, 1.38it/s]
100%|██████████| 10/10 [00:06<00:00, 1.55it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 134, 4
- LR fn, tp: 2, 7
- LR f1 score: 0.700
- LR cohens kappa score: 0.678
- LR average precision score: 0.780
- -> test with 'RF'
- RF tn, fp: 137, 1
- RF fn, tp: 8, 1
- RF f1 score: 0.182
- RF cohens kappa score: 0.163
- -> test with 'GB'
- GB tn, fp: 136, 2
- GB fn, tp: 6, 3
- GB f1 score: 0.429
- GB cohens kappa score: 0.402
- -> test with 'KNN'
- KNN tn, fp: 137, 1
- KNN fn, tp: 7, 2
- KNN f1 score: 0.333
- KNN cohens kappa score: 0.312
- ------ 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.23it/s]
20%|██ | 2/10 [00:01<00:06, 1.32it/s]
30%|███ | 3/10 [00:02<00:04, 1.45it/s]
40%|████ | 4/10 [00:02<00:04, 1.50it/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:05<00:02, 1.28it/s]
80%|████████ | 8/10 [00:06<00:01, 1.06it/s]
90%|█████████ | 9/10 [00:07<00:00, 1.03it/s]
100%|██████████| 10/10 [00:08<00:00, 1.07it/s]
100%|██████████| 10/10 [00:08<00:00, 1.22it/s]
- -> create 516 synthetic samples
- -> test with 'LR'
- LR tn, fp: 132, 5
- LR fn, tp: 1, 5
- LR f1 score: 0.625
- LR cohens kappa score: 0.604
- LR average precision score: 0.631
- -> test with 'RF'
- RF tn, fp: 137, 0
- RF fn, tp: 6, 0
- RF f1 score: 0.000
- RF cohens kappa score: 0.000
- -> test with 'GB'
- GB tn, fp: 136, 1
- GB fn, tp: 4, 2
- GB f1 score: 0.444
- GB cohens kappa score: 0.428
- -> test with 'KNN'
- KNN tn, fp: 136, 1
- KNN fn, tp: 5, 1
- KNN f1 score: 0.250
- KNN cohens kappa score: 0.234
- ====== 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.48it/s]
20%|██ | 2/10 [00:01<00:05, 1.46it/s]
30%|███ | 3/10 [00:02<00:06, 1.12it/s]
40%|████ | 4/10 [00:03<00:05, 1.20it/s]
50%|█████ | 5/10 [00:04<00:04, 1.24it/s]
60%|██████ | 6/10 [00:04<00:02, 1.36it/s]
70%|███████ | 7/10 [00:05<00:01, 1.52it/s]
80%|████████ | 8/10 [00:05<00:01, 1.66it/s]
90%|█████████ | 9/10 [00:06<00:00, 1.46it/s]
100%|██████████| 10/10 [00:07<00:00, 1.33it/s]
100%|██████████| 10/10 [00:07<00:00, 1.36it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 111, 27
- LR fn, tp: 1, 8
- LR f1 score: 0.364
- LR cohens kappa score: 0.295
- LR average precision score: 0.477
- -> test with 'RF'
- RF tn, fp: 138, 0
- RF fn, tp: 9, 0
- RF f1 score: 0.000
- RF cohens kappa score: 0.000
- -> test with 'GB'
- GB tn, fp: 135, 3
- GB fn, tp: 8, 1
- GB f1 score: 0.154
- GB cohens kappa score: 0.121
- -> test with 'KNN'
- KNN tn, fp: 138, 0
- KNN fn, tp: 9, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ------ 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:08, 1.01it/s]
20%|██ | 2/10 [00:01<00:07, 1.10it/s]
30%|███ | 3/10 [00:02<00:05, 1.33it/s]
40%|████ | 4/10 [00:03<00:04, 1.38it/s]
50%|█████ | 5/10 [00:03<00:03, 1.42it/s]
60%|██████ | 6/10 [00:04<00:02, 1.51it/s]
70%|███████ | 7/10 [00:04<00:01, 1.56it/s]
80%|████████ | 8/10 [00:05<00:01, 1.54it/s]
90%|█████████ | 9/10 [00:06<00:00, 1.56it/s]
100%|██████████| 10/10 [00:06<00:00, 1.67it/s]
100%|██████████| 10/10 [00:06<00:00, 1.49it/s]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 134, 4
- LR fn, tp: 4, 5
- LR f1 score: 0.556
- LR cohens kappa score: 0.527
- LR average precision score: 0.614
- -> test with 'RF'
- RF tn, fp: 138, 0
- RF fn, tp: 7, 2
- RF f1 score: 0.364
- RF cohens kappa score: 0.349
- -> test with 'GB'
- GB tn, fp: 136, 2
- GB fn, tp: 7, 2
- GB f1 score: 0.308
- GB cohens kappa score: 0.281
- -> test with 'KNN'
- KNN tn, fp: 138, 0
- KNN fn, tp: 8, 1
- KNN f1 score: 0.200
- KNN cohens kappa score: 0.190
- ------ 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:08, 1.07it/s]
20%|██ | 2/10 [00:01<00:07, 1.03it/s]
30%|███ | 3/10 [00:02<00:06, 1.03it/s]
40%|████ | 4/10 [00:03<00:06, 1.01s/it]
50%|█████ | 5/10 [00:05<00:05, 1.16s/it]
60%|██████ | 6/10 [00:15<00:16, 4.07s/it]
70%|███████ | 7/10 [00:16<00:09, 3.31s/it]
80%|████████ | 8/10 [00:18<00:05, 2.62s/it]
90%|█████████ | 9/10 [00:19<00:02, 2.17s/it]
100%|██████████| 10/10 [00:20<00:00, 1.90s/it]
100%|██████████| 10/10 [00:20<00:00, 2.05s/it]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 126, 12
- LR fn, tp: 5, 4
- LR f1 score: 0.320
- LR cohens kappa score: 0.262
- LR average precision score: 0.498
- -> test with 'RF'
- RF tn, fp: 136, 2
- RF fn, tp: 6, 3
- RF f1 score: 0.429
- RF cohens kappa score: 0.402
- -> test with 'GB'
- GB tn, fp: 135, 3
- GB fn, tp: 6, 3
- GB f1 score: 0.400
- GB cohens kappa score: 0.369
- -> test with 'KNN'
- KNN tn, fp: 138, 0
- KNN fn, tp: 9, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ------ 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.92it/s]
20%|██ | 2/10 [00:01<00:07, 1.14it/s]
30%|███ | 3/10 [00:02<00:07, 1.07s/it]
40%|████ | 4/10 [00:03<00:06, 1.05s/it]
50%|█████ | 5/10 [00:05<00:05, 1.08s/it]
60%|██████ | 6/10 [00:06<00:04, 1.20s/it]
70%|███████ | 7/10 [00:07<00:03, 1.23s/it]
80%|████████ | 8/10 [00:08<00:02, 1.20s/it]
90%|█████████ | 9/10 [00:10<00:01, 1.19s/it]
100%|██████████| 10/10 [00:11<00:00, 1.23s/it]
100%|██████████| 10/10 [00:11<00:00, 1.15s/it]
- -> create 518 synthetic samples
- -> test with 'LR'
- LR tn, fp: 132, 6
- LR fn, tp: 2, 7
- LR f1 score: 0.636
- LR cohens kappa score: 0.608
- LR average precision score: 0.751
- -> test with 'RF'
- RF tn, fp: 137, 1
- RF fn, tp: 8, 1
- RF f1 score: 0.182
- RF cohens kappa score: 0.163
- -> test with 'GB'
- GB tn, fp: 136, 2
- GB fn, tp: 5, 4
- GB f1 score: 0.533
- GB cohens kappa score: 0.509
- -> test with 'KNN'
- KNN tn, fp: 138, 0
- KNN fn, tp: 7, 2
- KNN f1 score: 0.364
- KNN cohens kappa score: 0.349
- ------ 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:04, 1.84it/s]
20%|██ | 2/10 [00:01<00:05, 1.48it/s]
30%|███ | 3/10 [00:02<00:05, 1.25it/s]
40%|████ | 4/10 [00:03<00:05, 1.09it/s]
50%|█████ | 5/10 [00:04<00:05, 1.05s/it]
60%|██████ | 6/10 [00:06<00:04, 1.16s/it]
70%|███████ | 7/10 [00:06<00:03, 1.10s/it]
80%|████████ | 8/10 [00:08<00:02, 1.21s/it]
90%|█████████ | 9/10 [00:09<00:01, 1.17s/it]
100%|██████████| 10/10 [00:10<00:00, 1.08s/it]
100%|██████████| 10/10 [00:10<00:00, 1.04s/it]
- -> create 516 synthetic samples
- -> test with 'LR'
- LR tn, fp: 131, 6
- LR fn, tp: 2, 4
- LR f1 score: 0.500
- LR cohens kappa score: 0.472
- LR average precision score: 0.706
- -> test with 'RF'
- RF tn, fp: 136, 1
- RF fn, tp: 4, 2
- RF f1 score: 0.444
- RF cohens kappa score: 0.428
- -> test with 'GB'
- GB tn, fp: 133, 4
- GB fn, tp: 3, 3
- GB f1 score: 0.462
- GB cohens kappa score: 0.436
- -> test with 'KNN'
- KNN tn, fp: 136, 1
- KNN fn, tp: 4, 2
- KNN f1 score: 0.444
- KNN cohens kappa score: 0.428
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 136, 27
- LR fn, tp: 5, 9
- LR f1 score: 0.720
- LR cohens kappa score: 0.696
- LR average precision score: 0.780
- average:
- LR tn, fp: 128.56, 9.24
- LR fn, tp: 2.44, 5.96
- LR f1 score: 0.517
- LR cohens kappa score: 0.479
- LR average precision score: 0.629
- minimum:
- LR tn, fp: 111, 2
- LR fn, tp: 0, 3
- LR f1 score: 0.261
- LR cohens kappa score: 0.212
- LR average precision score: 0.398
- -----[ RF ]-----
- maximum:
- RF tn, fp: 138, 3
- RF fn, tp: 9, 3
- RF f1 score: 0.462
- RF cohens kappa score: 0.440
- average:
- RF tn, fp: 136.72, 1.08
- RF fn, tp: 6.92, 1.48
- RF f1 score: 0.252
- RF cohens kappa score: 0.235
- minimum:
- RF tn, fp: 135, 0
- RF fn, tp: 4, 0
- RF f1 score: 0.000
- RF cohens kappa score: -0.023
- -----[ GB ]-----
- maximum:
- GB tn, fp: 138, 6
- GB fn, tp: 8, 5
- GB f1 score: 0.625
- GB cohens kappa score: 0.604
- average:
- GB tn, fp: 134.88, 2.92
- GB fn, tp: 5.6, 2.8
- GB f1 score: 0.389
- GB cohens kappa score: 0.361
- minimum:
- GB tn, fp: 132, 0
- GB fn, tp: 3, 1
- GB f1 score: 0.154
- GB cohens kappa score: 0.121
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 138, 4
- KNN fn, tp: 9, 3
- KNN f1 score: 0.462
- KNN cohens kappa score: 0.440
- average:
- KNN tn, fp: 137.04, 0.76
- KNN fn, tp: 7.56, 0.84
- KNN f1 score: 0.153
- KNN cohens kappa score: 0.140
- minimum:
- KNN tn, fp: 133, 0
- KNN fn, tp: 4, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: -0.035
|