| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898 |
- ///////////////////////////////////////////
- // Running CTAB-GAN on folding_yeast5
- ///////////////////////////////////////////
- Load 'data_input/folding_yeast5'
- 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.63it/s]
20%|██ | 2/10 [00:01<00:04, 1.80it/s]
30%|███ | 3/10 [00:01<00:03, 1.81it/s]
40%|████ | 4/10 [00:02<00:03, 1.82it/s]
50%|█████ | 5/10 [00:02<00:02, 1.80it/s]
60%|██████ | 6/10 [00:03<00:02, 1.82it/s]
70%|███████ | 7/10 [00:03<00:01, 1.89it/s]
80%|████████ | 8/10 [00:04<00:01, 1.86it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.87it/s]
100%|██████████| 10/10 [00:05<00:00, 1.89it/s]
100%|██████████| 10/10 [00:05<00:00, 1.85it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 283, 5
- LR fn, tp: 2, 7
- LR f1 score: 0.667
- LR cohens kappa score: 0.655
- LR average precision score: 0.872
- -> test with 'RF'
- RF tn, fp: 288, 0
- RF fn, tp: 5, 4
- RF f1 score: 0.615
- RF cohens kappa score: 0.608
- -> test with 'GB'
- GB tn, fp: 287, 1
- GB fn, tp: 3, 6
- GB f1 score: 0.750
- GB cohens kappa score: 0.743
- -> test with 'KNN'
- KNN tn, fp: 282, 6
- KNN fn, tp: 2, 7
- KNN f1 score: 0.636
- KNN cohens kappa score: 0.623
- ------ 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:04, 2.01it/s]
20%|██ | 2/10 [00:01<00:04, 2.00it/s]
30%|███ | 3/10 [00:01<00:03, 1.86it/s]
40%|████ | 4/10 [00:02<00:03, 1.89it/s]
50%|█████ | 5/10 [00:02<00:02, 1.92it/s]
60%|██████ | 6/10 [00:03<00:02, 1.94it/s]
70%|███████ | 7/10 [00:03<00:01, 1.97it/s]
80%|████████ | 8/10 [00:04<00:01, 1.96it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.96it/s]
100%|██████████| 10/10 [00:05<00:00, 1.96it/s]
100%|██████████| 10/10 [00:05<00:00, 1.95it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 279, 9
- LR fn, tp: 1, 8
- LR f1 score: 0.615
- LR cohens kappa score: 0.600
- LR average precision score: 0.714
- -> test with 'RF'
- RF tn, fp: 285, 3
- RF fn, tp: 3, 6
- RF f1 score: 0.667
- RF cohens kappa score: 0.656
- -> test with 'GB'
- GB tn, fp: 285, 3
- GB fn, tp: 1, 8
- GB f1 score: 0.800
- GB cohens kappa score: 0.793
- -> test with 'KNN'
- KNN tn, fp: 283, 5
- KNN fn, tp: 0, 9
- KNN f1 score: 0.783
- KNN cohens kappa score: 0.774
- ------ 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.72it/s]
20%|██ | 2/10 [00:01<00:04, 1.80it/s]
30%|███ | 3/10 [00:01<00:03, 1.82it/s]
40%|████ | 4/10 [00:02<00:03, 1.86it/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.85it/s]
80%|████████ | 8/10 [00:04<00:01, 1.81it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.79it/s]
100%|██████████| 10/10 [00:05<00:00, 1.81it/s]
100%|██████████| 10/10 [00:05<00:00, 1.82it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 280, 8
- LR fn, tp: 1, 8
- LR f1 score: 0.640
- LR cohens kappa score: 0.625
- LR average precision score: 0.586
- -> test with 'RF'
- RF tn, fp: 286, 2
- RF fn, tp: 3, 6
- RF f1 score: 0.706
- RF cohens kappa score: 0.697
- -> test with 'GB'
- GB tn, fp: 285, 3
- GB fn, tp: 2, 7
- GB f1 score: 0.737
- GB cohens kappa score: 0.728
- -> test with 'KNN'
- KNN tn, fp: 282, 6
- KNN fn, tp: 2, 7
- KNN f1 score: 0.636
- KNN cohens kappa score: 0.623
- ------ 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.80it/s]
20%|██ | 2/10 [00:01<00:04, 1.86it/s]
30%|███ | 3/10 [00:01<00:03, 1.77it/s]
40%|████ | 4/10 [00:02<00:03, 1.78it/s]
50%|█████ | 5/10 [00:02<00:02, 1.80it/s]
60%|██████ | 6/10 [00:03<00:02, 1.82it/s]
70%|███████ | 7/10 [00:03<00:01, 1.87it/s]
80%|████████ | 8/10 [00:04<00:01, 1.90it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.92it/s]
100%|██████████| 10/10 [00:05<00:00, 1.93it/s]
100%|██████████| 10/10 [00:05<00:00, 1.87it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 284, 4
- LR fn, tp: 4, 5
- LR f1 score: 0.556
- LR cohens kappa score: 0.542
- LR average precision score: 0.720
- -> test with 'RF'
- RF tn, fp: 288, 0
- RF fn, tp: 6, 3
- RF f1 score: 0.500
- RF cohens kappa score: 0.492
- -> test with 'GB'
- GB tn, fp: 288, 0
- GB fn, tp: 5, 4
- GB f1 score: 0.615
- GB cohens kappa score: 0.608
- -> test with 'KNN'
- KNN tn, fp: 287, 1
- KNN fn, tp: 4, 5
- KNN f1 score: 0.667
- KNN cohens kappa score: 0.658
- ------ 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.83it/s]
20%|██ | 2/10 [00:01<00:04, 1.86it/s]
30%|███ | 3/10 [00:01<00:03, 1.84it/s]
40%|████ | 4/10 [00:02<00:03, 1.82it/s]
50%|█████ | 5/10 [00:02<00:02, 1.85it/s]
60%|██████ | 6/10 [00:03<00:02, 1.87it/s]
70%|███████ | 7/10 [00:03<00:01, 1.88it/s]
80%|████████ | 8/10 [00:04<00:01, 1.89it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.86it/s]
100%|██████████| 10/10 [00:05<00:00, 1.90it/s]
100%|██████████| 10/10 [00:05<00:00, 1.87it/s]
- -> create 1116 synthetic samples
- -> test with 'LR'
- LR tn, fp: 279, 9
- LR fn, tp: 1, 7
- LR f1 score: 0.583
- LR cohens kappa score: 0.568
- LR average precision score: 0.616
- -> test with 'RF'
- RF tn, fp: 286, 2
- RF fn, tp: 4, 4
- RF f1 score: 0.571
- RF cohens kappa score: 0.561
- -> test with 'GB'
- GB tn, fp: 286, 2
- GB fn, tp: 3, 5
- GB f1 score: 0.667
- GB cohens kappa score: 0.658
- -> test with 'KNN'
- KNN tn, fp: 281, 7
- KNN fn, tp: 1, 7
- KNN f1 score: 0.636
- KNN cohens kappa score: 0.623
- ====== 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.79it/s]
20%|██ | 2/10 [00:01<00:04, 1.72it/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:05<00:07, 1.42s/it]
60%|██████ | 6/10 [00:09<00:09, 2.39s/it]
70%|███████ | 7/10 [00:10<00:05, 1.84s/it]
80%|████████ | 8/10 [00:10<00:02, 1.44s/it]
90%|█████████ | 9/10 [00:11<00:01, 1.19s/it]
100%|██████████| 10/10 [00:12<00:00, 1.02s/it]
100%|██████████| 10/10 [00:12<00:00, 1.21s/it]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 279, 9
- LR fn, tp: 1, 8
- LR f1 score: 0.615
- LR cohens kappa score: 0.600
- LR average precision score: 0.757
- -> test with 'RF'
- RF tn, fp: 287, 1
- RF fn, tp: 1, 8
- RF f1 score: 0.889
- RF cohens kappa score: 0.885
- -> test with 'GB'
- GB tn, fp: 287, 1
- GB fn, tp: 2, 7
- GB f1 score: 0.824
- GB cohens kappa score: 0.818
- -> test with 'KNN'
- KNN tn, fp: 283, 5
- KNN fn, tp: 1, 8
- KNN f1 score: 0.727
- KNN cohens kappa score: 0.717
- ------ 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:04, 1.85it/s]
20%|██ | 2/10 [00:01<00:04, 1.84it/s]
30%|███ | 3/10 [00:01<00:03, 1.84it/s]
40%|████ | 4/10 [00:02<00:03, 1.81it/s]
50%|█████ | 5/10 [00:02<00:02, 1.81it/s]
60%|██████ | 6/10 [00:03<00:02, 1.82it/s]
70%|███████ | 7/10 [00:03<00:01, 1.82it/s]
80%|████████ | 8/10 [00:04<00:01, 1.82it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.83it/s]
100%|██████████| 10/10 [00:05<00:00, 1.84it/s]
100%|██████████| 10/10 [00:05<00:00, 1.83it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 280, 8
- LR fn, tp: 5, 4
- LR f1 score: 0.381
- LR cohens kappa score: 0.359
- LR average precision score: 0.331
- -> test with 'RF'
- RF tn, fp: 284, 4
- RF fn, tp: 6, 3
- RF f1 score: 0.375
- RF cohens kappa score: 0.358
- -> test with 'GB'
- GB tn, fp: 283, 5
- GB fn, tp: 4, 5
- GB f1 score: 0.526
- GB cohens kappa score: 0.511
- -> test with 'KNN'
- KNN tn, fp: 282, 6
- KNN fn, tp: 6, 3
- 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:05, 1.75it/s]
20%|██ | 2/10 [00:01<00:04, 1.78it/s]
30%|███ | 3/10 [00:01<00:03, 1.81it/s]
40%|████ | 4/10 [00:02<00:03, 1.77it/s]
50%|█████ | 5/10 [00:02<00:02, 1.78it/s]
60%|██████ | 6/10 [00:03<00:02, 1.80it/s]
70%|███████ | 7/10 [00:03<00:01, 1.85it/s]
80%|████████ | 8/10 [00:04<00:01, 1.83it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.80it/s]
100%|██████████| 10/10 [00:05<00:00, 1.74it/s]
100%|██████████| 10/10 [00:05<00:00, 1.78it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 286, 2
- LR fn, tp: 1, 8
- LR f1 score: 0.842
- LR cohens kappa score: 0.837
- LR average precision score: 0.930
- -> test with 'RF'
- RF tn, fp: 288, 0
- RF fn, tp: 2, 7
- RF f1 score: 0.875
- RF cohens kappa score: 0.872
- -> test with 'GB'
- GB tn, fp: 286, 2
- GB fn, tp: 2, 7
- GB f1 score: 0.778
- GB cohens kappa score: 0.771
- -> test with 'KNN'
- KNN tn, fp: 287, 1
- KNN fn, tp: 3, 6
- KNN f1 score: 0.750
- KNN cohens kappa score: 0.743
- ------ 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:04, 1.81it/s]
20%|██ | 2/10 [00:01<00:04, 1.83it/s]
30%|███ | 3/10 [00:01<00:03, 1.77it/s]
40%|████ | 4/10 [00:02<00:03, 1.80it/s]
50%|█████ | 5/10 [00:02<00:02, 1.78it/s]
60%|██████ | 6/10 [00:03<00:02, 1.79it/s]
70%|███████ | 7/10 [00:03<00:01, 1.79it/s]
80%|████████ | 8/10 [00:04<00:01, 1.76it/s]
90%|█████████ | 9/10 [00:05<00:00, 1.76it/s]
100%|██████████| 10/10 [00:05<00:00, 1.77it/s]
100%|██████████| 10/10 [00:05<00:00, 1.78it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 283, 5
- LR fn, tp: 1, 8
- LR f1 score: 0.727
- LR cohens kappa score: 0.717
- LR average precision score: 0.870
- -> test with 'RF'
- RF tn, fp: 286, 2
- RF fn, tp: 2, 7
- RF f1 score: 0.778
- RF cohens kappa score: 0.771
- -> test with 'GB'
- GB tn, fp: 286, 2
- GB fn, tp: 2, 7
- GB f1 score: 0.778
- GB cohens kappa score: 0.771
- -> test with 'KNN'
- KNN tn, fp: 283, 5
- KNN fn, tp: 0, 9
- KNN f1 score: 0.783
- KNN cohens kappa score: 0.774
- ------ 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:04, 1.82it/s]
20%|██ | 2/10 [00:01<00:04, 1.87it/s]
30%|███ | 3/10 [00:01<00:03, 1.89it/s]
40%|████ | 4/10 [00:02<00:03, 1.87it/s]
50%|█████ | 5/10 [00:02<00:02, 1.91it/s]
60%|██████ | 6/10 [00:03<00:02, 1.93it/s]
70%|███████ | 7/10 [00:03<00:01, 1.92it/s]
80%|████████ | 8/10 [00:04<00:01, 1.91it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.87it/s]
100%|██████████| 10/10 [00:05<00:00, 1.86it/s]
100%|██████████| 10/10 [00:05<00:00, 1.88it/s]
- -> create 1116 synthetic samples
- -> test with 'LR'
- LR tn, fp: 283, 5
- LR fn, tp: 3, 5
- LR f1 score: 0.556
- LR cohens kappa score: 0.542
- LR average precision score: 0.598
- -> test with 'RF'
- RF tn, fp: 286, 2
- RF fn, tp: 6, 2
- RF f1 score: 0.333
- RF cohens kappa score: 0.321
- -> test with 'GB'
- GB tn, fp: 286, 2
- GB fn, tp: 6, 2
- GB f1 score: 0.333
- GB cohens kappa score: 0.321
- -> test with 'KNN'
- KNN tn, fp: 284, 4
- KNN fn, tp: 2, 6
- KNN f1 score: 0.667
- KNN cohens kappa score: 0.656
- ====== 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.89it/s]
30%|███ | 3/10 [00:01<00:03, 1.94it/s]
40%|████ | 4/10 [00:02<00:03, 1.96it/s]
50%|█████ | 5/10 [00:02<00:02, 1.91it/s]
60%|██████ | 6/10 [00:03<00:02, 1.89it/s]
70%|███████ | 7/10 [00:03<00:01, 1.90it/s]
80%|████████ | 8/10 [00:04<00:01, 1.87it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.76it/s]
100%|██████████| 10/10 [00:05<00:00, 1.71it/s]
100%|██████████| 10/10 [00:05<00:00, 1.82it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 280, 8
- LR fn, tp: 2, 7
- LR f1 score: 0.583
- LR cohens kappa score: 0.567
- LR average precision score: 0.633
- -> test with 'RF'
- RF tn, fp: 287, 1
- RF fn, tp: 4, 5
- RF f1 score: 0.667
- RF cohens kappa score: 0.658
- -> test with 'GB'
- GB tn, fp: 286, 2
- GB fn, tp: 4, 5
- GB f1 score: 0.625
- GB cohens kappa score: 0.615
- -> test with 'KNN'
- KNN tn, fp: 286, 2
- KNN fn, tp: 2, 7
- KNN f1 score: 0.778
- KNN cohens kappa score: 0.771
- ------ 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.03it/s]
20%|██ | 2/10 [00:01<00:04, 1.96it/s]
30%|███ | 3/10 [00:01<00:03, 1.98it/s]
40%|████ | 4/10 [00:02<00:03, 1.92it/s]
50%|█████ | 5/10 [00:02<00:02, 1.92it/s]
60%|██████ | 6/10 [00:03<00:02, 1.93it/s]
70%|███████ | 7/10 [00:03<00:01, 1.92it/s]
80%|████████ | 8/10 [00:04<00:01, 1.90it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.84it/s]
100%|██████████| 10/10 [00:05<00:00, 1.85it/s]
100%|██████████| 10/10 [00:05<00:00, 1.90it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 281, 7
- LR fn, tp: 2, 7
- LR f1 score: 0.609
- LR cohens kappa score: 0.594
- LR average precision score: 0.708
- -> test with 'RF'
- RF tn, fp: 286, 2
- RF fn, tp: 3, 6
- RF f1 score: 0.706
- RF cohens kappa score: 0.697
- -> test with 'GB'
- GB tn, fp: 285, 3
- GB fn, tp: 3, 6
- GB f1 score: 0.667
- GB cohens kappa score: 0.656
- -> test with 'KNN'
- KNN tn, fp: 285, 3
- KNN fn, tp: 2, 7
- KNN f1 score: 0.737
- KNN cohens kappa score: 0.728
- ------ 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:04, 1.82it/s]
20%|██ | 2/10 [00:01<00:04, 1.84it/s]
30%|███ | 3/10 [00:01<00:03, 1.89it/s]
40%|████ | 4/10 [00:02<00:03, 1.87it/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.88it/s]
80%|████████ | 8/10 [00:04<00:01, 1.90it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.89it/s]
100%|██████████| 10/10 [00:05<00:00, 1.85it/s]
100%|██████████| 10/10 [00:05<00:00, 1.87it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 283, 5
- LR fn, tp: 2, 7
- LR f1 score: 0.667
- LR cohens kappa score: 0.655
- LR average precision score: 0.753
- -> test with 'RF'
- RF tn, fp: 288, 0
- RF fn, tp: 4, 5
- RF f1 score: 0.714
- RF cohens kappa score: 0.708
- -> test with 'GB'
- GB tn, fp: 288, 0
- GB fn, tp: 4, 5
- GB f1 score: 0.714
- GB cohens kappa score: 0.708
- -> test with 'KNN'
- KNN tn, fp: 286, 2
- KNN fn, tp: 2, 7
- KNN f1 score: 0.778
- KNN cohens kappa score: 0.771
- ------ 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.71it/s]
20%|██ | 2/10 [00:01<00:04, 1.83it/s]
30%|███ | 3/10 [00:01<00:03, 1.84it/s]
40%|████ | 4/10 [00:02<00:03, 1.90it/s]
50%|█████ | 5/10 [00:02<00:02, 1.91it/s]
60%|██████ | 6/10 [00:03<00:02, 1.91it/s]
70%|███████ | 7/10 [00:03<00:01, 1.92it/s]
80%|████████ | 8/10 [00:04<00:01, 1.89it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.90it/s]
100%|██████████| 10/10 [00:05<00:00, 1.92it/s]
100%|██████████| 10/10 [00:05<00:00, 1.90it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 283, 5
- LR fn, tp: 0, 9
- LR f1 score: 0.783
- LR cohens kappa score: 0.774
- LR average precision score: 0.733
- -> test with 'RF'
- RF tn, fp: 288, 0
- RF fn, tp: 4, 5
- RF f1 score: 0.714
- RF cohens kappa score: 0.708
- -> test with 'GB'
- GB tn, fp: 288, 0
- GB fn, tp: 4, 5
- GB f1 score: 0.714
- GB cohens kappa score: 0.708
- -> test with 'KNN'
- KNN tn, fp: 285, 3
- KNN fn, tp: 0, 9
- KNN f1 score: 0.857
- KNN cohens kappa score: 0.852
- ------ 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.85it/s]
20%|██ | 2/10 [00:01<00:04, 1.86it/s]
30%|███ | 3/10 [00:01<00:03, 1.89it/s]
40%|████ | 4/10 [00:02<00:03, 1.90it/s]
50%|█████ | 5/10 [00:02<00:02, 1.88it/s]
60%|██████ | 6/10 [00:03<00:02, 1.86it/s]
70%|███████ | 7/10 [00:03<00:01, 1.84it/s]
80%|████████ | 8/10 [00:04<00:01, 1.84it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.89it/s]
100%|██████████| 10/10 [00:05<00:00, 1.93it/s]
100%|██████████| 10/10 [00:05<00:00, 1.89it/s]
- -> create 1116 synthetic samples
- -> test with 'LR'
- LR tn, fp: 280, 8
- LR fn, tp: 3, 5
- LR f1 score: 0.476
- LR cohens kappa score: 0.458
- LR average precision score: 0.427
- -> test with 'RF'
- RF tn, fp: 284, 4
- RF fn, tp: 4, 4
- RF f1 score: 0.500
- RF cohens kappa score: 0.486
- -> test with 'GB'
- GB tn, fp: 283, 5
- GB fn, tp: 1, 7
- GB f1 score: 0.700
- GB cohens kappa score: 0.690
- -> test with 'KNN'
- KNN tn, fp: 282, 6
- KNN fn, tp: 1, 7
- KNN f1 score: 0.667
- KNN cohens kappa score: 0.655
- ====== 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:04, 1.92it/s]
20%|██ | 2/10 [00:01<00:04, 1.98it/s]
30%|███ | 3/10 [00:01<00:03, 1.98it/s]
40%|████ | 4/10 [00:02<00:03, 1.93it/s]
50%|█████ | 5/10 [00:02<00:02, 1.93it/s]
60%|██████ | 6/10 [00:03<00:02, 1.91it/s]
70%|███████ | 7/10 [00:03<00:01, 1.95it/s]
80%|████████ | 8/10 [00:04<00:01, 1.92it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.89it/s]
100%|██████████| 10/10 [00:05<00:00, 1.89it/s]
100%|██████████| 10/10 [00:05<00:00, 1.92it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 281, 7
- LR fn, tp: 2, 7
- LR f1 score: 0.609
- LR cohens kappa score: 0.594
- LR average precision score: 0.750
- -> test with 'RF'
- RF tn, fp: 286, 2
- RF fn, tp: 3, 6
- RF f1 score: 0.706
- RF cohens kappa score: 0.697
- -> test with 'GB'
- GB tn, fp: 285, 3
- GB fn, tp: 2, 7
- GB f1 score: 0.737
- GB cohens kappa score: 0.728
- -> test with 'KNN'
- KNN tn, fp: 281, 7
- KNN fn, tp: 0, 9
- KNN f1 score: 0.720
- KNN cohens kappa score: 0.709
- ------ 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:04, 1.91it/s]
20%|██ | 2/10 [00:01<00:04, 1.93it/s]
30%|███ | 3/10 [00:01<00:03, 1.91it/s]
40%|████ | 4/10 [00:02<00:03, 1.88it/s]
50%|█████ | 5/10 [00:02<00:02, 1.89it/s]
60%|██████ | 6/10 [00:03<00:02, 1.89it/s]
70%|███████ | 7/10 [00:03<00:01, 1.90it/s]
80%|████████ | 8/10 [00:04<00:01, 1.89it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.93it/s]
100%|██████████| 10/10 [00:05<00:00, 1.93it/s]
100%|██████████| 10/10 [00:05<00:00, 1.91it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 280, 8
- LR fn, tp: 4, 5
- LR f1 score: 0.455
- LR cohens kappa score: 0.434
- LR average precision score: 0.520
- -> test with 'RF'
- RF tn, fp: 287, 1
- RF fn, tp: 3, 6
- RF f1 score: 0.750
- RF cohens kappa score: 0.743
- -> test with 'GB'
- GB tn, fp: 287, 1
- GB fn, tp: 2, 7
- GB f1 score: 0.824
- GB cohens kappa score: 0.818
- -> test with 'KNN'
- KNN tn, fp: 282, 6
- KNN fn, tp: 3, 6
- KNN f1 score: 0.571
- KNN cohens kappa score: 0.556
- ------ 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:04, 2.00it/s]
20%|██ | 2/10 [00:00<00:03, 2.03it/s]
30%|███ | 3/10 [00:01<00:03, 1.93it/s]
40%|████ | 4/10 [00:02<00:03, 1.92it/s]
50%|█████ | 5/10 [00:02<00:02, 1.89it/s]
60%|██████ | 6/10 [00:03<00:02, 1.88it/s]
70%|███████ | 7/10 [00:03<00:01, 1.88it/s]
80%|████████ | 8/10 [00:04<00:01, 1.89it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.92it/s]
100%|██████████| 10/10 [00:05<00:00, 1.89it/s]
100%|██████████| 10/10 [00:05<00:00, 1.91it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 281, 7
- LR fn, tp: 0, 9
- LR f1 score: 0.720
- LR cohens kappa score: 0.709
- LR average precision score: 0.768
- -> test with 'RF'
- RF tn, fp: 283, 5
- RF fn, tp: 4, 5
- RF f1 score: 0.526
- RF cohens kappa score: 0.511
- -> test with 'GB'
- GB tn, fp: 283, 5
- GB fn, tp: 4, 5
- GB f1 score: 0.526
- GB cohens kappa score: 0.511
- -> test with 'KNN'
- KNN tn, fp: 281, 7
- KNN fn, tp: 1, 8
- KNN f1 score: 0.667
- KNN cohens kappa score: 0.654
- ------ 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:04, 1.81it/s]
20%|██ | 2/10 [00:01<00:04, 1.90it/s]
30%|███ | 3/10 [00:01<00:03, 1.96it/s]
40%|████ | 4/10 [00:02<00:03, 1.98it/s]
50%|█████ | 5/10 [00:02<00:02, 1.97it/s]
60%|██████ | 6/10 [00:03<00:02, 1.92it/s]
70%|███████ | 7/10 [00:03<00:01, 1.91it/s]
80%|████████ | 8/10 [00:04<00:01, 1.91it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.91it/s]
100%|██████████| 10/10 [00:05<00:00, 1.87it/s]
100%|██████████| 10/10 [00:05<00:00, 1.91it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 285, 3
- LR fn, tp: 4, 5
- LR f1 score: 0.588
- LR cohens kappa score: 0.576
- LR average precision score: 0.731
- -> test with 'RF'
- RF tn, fp: 288, 0
- RF fn, tp: 4, 5
- RF f1 score: 0.714
- RF cohens kappa score: 0.708
- -> test with 'GB'
- GB tn, fp: 286, 2
- GB fn, tp: 3, 6
- GB f1 score: 0.706
- GB cohens kappa score: 0.697
- -> test with 'KNN'
- KNN tn, fp: 286, 2
- KNN fn, tp: 2, 7
- KNN f1 score: 0.778
- KNN cohens kappa score: 0.771
- ------ 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:04, 1.84it/s]
20%|██ | 2/10 [00:01<00:04, 1.83it/s]
30%|███ | 3/10 [00:01<00:03, 1.83it/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.83it/s]
70%|███████ | 7/10 [00:03<00:01, 1.85it/s]
80%|████████ | 8/10 [00:04<00:01, 1.86it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.76it/s]
100%|██████████| 10/10 [00:05<00:00, 1.81it/s]
100%|██████████| 10/10 [00:05<00:00, 1.83it/s]
- -> create 1116 synthetic samples
- -> test with 'LR'
- LR tn, fp: 282, 6
- LR fn, tp: 1, 7
- LR f1 score: 0.667
- LR cohens kappa score: 0.655
- LR average precision score: 0.650
- -> test with 'RF'
- RF tn, fp: 288, 0
- RF fn, tp: 2, 6
- RF f1 score: 0.857
- RF cohens kappa score: 0.854
- -> test with 'GB'
- GB tn, fp: 286, 2
- GB fn, tp: 2, 6
- GB f1 score: 0.750
- GB cohens kappa score: 0.743
- -> test with 'KNN'
- KNN tn, fp: 281, 7
- KNN fn, tp: 1, 7
- KNN f1 score: 0.636
- KNN cohens kappa score: 0.623
- ====== 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:04, 1.83it/s]
20%|██ | 2/10 [00:01<00:04, 1.81it/s]
30%|███ | 3/10 [00:01<00:03, 1.84it/s]
40%|████ | 4/10 [00:02<00:03, 1.86it/s]
50%|█████ | 5/10 [00:02<00:02, 1.84it/s]
60%|██████ | 6/10 [00:03<00:02, 1.88it/s]
70%|███████ | 7/10 [00:03<00:01, 1.88it/s]
80%|████████ | 8/10 [00:04<00:01, 1.89it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.89it/s]
100%|██████████| 10/10 [00:05<00:00, 1.88it/s]
100%|██████████| 10/10 [00:05<00:00, 1.87it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 279, 9
- LR fn, tp: 1, 8
- LR f1 score: 0.615
- LR cohens kappa score: 0.600
- LR average precision score: 0.718
- -> test with 'RF'
- RF tn, fp: 288, 0
- RF fn, tp: 2, 7
- RF f1 score: 0.875
- RF cohens kappa score: 0.872
- -> test with 'GB'
- GB tn, fp: 282, 6
- GB fn, tp: 2, 7
- GB f1 score: 0.636
- GB cohens kappa score: 0.623
- -> test with 'KNN'
- KNN tn, fp: 282, 6
- KNN fn, tp: 0, 9
- KNN f1 score: 0.750
- KNN cohens kappa score: 0.740
- ------ 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:05, 1.67it/s]
20%|██ | 2/10 [00:01<00:04, 1.78it/s]
30%|███ | 3/10 [00:01<00:03, 1.85it/s]
40%|████ | 4/10 [00:02<00:03, 1.89it/s]
50%|█████ | 5/10 [00:02<00:02, 1.88it/s]
60%|██████ | 6/10 [00:03<00:02, 1.87it/s]
70%|███████ | 7/10 [00:03<00:01, 1.89it/s]
80%|████████ | 8/10 [00:04<00:01, 1.86it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.87it/s]
100%|██████████| 10/10 [00:05<00:00, 1.87it/s]
100%|██████████| 10/10 [00:05<00:00, 1.86it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 285, 3
- LR fn, tp: 4, 5
- LR f1 score: 0.588
- LR cohens kappa score: 0.576
- LR average precision score: 0.748
- -> test with 'RF'
- RF tn, fp: 288, 0
- RF fn, tp: 4, 5
- RF f1 score: 0.714
- RF cohens kappa score: 0.708
- -> test with 'GB'
- GB tn, fp: 288, 0
- GB fn, tp: 3, 6
- GB f1 score: 0.800
- GB cohens kappa score: 0.795
- -> test with 'KNN'
- KNN tn, fp: 286, 2
- KNN fn, tp: 4, 5
- KNN f1 score: 0.625
- KNN cohens kappa score: 0.615
- ------ 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, 2.04it/s]
20%|██ | 2/10 [00:01<00:04, 1.95it/s]
30%|███ | 3/10 [00:01<00:03, 1.88it/s]
40%|████ | 4/10 [00:02<00:03, 1.86it/s]
50%|█████ | 5/10 [00:02<00:02, 1.89it/s]
60%|██████ | 6/10 [00:03<00:02, 1.89it/s]
70%|███████ | 7/10 [00:03<00:01, 1.87it/s]
80%|████████ | 8/10 [00:04<00:01, 1.87it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.89it/s]
100%|██████████| 10/10 [00:05<00:00, 1.89it/s]
100%|██████████| 10/10 [00:05<00:00, 1.89it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 281, 7
- LR fn, tp: 1, 8
- LR f1 score: 0.667
- LR cohens kappa score: 0.654
- LR average precision score: 0.773
- -> test with 'RF'
- RF tn, fp: 287, 1
- RF fn, tp: 4, 5
- RF f1 score: 0.667
- RF cohens kappa score: 0.658
- -> test with 'GB'
- GB tn, fp: 286, 2
- GB fn, tp: 2, 7
- GB f1 score: 0.778
- GB cohens kappa score: 0.771
- -> test with 'KNN'
- KNN tn, fp: 283, 5
- KNN fn, tp: 1, 8
- KNN f1 score: 0.727
- KNN cohens kappa score: 0.717
- ------ 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, 2.01it/s]
20%|██ | 2/10 [00:01<00:04, 1.95it/s]
30%|███ | 3/10 [00:01<00:03, 1.88it/s]
40%|████ | 4/10 [00:02<00:03, 1.86it/s]
50%|█████ | 5/10 [00:02<00:02, 1.85it/s]
60%|██████ | 6/10 [00:03<00:02, 1.84it/s]
70%|███████ | 7/10 [00:03<00:01, 1.85it/s]
80%|████████ | 8/10 [00:04<00:01, 1.89it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.92it/s]
100%|██████████| 10/10 [00:05<00:00, 1.88it/s]
100%|██████████| 10/10 [00:05<00:00, 1.88it/s]
- -> create 1117 synthetic samples
- -> test with 'LR'
- LR tn, fp: 283, 5
- LR fn, tp: 3, 6
- LR f1 score: 0.600
- LR cohens kappa score: 0.586
- LR average precision score: 0.594
- -> test with 'RF'
- RF tn, fp: 287, 1
- RF fn, tp: 5, 4
- RF f1 score: 0.571
- RF cohens kappa score: 0.562
- -> test with 'GB'
- GB tn, fp: 287, 1
- GB fn, tp: 3, 6
- GB f1 score: 0.750
- GB cohens kappa score: 0.743
- -> test with 'KNN'
- KNN tn, fp: 282, 6
- KNN fn, tp: 4, 5
- KNN f1 score: 0.500
- KNN cohens kappa score: 0.483
- ------ 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:04, 1.86it/s]
30%|███ | 3/10 [00:01<00:03, 1.91it/s]
40%|████ | 4/10 [00:02<00:03, 1.91it/s]
50%|█████ | 5/10 [00:02<00:02, 1.87it/s]
60%|██████ | 6/10 [00:03<00:02, 1.90it/s]
70%|███████ | 7/10 [00:03<00:01, 1.89it/s]
80%|████████ | 8/10 [00:04<00:01, 1.89it/s]
90%|█████████ | 9/10 [00:04<00:00, 1.90it/s]
100%|██████████| 10/10 [00:05<00:00, 1.89it/s]
100%|██████████| 10/10 [00:05<00:00, 1.89it/s]
- -> create 1116 synthetic samples
- -> test with 'LR'
- LR tn, fp: 280, 8
- LR fn, tp: 2, 6
- LR f1 score: 0.545
- LR cohens kappa score: 0.529
- LR average precision score: 0.556
- -> test with 'RF'
- RF tn, fp: 285, 3
- RF fn, tp: 3, 5
- RF f1 score: 0.625
- RF cohens kappa score: 0.615
- -> test with 'GB'
- GB tn, fp: 282, 6
- GB fn, tp: 3, 5
- GB f1 score: 0.526
- GB cohens kappa score: 0.511
- -> test with 'KNN'
- KNN tn, fp: 280, 8
- KNN fn, tp: 2, 6
- KNN f1 score: 0.545
- KNN cohens kappa score: 0.529
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 286, 9
- LR fn, tp: 5, 9
- LR f1 score: 0.842
- LR cohens kappa score: 0.837
- LR average precision score: 0.930
- average:
- LR tn, fp: 281.6, 6.4
- LR fn, tp: 2.04, 6.76
- LR f1 score: 0.614
- LR cohens kappa score: 0.600
- LR average precision score: 0.682
- minimum:
- LR tn, fp: 279, 2
- LR fn, tp: 0, 4
- LR f1 score: 0.381
- LR cohens kappa score: 0.359
- LR average precision score: 0.331
- -----[ RF ]-----
- maximum:
- RF tn, fp: 288, 5
- RF fn, tp: 6, 8
- RF f1 score: 0.889
- RF cohens kappa score: 0.885
- average:
- RF tn, fp: 286.56, 1.44
- RF fn, tp: 3.64, 5.16
- RF f1 score: 0.665
- RF cohens kappa score: 0.656
- minimum:
- RF tn, fp: 283, 0
- RF fn, tp: 1, 2
- RF f1 score: 0.333
- RF cohens kappa score: 0.321
- -----[ GB ]-----
- maximum:
- GB tn, fp: 288, 6
- GB fn, tp: 6, 8
- GB f1 score: 0.824
- GB cohens kappa score: 0.818
- average:
- GB tn, fp: 285.64, 2.36
- GB fn, tp: 2.88, 5.92
- GB f1 score: 0.690
- GB cohens kappa score: 0.682
- minimum:
- GB tn, fp: 282, 0
- GB fn, tp: 1, 2
- GB f1 score: 0.333
- GB cohens kappa score: 0.321
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 287, 8
- KNN fn, tp: 6, 9
- KNN f1 score: 0.857
- KNN cohens kappa score: 0.852
- average:
- KNN tn, fp: 283.28, 4.72
- KNN fn, tp: 1.84, 6.96
- KNN f1 score: 0.678
- KNN cohens kappa score: 0.667
- minimum:
- KNN tn, fp: 280, 1
- KNN fn, tp: 0, 3
- KNN f1 score: 0.333
- KNN cohens kappa score: 0.312
|