| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775 |
- ///////////////////////////////////////////
- // Running SimpleGAN on kaggle_creditcard
- ///////////////////////////////////////////
- Load 'data_input/kaggle_creditcard'
- Data loaded.
- -> Shuffling data
- ### Start exercise for synthetic point generator
- ====== Step 1/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 1/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56821, 42
- LR fn, tp: 35, 64
- LR f1 score: 0.624
- LR cohens kappa score: 0.624
- LR average precision score: 0.489
- -> test with 'GB'
- GB tn, fp: 56848, 15
- GB fn, tp: 32, 67
- GB f1 score: 0.740
- GB cohens kappa score: 0.740
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 96, 3
- KNN f1 score: 0.059
- KNN cohens kappa score: 0.059
- ------ Step 1/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56853, 10
- LR fn, tp: 30, 69
- LR f1 score: 0.775
- LR cohens kappa score: 0.775
- LR average precision score: 0.707
- -> test with 'GB'
- GB tn, fp: 56856, 7
- GB fn, tp: 23, 76
- GB f1 score: 0.835
- GB cohens kappa score: 0.835
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 97, 2
- KNN f1 score: 0.040
- KNN cohens kappa score: 0.040
- ------ Step 1/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56852, 11
- LR fn, tp: 36, 63
- LR f1 score: 0.728
- LR cohens kappa score: 0.728
- LR average precision score: 0.640
- -> test with 'GB'
- GB tn, fp: 56848, 15
- GB fn, tp: 24, 75
- GB f1 score: 0.794
- GB cohens kappa score: 0.793
- -> test with 'KNN'
- KNN tn, fp: 56862, 1
- KNN fn, tp: 98, 1
- KNN f1 score: 0.020
- KNN cohens kappa score: 0.020
- ------ Step 1/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56847, 16
- LR fn, tp: 30, 69
- LR f1 score: 0.750
- LR cohens kappa score: 0.750
- LR average precision score: 0.743
- -> test with 'GB'
- GB tn, fp: 56851, 12
- GB fn, tp: 24, 75
- GB f1 score: 0.806
- GB cohens kappa score: 0.806
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 98, 1
- KNN f1 score: 0.020
- KNN cohens kappa score: 0.020
- ------ Step 1/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227056 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56854, 9
- LR fn, tp: 37, 59
- LR f1 score: 0.720
- LR cohens kappa score: 0.719
- LR average precision score: 0.738
- -> test with 'GB'
- GB tn, fp: 56845, 18
- GB fn, tp: 25, 71
- GB f1 score: 0.768
- GB cohens kappa score: 0.767
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 96, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ====== Step 2/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 2/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56835, 28
- LR fn, tp: 40, 59
- LR f1 score: 0.634
- LR cohens kappa score: 0.634
- LR average precision score: 0.612
- -> test with 'GB'
- GB tn, fp: 56848, 15
- GB fn, tp: 20, 79
- GB f1 score: 0.819
- GB cohens kappa score: 0.818
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 97, 2
- KNN f1 score: 0.040
- KNN cohens kappa score: 0.040
- ------ Step 2/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56842, 21
- LR fn, tp: 34, 65
- LR f1 score: 0.703
- LR cohens kappa score: 0.702
- LR average precision score: 0.606
- -> test with 'GB'
- GB tn, fp: 56850, 13
- GB fn, tp: 24, 75
- GB f1 score: 0.802
- GB cohens kappa score: 0.802
- -> test with 'KNN'
- KNN tn, fp: 56862, 1
- KNN fn, tp: 98, 1
- KNN f1 score: 0.020
- KNN cohens kappa score: 0.020
- ------ Step 2/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56847, 16
- LR fn, tp: 40, 59
- LR f1 score: 0.678
- LR cohens kappa score: 0.678
- LR average precision score: 0.610
- -> test with 'GB'
- GB tn, fp: 56854, 9
- GB fn, tp: 27, 72
- GB f1 score: 0.800
- GB cohens kappa score: 0.800
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 97, 2
- KNN f1 score: 0.040
- KNN cohens kappa score: 0.040
- ------ Step 2/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56850, 13
- LR fn, tp: 43, 56
- LR f1 score: 0.667
- LR cohens kappa score: 0.666
- LR average precision score: 0.630
- -> test with 'GB'
- GB tn, fp: 56859, 4
- GB fn, tp: 25, 74
- GB f1 score: 0.836
- GB cohens kappa score: 0.836
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 99, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ------ Step 2/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227056 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56849, 14
- LR fn, tp: 31, 65
- LR f1 score: 0.743
- LR cohens kappa score: 0.742
- LR average precision score: 0.683
- -> test with 'GB'
- GB tn, fp: 56851, 12
- GB fn, tp: 22, 74
- GB f1 score: 0.813
- GB cohens kappa score: 0.813
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 95, 1
- KNN f1 score: 0.021
- KNN cohens kappa score: 0.021
- ====== Step 3/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 3/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56844, 19
- LR fn, tp: 42, 57
- LR f1 score: 0.651
- LR cohens kappa score: 0.651
- LR average precision score: 0.595
- -> test with 'GB'
- GB tn, fp: 56838, 25
- GB fn, tp: 27, 72
- GB f1 score: 0.735
- GB cohens kappa score: 0.734
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 97, 2
- KNN f1 score: 0.040
- KNN cohens kappa score: 0.040
- ------ Step 3/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56846, 17
- LR fn, tp: 30, 69
- LR f1 score: 0.746
- LR cohens kappa score: 0.746
- LR average precision score: 0.671
- -> test with 'GB'
- GB tn, fp: 56850, 13
- GB fn, tp: 24, 75
- GB f1 score: 0.802
- GB cohens kappa score: 0.802
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 99, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ------ Step 3/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56850, 13
- LR fn, tp: 33, 66
- LR f1 score: 0.742
- LR cohens kappa score: 0.741
- LR average precision score: 0.680
- -> test with 'GB'
- GB tn, fp: 56861, 2
- GB fn, tp: 22, 77
- GB f1 score: 0.865
- GB cohens kappa score: 0.865
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 98, 1
- KNN f1 score: 0.020
- KNN cohens kappa score: 0.020
- ------ Step 3/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56852, 11
- LR fn, tp: 43, 56
- LR f1 score: 0.675
- LR cohens kappa score: 0.674
- LR average precision score: 0.674
- -> test with 'GB'
- GB tn, fp: 56857, 6
- GB fn, tp: 27, 72
- GB f1 score: 0.814
- GB cohens kappa score: 0.813
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 97, 2
- KNN f1 score: 0.040
- KNN cohens kappa score: 0.040
- ------ Step 3/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227056 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56858, 5
- LR fn, tp: 35, 61
- LR f1 score: 0.753
- LR cohens kappa score: 0.753
- LR average precision score: 0.702
- -> test with 'GB'
- GB tn, fp: 56855, 8
- GB fn, tp: 26, 70
- GB f1 score: 0.805
- GB cohens kappa score: 0.804
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 95, 1
- KNN f1 score: 0.021
- KNN cohens kappa score: 0.021
- ====== Step 4/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 4/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56847, 16
- LR fn, tp: 33, 66
- LR f1 score: 0.729
- LR cohens kappa score: 0.729
- LR average precision score: 0.676
- -> test with 'GB'
- GB tn, fp: 56850, 13
- GB fn, tp: 23, 76
- GB f1 score: 0.809
- GB cohens kappa score: 0.808
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 99, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ------ Step 4/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56843, 20
- LR fn, tp: 35, 64
- LR f1 score: 0.699
- LR cohens kappa score: 0.699
- LR average precision score: 0.585
- -> test with 'GB'
- GB tn, fp: 56848, 15
- GB fn, tp: 23, 76
- GB f1 score: 0.800
- GB cohens kappa score: 0.800
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 98, 1
- KNN f1 score: 0.020
- KNN cohens kappa score: 0.020
- ------ Step 4/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56853, 10
- LR fn, tp: 32, 67
- LR f1 score: 0.761
- LR cohens kappa score: 0.761
- LR average precision score: 0.700
- -> test with 'GB'
- GB tn, fp: 56853, 10
- GB fn, tp: 25, 74
- GB f1 score: 0.809
- GB cohens kappa score: 0.808
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 99, 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
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56856, 7
- LR fn, tp: 32, 67
- LR f1 score: 0.775
- LR cohens kappa score: 0.774
- LR average precision score: 0.721
- -> test with 'GB'
- GB tn, fp: 56861, 2
- GB fn, tp: 18, 81
- GB f1 score: 0.890
- GB cohens kappa score: 0.890
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 99, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ------ Step 4/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227056 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56855, 8
- LR fn, tp: 45, 51
- LR f1 score: 0.658
- LR cohens kappa score: 0.658
- LR average precision score: 0.653
- -> test with 'GB'
- GB tn, fp: 56850, 13
- GB fn, tp: 26, 70
- GB f1 score: 0.782
- GB cohens kappa score: 0.782
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 93, 3
- KNN f1 score: 0.061
- KNN cohens kappa score: 0.061
- ====== Step 5/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 5/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56849, 14
- LR fn, tp: 38, 61
- LR f1 score: 0.701
- LR cohens kappa score: 0.701
- LR average precision score: 0.660
- -> test with 'GB'
- GB tn, fp: 56853, 10
- GB fn, tp: 30, 69
- GB f1 score: 0.775
- GB cohens kappa score: 0.775
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 97, 2
- KNN f1 score: 0.040
- KNN cohens kappa score: 0.040
- ------ Step 5/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56856, 7
- LR fn, tp: 36, 63
- LR f1 score: 0.746
- LR cohens kappa score: 0.745
- LR average precision score: 0.778
- -> test with 'GB'
- GB tn, fp: 56859, 4
- GB fn, tp: 18, 81
- GB f1 score: 0.880
- GB cohens kappa score: 0.880
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 98, 1
- KNN f1 score: 0.020
- KNN cohens kappa score: 0.020
- ------ Step 5/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56853, 10
- LR fn, tp: 33, 66
- LR f1 score: 0.754
- LR cohens kappa score: 0.754
- LR average precision score: 0.652
- -> test with 'GB'
- GB tn, fp: 56848, 15
- GB fn, tp: 24, 75
- GB f1 score: 0.794
- GB cohens kappa score: 0.793
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 96, 3
- KNN f1 score: 0.059
- KNN cohens kappa score: 0.059
- ------ Step 5/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227059 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56856, 7
- LR fn, tp: 40, 59
- LR f1 score: 0.715
- LR cohens kappa score: 0.715
- LR average precision score: 0.729
- -> test with 'GB'
- GB tn, fp: 56859, 4
- GB fn, tp: 21, 78
- GB f1 score: 0.862
- GB cohens kappa score: 0.862
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 99, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ------ Step 5/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- Epoch 1/3
- Epoch 2/3
- Epoch 3/3
- -> create 227056 synthetic samples
- -> test with 'LR'
- LR tn, fp: 56850, 13
- LR fn, tp: 37, 59
- LR f1 score: 0.702
- LR cohens kappa score: 0.702
- LR average precision score: 0.628
- -> test with 'GB'
- GB tn, fp: 56844, 19
- GB fn, tp: 27, 69
- GB f1 score: 0.750
- GB cohens kappa score: 0.750
- -> test with 'KNN'
- KNN tn, fp: 56863, 0
- KNN fn, tp: 96, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 56858, 42
- LR fn, tp: 45, 69
- LR f1 score: 0.775
- LR cohens kappa score: 0.775
- LR average precision score: 0.778
- average:
- LR tn, fp: 56848.72, 14.28
- LR fn, tp: 36.0, 62.4
- LR f1 score: 0.713
- LR cohens kappa score: 0.713
- LR average precision score: 0.662
- minimum:
- LR tn, fp: 56821, 5
- LR fn, tp: 30, 51
- LR f1 score: 0.624
- LR cohens kappa score: 0.624
- LR average precision score: 0.489
- -----[ GB ]-----
- maximum:
- GB tn, fp: 56861, 25
- GB fn, tp: 32, 81
- GB f1 score: 0.890
- GB cohens kappa score: 0.890
- average:
- GB tn, fp: 56851.84, 11.16
- GB fn, tp: 24.28, 74.12
- GB f1 score: 0.807
- GB cohens kappa score: 0.807
- minimum:
- GB tn, fp: 56838, 2
- GB fn, tp: 18, 67
- GB f1 score: 0.735
- GB cohens kappa score: 0.734
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 56863, 1
- KNN fn, tp: 99, 3
- KNN f1 score: 0.061
- KNN cohens kappa score: 0.061
- average:
- KNN tn, fp: 56862.92, 0.08
- KNN fn, tp: 97.24, 1.16
- KNN f1 score: 0.023
- KNN cohens kappa score: 0.023
- minimum:
- KNN tn, fp: 56862, 0
- KNN fn, tp: 93, 0
- KNN f1 score: 0.000
- KNN cohens kappa score: 0.000
|