| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702 |
- ///////////////////////////////////////////
- // Running convGAN-full on imblearn_mammography
- ///////////////////////////////////////////
- Load 'data_input/imblearn_mammography'
- from imblearn
- non empty cut in data_input/imblearn_mammography! (7 points)
- 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
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1904, 281
- LR fn, tp: 6, 46
- LR f1 score: 0.243
- LR cohens kappa score: 0.211
- LR average precision score: 0.560
- -> test with 'GB'
- GB tn, fp: 2129, 56
- GB fn, tp: 12, 40
- GB f1 score: 0.541
- GB cohens kappa score: 0.526
- -> test with 'KNN'
- KNN tn, fp: 1429, 756
- KNN fn, tp: 6, 46
- KNN f1 score: 0.108
- KNN cohens kappa score: 0.067
- ------ Step 1/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1915, 270
- LR fn, tp: 6, 46
- LR f1 score: 0.250
- LR cohens kappa score: 0.219
- LR average precision score: 0.481
- -> test with 'GB'
- GB tn, fp: 2141, 44
- GB fn, tp: 12, 40
- GB f1 score: 0.588
- GB cohens kappa score: 0.576
- -> test with 'KNN'
- KNN tn, fp: 2093, 92
- KNN fn, tp: 9, 43
- KNN f1 score: 0.460
- KNN cohens kappa score: 0.441
- ------ Step 1/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1916, 269
- LR fn, tp: 6, 46
- LR f1 score: 0.251
- LR cohens kappa score: 0.220
- LR average precision score: 0.606
- -> test with 'GB'
- GB tn, fp: 2153, 32
- GB fn, tp: 12, 40
- GB f1 score: 0.645
- GB cohens kappa score: 0.635
- -> test with 'KNN'
- KNN tn, fp: 1408, 777
- KNN fn, tp: 6, 46
- KNN f1 score: 0.105
- KNN cohens kappa score: 0.064
- ------ Step 1/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1918, 267
- LR fn, tp: 7, 45
- LR f1 score: 0.247
- LR cohens kappa score: 0.216
- LR average precision score: 0.326
- -> test with 'GB'
- GB tn, fp: 2119, 66
- GB fn, tp: 13, 39
- GB f1 score: 0.497
- GB cohens kappa score: 0.481
- -> test with 'KNN'
- KNN tn, fp: 2092, 93
- KNN fn, tp: 8, 44
- KNN f1 score: 0.466
- KNN cohens kappa score: 0.447
- ------ Step 1/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1917, 266
- LR fn, tp: 5, 47
- LR f1 score: 0.258
- LR cohens kappa score: 0.227
- LR average precision score: 0.569
- -> test with 'GB'
- GB tn, fp: 2139, 44
- GB fn, tp: 9, 43
- GB f1 score: 0.619
- GB cohens kappa score: 0.607
- -> test with 'KNN'
- KNN tn, fp: 1484, 699
- KNN fn, tp: 9, 43
- KNN f1 score: 0.108
- KNN cohens kappa score: 0.068
- ====== Step 2/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 2/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1879, 306
- LR fn, tp: 6, 46
- LR f1 score: 0.228
- LR cohens kappa score: 0.195
- LR average precision score: 0.487
- -> test with 'GB'
- GB tn, fp: 2114, 71
- GB fn, tp: 10, 42
- GB f1 score: 0.509
- GB cohens kappa score: 0.493
- -> test with 'KNN'
- KNN tn, fp: 2078, 107
- KNN fn, tp: 8, 44
- KNN f1 score: 0.433
- KNN cohens kappa score: 0.413
- ------ Step 2/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1881, 304
- LR fn, tp: 7, 45
- LR f1 score: 0.224
- LR cohens kappa score: 0.192
- LR average precision score: 0.410
- -> test with 'GB'
- GB tn, fp: 2126, 59
- GB fn, tp: 10, 42
- GB f1 score: 0.549
- GB cohens kappa score: 0.535
- -> test with 'KNN'
- KNN tn, fp: 2069, 116
- KNN fn, tp: 7, 45
- KNN f1 score: 0.423
- KNN cohens kappa score: 0.402
- ------ Step 2/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1936, 249
- LR fn, tp: 7, 45
- LR f1 score: 0.260
- LR cohens kappa score: 0.230
- LR average precision score: 0.513
- -> test with 'GB'
- GB tn, fp: 2135, 50
- GB fn, tp: 13, 39
- GB f1 score: 0.553
- GB cohens kappa score: 0.540
- -> test with 'KNN'
- KNN tn, fp: 2084, 101
- KNN fn, tp: 10, 42
- KNN f1 score: 0.431
- KNN cohens kappa score: 0.411
- ------ Step 2/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1911, 274
- LR fn, tp: 4, 48
- LR f1 score: 0.257
- LR cohens kappa score: 0.226
- LR average precision score: 0.490
- -> test with 'GB'
- GB tn, fp: 2140, 45
- GB fn, tp: 9, 43
- GB f1 score: 0.614
- GB cohens kappa score: 0.603
- -> test with 'KNN'
- KNN tn, fp: 2079, 106
- KNN fn, tp: 6, 46
- KNN f1 score: 0.451
- KNN cohens kappa score: 0.431
- ------ Step 2/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1927, 256
- LR fn, tp: 7, 45
- LR f1 score: 0.255
- LR cohens kappa score: 0.224
- LR average precision score: 0.529
- -> test with 'GB'
- GB tn, fp: 2161, 22
- GB fn, tp: 14, 38
- GB f1 score: 0.679
- GB cohens kappa score: 0.670
- -> test with 'KNN'
- KNN tn, fp: 2110, 73
- KNN fn, tp: 10, 42
- KNN f1 score: 0.503
- KNN cohens kappa score: 0.487
- ====== Step 3/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 3/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1920, 265
- LR fn, tp: 6, 46
- LR f1 score: 0.253
- LR cohens kappa score: 0.222
- LR average precision score: 0.579
- -> test with 'GB'
- GB tn, fp: 2141, 44
- GB fn, tp: 10, 42
- GB f1 score: 0.609
- GB cohens kappa score: 0.597
- -> test with 'KNN'
- KNN tn, fp: 2083, 102
- KNN fn, tp: 7, 45
- KNN f1 score: 0.452
- KNN cohens kappa score: 0.433
- ------ Step 3/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1874, 311
- LR fn, tp: 6, 46
- LR f1 score: 0.225
- LR cohens kappa score: 0.192
- LR average precision score: 0.434
- -> test with 'GB'
- GB tn, fp: 2139, 46
- GB fn, tp: 15, 37
- GB f1 score: 0.548
- GB cohens kappa score: 0.535
- -> test with 'KNN'
- KNN tn, fp: 2100, 85
- KNN fn, tp: 10, 42
- KNN f1 score: 0.469
- KNN cohens kappa score: 0.451
- ------ Step 3/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1907, 278
- LR fn, tp: 3, 49
- LR f1 score: 0.259
- LR cohens kappa score: 0.228
- LR average precision score: 0.462
- -> test with 'GB'
- GB tn, fp: 2133, 52
- GB fn, tp: 9, 43
- GB f1 score: 0.585
- GB cohens kappa score: 0.572
- -> test with 'KNN'
- KNN tn, fp: 1417, 768
- KNN fn, tp: 4, 48
- KNN f1 score: 0.111
- KNN cohens kappa score: 0.070
- ------ Step 3/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1913, 272
- LR fn, tp: 9, 43
- LR f1 score: 0.234
- LR cohens kappa score: 0.203
- LR average precision score: 0.489
- -> test with 'GB'
- GB tn, fp: 2141, 44
- GB fn, tp: 15, 37
- GB f1 score: 0.556
- GB cohens kappa score: 0.543
- -> test with 'KNN'
- KNN tn, fp: 2095, 90
- KNN fn, tp: 10, 42
- KNN f1 score: 0.457
- KNN cohens kappa score: 0.438
- ------ Step 3/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1909, 274
- LR fn, tp: 7, 45
- LR f1 score: 0.243
- LR cohens kappa score: 0.211
- LR average precision score: 0.567
- -> test with 'GB'
- GB tn, fp: 2150, 33
- GB fn, tp: 16, 36
- GB f1 score: 0.595
- GB cohens kappa score: 0.584
- -> test with 'KNN'
- KNN tn, fp: 2096, 87
- KNN fn, tp: 9, 43
- KNN f1 score: 0.473
- KNN cohens kappa score: 0.454
- ====== Step 4/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 4/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1912, 273
- LR fn, tp: 7, 45
- LR f1 score: 0.243
- LR cohens kappa score: 0.212
- LR average precision score: 0.565
- -> test with 'GB'
- GB tn, fp: 2137, 48
- GB fn, tp: 18, 34
- GB f1 score: 0.507
- GB cohens kappa score: 0.493
- -> test with 'KNN'
- KNN tn, fp: 1456, 729
- KNN fn, tp: 10, 42
- KNN f1 score: 0.102
- KNN cohens kappa score: 0.061
- ------ Step 4/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1894, 291
- LR fn, tp: 5, 47
- LR f1 score: 0.241
- LR cohens kappa score: 0.209
- LR average precision score: 0.400
- -> test with 'GB'
- GB tn, fp: 2134, 51
- GB fn, tp: 16, 36
- GB f1 score: 0.518
- GB cohens kappa score: 0.504
- -> test with 'KNN'
- KNN tn, fp: 1460, 725
- KNN fn, tp: 5, 47
- KNN f1 score: 0.114
- KNN cohens kappa score: 0.074
- ------ Step 4/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1920, 265
- LR fn, tp: 7, 45
- LR f1 score: 0.249
- LR cohens kappa score: 0.217
- LR average precision score: 0.474
- -> test with 'GB'
- GB tn, fp: 2138, 47
- GB fn, tp: 8, 44
- GB f1 score: 0.615
- GB cohens kappa score: 0.604
- -> test with 'KNN'
- KNN tn, fp: 2090, 95
- KNN fn, tp: 8, 44
- KNN f1 score: 0.461
- KNN cohens kappa score: 0.442
- ------ Step 4/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1915, 270
- LR fn, tp: 9, 43
- LR f1 score: 0.236
- LR cohens kappa score: 0.204
- LR average precision score: 0.483
- -> test with 'GB'
- GB tn, fp: 2134, 51
- GB fn, tp: 11, 41
- GB f1 score: 0.569
- GB cohens kappa score: 0.556
- -> test with 'KNN'
- KNN tn, fp: 2085, 100
- KNN fn, tp: 8, 44
- KNN f1 score: 0.449
- KNN cohens kappa score: 0.429
- ------ Step 4/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1888, 295
- LR fn, tp: 1, 51
- LR f1 score: 0.256
- LR cohens kappa score: 0.225
- LR average precision score: 0.494
- -> test with 'GB'
- GB tn, fp: 2133, 50
- GB fn, tp: 10, 42
- GB f1 score: 0.583
- GB cohens kappa score: 0.571
- -> test with 'KNN'
- KNN tn, fp: 2073, 110
- KNN fn, tp: 8, 44
- KNN f1 score: 0.427
- KNN cohens kappa score: 0.407
- ====== Step 5/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 5/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1896, 289
- LR fn, tp: 3, 49
- LR f1 score: 0.251
- LR cohens kappa score: 0.220
- LR average precision score: 0.467
- -> test with 'GB'
- GB tn, fp: 2145, 40
- GB fn, tp: 12, 40
- GB f1 score: 0.606
- GB cohens kappa score: 0.595
- -> test with 'KNN'
- KNN tn, fp: 2100, 85
- KNN fn, tp: 9, 43
- KNN f1 score: 0.478
- KNN cohens kappa score: 0.460
- ------ Step 5/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1876, 309
- LR fn, tp: 6, 46
- LR f1 score: 0.226
- LR cohens kappa score: 0.193
- LR average precision score: 0.478
- -> test with 'GB'
- GB tn, fp: 2128, 57
- GB fn, tp: 9, 43
- GB f1 score: 0.566
- GB cohens kappa score: 0.552
- -> test with 'KNN'
- KNN tn, fp: 1399, 786
- KNN fn, tp: 5, 47
- KNN f1 score: 0.106
- KNN cohens kappa score: 0.065
- ------ Step 5/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1907, 278
- LR fn, tp: 9, 43
- LR f1 score: 0.231
- LR cohens kappa score: 0.198
- LR average precision score: 0.512
- -> test with 'GB'
- GB tn, fp: 2144, 41
- GB fn, tp: 18, 34
- GB f1 score: 0.535
- GB cohens kappa score: 0.522
- -> test with 'KNN'
- KNN tn, fp: 2083, 102
- KNN fn, tp: 10, 42
- KNN f1 score: 0.429
- KNN cohens kappa score: 0.408
- ------ Step 5/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1783, 402
- LR fn, tp: 4, 48
- LR f1 score: 0.191
- LR cohens kappa score: 0.156
- LR average precision score: 0.494
- -> test with 'GB'
- GB tn, fp: 2136, 49
- GB fn, tp: 11, 41
- GB f1 score: 0.577
- GB cohens kappa score: 0.565
- -> test with 'KNN'
- KNN tn, fp: 2094, 91
- KNN fn, tp: 7, 45
- KNN f1 score: 0.479
- KNN cohens kappa score: 0.461
- ------ Step 5/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1853, 330
- LR fn, tp: 7, 45
- LR f1 score: 0.211
- LR cohens kappa score: 0.177
- LR average precision score: 0.589
- -> test with 'GB'
- GB tn, fp: 2126, 57
- GB fn, tp: 13, 39
- GB f1 score: 0.527
- GB cohens kappa score: 0.512
- -> test with 'KNN'
- KNN tn, fp: 2099, 84
- KNN fn, tp: 10, 42
- KNN f1 score: 0.472
- KNN cohens kappa score: 0.454
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 1936, 402
- LR fn, tp: 9, 51
- LR f1 score: 0.260
- LR cohens kappa score: 0.230
- LR average precision score: 0.606
- average:
- LR tn, fp: 1898.84, 285.76
- LR fn, tp: 6.0, 46.0
- LR f1 score: 0.241
- LR cohens kappa score: 0.209
- LR average precision score: 0.498
- minimum:
- LR tn, fp: 1783, 249
- LR fn, tp: 1, 43
- LR f1 score: 0.191
- LR cohens kappa score: 0.156
- LR average precision score: 0.326
- -----[ GB ]-----
- maximum:
- GB tn, fp: 2161, 71
- GB fn, tp: 18, 44
- GB f1 score: 0.679
- GB cohens kappa score: 0.670
- average:
- GB tn, fp: 2136.64, 47.96
- GB fn, tp: 12.2, 39.8
- GB f1 score: 0.572
- GB cohens kappa score: 0.559
- minimum:
- GB tn, fp: 2114, 22
- GB fn, tp: 8, 34
- GB f1 score: 0.497
- GB cohens kappa score: 0.481
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 2110, 786
- KNN fn, tp: 10, 48
- KNN f1 score: 0.503
- KNN cohens kappa score: 0.487
- average:
- KNN tn, fp: 1906.24, 278.36
- KNN fn, tp: 7.96, 44.04
- KNN f1 score: 0.359
- KNN cohens kappa score: 0.333
- minimum:
- KNN tn, fp: 1399, 73
- KNN fn, tp: 4, 42
- KNN f1 score: 0.102
- KNN cohens kappa score: 0.061
|