| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702 |
- ///////////////////////////////////////////
- // Running Repeater 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: 1897, 288
- LR fn, tp: 7, 45
- LR f1 score: 0.234
- LR cohens kappa score: 0.202
- LR average precision score: 0.558
- -> test with 'GB'
- GB tn, fp: 2110, 75
- GB fn, tp: 10, 42
- GB f1 score: 0.497
- GB cohens kappa score: 0.480
- -> test with 'KNN'
- KNN tn, fp: 1452, 733
- KNN fn, tp: 9, 43
- KNN f1 score: 0.104
- KNN cohens kappa score: 0.063
- ------ Step 1/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1888, 297
- LR fn, tp: 6, 46
- LR f1 score: 0.233
- LR cohens kappa score: 0.201
- LR average precision score: 0.506
- -> test with 'GB'
- GB tn, fp: 2119, 66
- GB fn, tp: 10, 42
- GB f1 score: 0.525
- GB cohens kappa score: 0.510
- -> test with 'KNN'
- KNN tn, fp: 1432, 753
- KNN fn, tp: 8, 44
- KNN f1 score: 0.104
- KNN cohens kappa score: 0.063
- ------ Step 1/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1893, 292
- LR fn, tp: 5, 47
- LR f1 score: 0.240
- LR cohens kappa score: 0.209
- LR average precision score: 0.601
- -> test with 'GB'
- GB tn, fp: 2116, 69
- GB fn, tp: 9, 43
- GB f1 score: 0.524
- GB cohens kappa score: 0.509
- -> test with 'KNN'
- KNN tn, fp: 1450, 735
- KNN fn, tp: 8, 44
- KNN f1 score: 0.106
- KNN cohens kappa score: 0.065
- ------ Step 1/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1905, 280
- LR fn, tp: 8, 44
- LR f1 score: 0.234
- LR cohens kappa score: 0.202
- LR average precision score: 0.373
- -> test with 'GB'
- GB tn, fp: 2106, 79
- GB fn, tp: 10, 42
- GB f1 score: 0.486
- GB cohens kappa score: 0.468
- -> test with 'KNN'
- KNN tn, fp: 1430, 755
- KNN fn, tp: 7, 45
- KNN f1 score: 0.106
- KNN cohens kappa score: 0.065
- ------ Step 1/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1895, 288
- LR fn, tp: 6, 46
- LR f1 score: 0.238
- LR cohens kappa score: 0.206
- LR average precision score: 0.555
- -> test with 'GB'
- GB tn, fp: 2111, 72
- GB fn, tp: 6, 46
- GB f1 score: 0.541
- GB cohens kappa score: 0.526
- -> test with 'KNN'
- KNN tn, fp: 1508, 675
- KNN fn, tp: 12, 40
- KNN f1 score: 0.104
- KNN cohens kappa score: 0.064
- ====== 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: 1877, 308
- LR fn, tp: 7, 45
- LR f1 score: 0.222
- LR cohens kappa score: 0.189
- LR average precision score: 0.530
- -> test with 'GB'
- GB tn, fp: 2100, 85
- GB fn, tp: 10, 42
- GB f1 score: 0.469
- GB cohens kappa score: 0.451
- -> test with 'KNN'
- KNN tn, fp: 1459, 726
- KNN fn, tp: 7, 45
- KNN f1 score: 0.109
- KNN cohens kappa score: 0.069
- ------ Step 2/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1880, 305
- LR fn, tp: 8, 44
- LR f1 score: 0.219
- LR cohens kappa score: 0.187
- LR average precision score: 0.499
- -> test with 'GB'
- GB tn, fp: 2107, 78
- GB fn, tp: 6, 46
- GB f1 score: 0.523
- GB cohens kappa score: 0.507
- -> test with 'KNN'
- KNN tn, fp: 1442, 743
- KNN fn, tp: 8, 44
- KNN f1 score: 0.105
- KNN cohens kappa score: 0.064
- ------ Step 2/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1911, 274
- LR fn, tp: 8, 44
- LR f1 score: 0.238
- LR cohens kappa score: 0.206
- LR average precision score: 0.521
- -> test with 'GB'
- GB tn, fp: 2129, 56
- GB fn, tp: 9, 43
- GB f1 score: 0.570
- GB cohens kappa score: 0.556
- -> test with 'KNN'
- KNN tn, fp: 1467, 718
- KNN fn, tp: 10, 42
- KNN f1 score: 0.103
- KNN cohens kappa score: 0.063
- ------ Step 2/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1912, 273
- LR fn, tp: 4, 48
- LR f1 score: 0.257
- LR cohens kappa score: 0.226
- LR average precision score: 0.533
- -> test with 'GB'
- GB tn, fp: 2116, 69
- GB fn, tp: 4, 48
- GB f1 score: 0.568
- GB cohens kappa score: 0.554
- -> test with 'KNN'
- KNN tn, fp: 1454, 731
- KNN fn, tp: 5, 47
- KNN f1 score: 0.113
- KNN cohens kappa score: 0.073
- ------ Step 2/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1906, 277
- LR fn, tp: 8, 44
- LR f1 score: 0.236
- LR cohens kappa score: 0.204
- LR average precision score: 0.564
- -> test with 'GB'
- GB tn, fp: 2126, 57
- GB fn, tp: 11, 41
- GB f1 score: 0.547
- GB cohens kappa score: 0.532
- -> test with 'KNN'
- KNN tn, fp: 1446, 737
- KNN fn, tp: 12, 40
- KNN f1 score: 0.097
- KNN cohens kappa score: 0.055
- ====== 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: 1888, 297
- LR fn, tp: 8, 44
- LR f1 score: 0.224
- LR cohens kappa score: 0.191
- LR average precision score: 0.604
- -> test with 'GB'
- GB tn, fp: 2106, 79
- GB fn, tp: 8, 44
- GB f1 score: 0.503
- GB cohens kappa score: 0.486
- -> test with 'KNN'
- KNN tn, fp: 1475, 710
- KNN fn, tp: 5, 47
- KNN f1 score: 0.116
- KNN cohens kappa score: 0.076
- ------ Step 3/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1907, 278
- LR fn, tp: 7, 45
- LR f1 score: 0.240
- LR cohens kappa score: 0.208
- LR average precision score: 0.420
- -> test with 'GB'
- GB tn, fp: 2123, 62
- GB fn, tp: 12, 40
- GB f1 score: 0.519
- GB cohens kappa score: 0.504
- -> test with 'KNN'
- KNN tn, fp: 1446, 739
- KNN fn, tp: 10, 42
- KNN f1 score: 0.101
- KNN cohens kappa score: 0.060
- ------ Step 3/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1886, 299
- LR fn, tp: 2, 50
- LR f1 score: 0.249
- LR cohens kappa score: 0.218
- LR average precision score: 0.506
- -> test with 'GB'
- GB tn, fp: 2110, 75
- GB fn, tp: 4, 48
- GB f1 score: 0.549
- GB cohens kappa score: 0.533
- -> test with 'KNN'
- KNN tn, fp: 1447, 738
- KNN fn, tp: 7, 45
- KNN f1 score: 0.108
- KNN cohens kappa score: 0.067
- ------ Step 3/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1902, 283
- LR fn, tp: 9, 43
- LR f1 score: 0.228
- LR cohens kappa score: 0.195
- LR average precision score: 0.501
- -> test with 'GB'
- GB tn, fp: 2113, 72
- GB fn, tp: 10, 42
- GB f1 score: 0.506
- GB cohens kappa score: 0.490
- -> test with 'KNN'
- KNN tn, fp: 1470, 715
- KNN fn, tp: 11, 41
- KNN f1 score: 0.101
- KNN cohens kappa score: 0.061
- ------ Step 3/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1894, 289
- LR fn, tp: 7, 45
- LR f1 score: 0.233
- LR cohens kappa score: 0.201
- LR average precision score: 0.609
- -> test with 'GB'
- GB tn, fp: 2117, 66
- GB fn, tp: 9, 43
- GB f1 score: 0.534
- GB cohens kappa score: 0.519
- -> test with 'KNN'
- KNN tn, fp: 1448, 735
- KNN fn, tp: 9, 43
- KNN f1 score: 0.104
- KNN cohens kappa score: 0.063
- ====== 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: 1917, 268
- LR fn, tp: 8, 44
- LR f1 score: 0.242
- LR cohens kappa score: 0.210
- LR average precision score: 0.589
- -> test with 'GB'
- GB tn, fp: 2124, 61
- GB fn, tp: 17, 35
- GB f1 score: 0.473
- GB cohens kappa score: 0.457
- -> test with 'KNN'
- KNN tn, fp: 1491, 694
- KNN fn, tp: 12, 40
- 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: 1899, 286
- LR fn, tp: 6, 46
- LR f1 score: 0.240
- LR cohens kappa score: 0.208
- LR average precision score: 0.442
- -> test with 'GB'
- GB tn, fp: 2116, 69
- GB fn, tp: 8, 44
- GB f1 score: 0.533
- GB cohens kappa score: 0.518
- -> test with 'KNN'
- KNN tn, fp: 1500, 685
- KNN fn, tp: 7, 45
- KNN f1 score: 0.115
- KNN cohens kappa score: 0.075
- ------ Step 4/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1902, 283
- LR fn, tp: 7, 45
- LR f1 score: 0.237
- LR cohens kappa score: 0.205
- LR average precision score: 0.569
- -> test with 'GB'
- GB tn, fp: 2110, 75
- GB fn, tp: 7, 45
- GB f1 score: 0.523
- GB cohens kappa score: 0.507
- -> test with 'KNN'
- KNN tn, fp: 1417, 768
- KNN fn, tp: 7, 45
- KNN f1 score: 0.104
- KNN cohens kappa score: 0.063
- ------ Step 4/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1901, 284
- LR fn, tp: 9, 43
- LR f1 score: 0.227
- LR cohens kappa score: 0.195
- LR average precision score: 0.477
- -> test with 'GB'
- GB tn, fp: 2115, 70
- GB fn, tp: 9, 43
- GB f1 score: 0.521
- GB cohens kappa score: 0.505
- -> test with 'KNN'
- KNN tn, fp: 1413, 772
- KNN fn, tp: 10, 42
- KNN f1 score: 0.097
- KNN cohens kappa score: 0.056
- ------ Step 4/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1868, 315
- LR fn, tp: 3, 49
- LR f1 score: 0.236
- LR cohens kappa score: 0.203
- LR average precision score: 0.538
- -> test with 'GB'
- GB tn, fp: 2118, 65
- GB fn, tp: 6, 46
- GB f1 score: 0.564
- GB cohens kappa score: 0.550
- -> test with 'KNN'
- KNN tn, fp: 1464, 719
- KNN fn, tp: 10, 42
- KNN f1 score: 0.103
- KNN cohens kappa score: 0.062
- ====== 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: 1890, 295
- LR fn, tp: 3, 49
- LR f1 score: 0.247
- LR cohens kappa score: 0.216
- LR average precision score: 0.533
- -> test with 'GB'
- GB tn, fp: 2121, 64
- GB fn, tp: 4, 48
- GB f1 score: 0.585
- GB cohens kappa score: 0.572
- -> test with 'KNN'
- KNN tn, fp: 1469, 716
- KNN fn, tp: 9, 43
- KNN f1 score: 0.106
- KNN cohens kappa score: 0.065
- ------ Step 5/5: Slice 2/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.482
- -> test with 'GB'
- GB tn, fp: 2107, 78
- GB fn, tp: 7, 45
- GB f1 score: 0.514
- GB cohens kappa score: 0.498
- -> test with 'KNN'
- KNN tn, fp: 1448, 737
- KNN fn, tp: 7, 45
- KNN f1 score: 0.108
- KNN cohens kappa score: 0.067
- ------ Step 5/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1899, 286
- LR fn, tp: 10, 42
- LR f1 score: 0.221
- LR cohens kappa score: 0.188
- LR average precision score: 0.529
- -> test with 'GB'
- GB tn, fp: 2114, 71
- GB fn, tp: 11, 41
- GB f1 score: 0.500
- GB cohens kappa score: 0.484
- -> test with 'KNN'
- KNN tn, fp: 1464, 721
- KNN fn, tp: 11, 41
- KNN f1 score: 0.101
- KNN cohens kappa score: 0.060
- ------ Step 5/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1888, 297
- LR fn, tp: 4, 48
- LR f1 score: 0.242
- LR cohens kappa score: 0.210
- LR average precision score: 0.521
- -> test with 'GB'
- GB tn, fp: 2109, 76
- GB fn, tp: 9, 43
- GB f1 score: 0.503
- GB cohens kappa score: 0.486
- -> test with 'KNN'
- KNN tn, fp: 1470, 715
- KNN fn, tp: 7, 45
- KNN f1 score: 0.111
- KNN cohens kappa score: 0.070
- ------ Step 5/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1900, 283
- LR fn, tp: 9, 43
- LR f1 score: 0.228
- LR cohens kappa score: 0.195
- LR average precision score: 0.598
- -> test with 'GB'
- GB tn, fp: 2115, 68
- GB fn, tp: 10, 42
- GB f1 score: 0.519
- GB cohens kappa score: 0.503
- -> test with 'KNN'
- KNN tn, fp: 1432, 751
- KNN fn, tp: 12, 40
- KNN f1 score: 0.095
- KNN cohens kappa score: 0.054
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 1917, 315
- LR fn, tp: 10, 50
- LR f1 score: 0.257
- LR cohens kappa score: 0.226
- LR average precision score: 0.609
- average:
- LR tn, fp: 1896.36, 288.24
- LR fn, tp: 6.6, 45.4
- LR f1 score: 0.236
- LR cohens kappa score: 0.203
- LR average precision score: 0.526
- minimum:
- LR tn, fp: 1868, 268
- LR fn, tp: 2, 42
- LR f1 score: 0.219
- LR cohens kappa score: 0.187
- LR average precision score: 0.373
- -----[ GB ]-----
- maximum:
- GB tn, fp: 2129, 85
- GB fn, tp: 17, 48
- GB f1 score: 0.585
- GB cohens kappa score: 0.572
- average:
- GB tn, fp: 2114.32, 70.28
- GB fn, tp: 8.64, 43.36
- GB f1 score: 0.524
- GB cohens kappa score: 0.508
- minimum:
- GB tn, fp: 2100, 56
- GB fn, tp: 4, 35
- GB f1 score: 0.469
- GB cohens kappa score: 0.451
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 1508, 772
- KNN fn, tp: 12, 47
- KNN f1 score: 0.116
- KNN cohens kappa score: 0.076
- average:
- KNN tn, fp: 1455.76, 728.84
- KNN fn, tp: 8.8, 43.2
- KNN f1 score: 0.105
- KNN cohens kappa score: 0.064
- minimum:
- KNN tn, fp: 1413, 675
- KNN fn, tp: 5, 40
- KNN f1 score: 0.095
- KNN cohens kappa score: 0.054
|