| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702 |
- ///////////////////////////////////////////
- // Running ProWRAS 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: 1977, 208
- LR fn, tp: 7, 45
- LR f1 score: 0.295
- LR cohens kappa score: 0.267
- LR average precision score: 0.572
- -> test with 'GB'
- GB tn, fp: 2150, 35
- GB fn, tp: 15, 37
- GB f1 score: 0.597
- GB cohens kappa score: 0.586
- -> test with 'KNN'
- KNN tn, fp: 2132, 53
- KNN fn, tp: 9, 43
- KNN f1 score: 0.581
- KNN cohens kappa score: 0.568
- ------ Step 1/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1975, 210
- LR fn, tp: 7, 45
- LR f1 score: 0.293
- LR cohens kappa score: 0.265
- LR average precision score: 0.483
- -> test with 'GB'
- GB tn, fp: 2154, 31
- GB fn, tp: 15, 37
- GB f1 score: 0.617
- GB cohens kappa score: 0.606
- -> test with 'KNN'
- KNN tn, fp: 2151, 34
- KNN fn, tp: 13, 39
- KNN f1 score: 0.624
- KNN cohens kappa score: 0.614
- ------ Step 1/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1966, 219
- LR fn, tp: 9, 43
- LR f1 score: 0.274
- LR cohens kappa score: 0.245
- LR average precision score: 0.593
- -> test with 'GB'
- GB tn, fp: 2146, 39
- GB fn, tp: 11, 41
- GB f1 score: 0.621
- GB cohens kappa score: 0.610
- -> test with 'KNN'
- KNN tn, fp: 1459, 726
- KNN fn, tp: 11, 41
- KNN f1 score: 0.100
- KNN cohens kappa score: 0.059
- ------ Step 1/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1965, 220
- LR fn, tp: 8, 44
- LR f1 score: 0.278
- LR cohens kappa score: 0.249
- LR average precision score: 0.328
- -> test with 'GB'
- GB tn, fp: 2144, 41
- GB fn, tp: 15, 37
- GB f1 score: 0.569
- GB cohens kappa score: 0.557
- -> test with 'KNN'
- KNN tn, fp: 2137, 48
- KNN fn, tp: 12, 40
- KNN f1 score: 0.571
- KNN cohens kappa score: 0.559
- ------ Step 1/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1969, 214
- LR fn, tp: 8, 44
- LR f1 score: 0.284
- LR cohens kappa score: 0.255
- LR average precision score: 0.563
- -> test with 'GB'
- GB tn, fp: 2155, 28
- GB fn, tp: 15, 37
- GB f1 score: 0.632
- GB cohens kappa score: 0.623
- -> test with 'KNN'
- KNN tn, fp: 2147, 36
- KNN fn, tp: 15, 37
- KNN f1 score: 0.592
- KNN cohens kappa score: 0.581
- ====== 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: 1954, 231
- LR fn, tp: 7, 45
- LR f1 score: 0.274
- LR cohens kappa score: 0.245
- LR average precision score: 0.521
- -> test with 'GB'
- GB tn, fp: 2141, 44
- GB fn, tp: 11, 41
- GB f1 score: 0.599
- GB cohens kappa score: 0.587
- -> test with 'KNN'
- KNN tn, fp: 2126, 59
- KNN fn, tp: 11, 41
- KNN f1 score: 0.539
- KNN cohens kappa score: 0.525
- ------ Step 2/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1948, 237
- LR fn, tp: 9, 43
- LR f1 score: 0.259
- LR cohens kappa score: 0.229
- LR average precision score: 0.468
- -> test with 'GB'
- GB tn, fp: 2135, 50
- GB fn, tp: 15, 37
- GB f1 score: 0.532
- GB cohens kappa score: 0.518
- -> test with 'KNN'
- KNN tn, fp: 2138, 47
- KNN fn, tp: 9, 43
- KNN f1 score: 0.606
- KNN cohens kappa score: 0.594
- ------ Step 2/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 2010, 175
- LR fn, tp: 8, 44
- LR f1 score: 0.325
- LR cohens kappa score: 0.298
- LR average precision score: 0.536
- -> test with 'GB'
- GB tn, fp: 2154, 31
- GB fn, tp: 16, 36
- GB f1 score: 0.605
- GB cohens kappa score: 0.594
- -> test with 'KNN'
- KNN tn, fp: 2142, 43
- KNN fn, tp: 13, 39
- KNN f1 score: 0.582
- KNN cohens kappa score: 0.570
- ------ Step 2/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1967, 218
- LR fn, tp: 5, 47
- LR f1 score: 0.297
- LR cohens kappa score: 0.268
- LR average precision score: 0.533
- -> test with 'GB'
- GB tn, fp: 2152, 33
- GB fn, tp: 8, 44
- GB f1 score: 0.682
- GB cohens kappa score: 0.673
- -> test with 'KNN'
- KNN tn, fp: 2136, 49
- KNN fn, tp: 10, 42
- KNN f1 score: 0.587
- KNN cohens kappa score: 0.575
- ------ Step 2/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1994, 189
- LR fn, tp: 9, 43
- LR f1 score: 0.303
- LR cohens kappa score: 0.275
- LR average precision score: 0.562
- -> test with 'GB'
- GB tn, fp: 2162, 21
- GB fn, tp: 19, 33
- GB f1 score: 0.623
- GB cohens kappa score: 0.613
- -> test with 'KNN'
- KNN tn, fp: 2148, 35
- KNN fn, tp: 16, 36
- KNN f1 score: 0.585
- KNN cohens kappa score: 0.574
- ====== 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: 1979, 206
- LR fn, tp: 8, 44
- LR f1 score: 0.291
- LR cohens kappa score: 0.263
- LR average precision score: 0.588
- -> test with 'GB'
- GB tn, fp: 2157, 28
- GB fn, tp: 9, 43
- GB f1 score: 0.699
- GB cohens kappa score: 0.691
- -> test with 'KNN'
- KNN tn, fp: 2136, 49
- KNN fn, tp: 10, 42
- KNN f1 score: 0.587
- KNN cohens kappa score: 0.575
- ------ Step 3/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1970, 215
- LR fn, tp: 8, 44
- LR f1 score: 0.283
- LR cohens kappa score: 0.254
- LR average precision score: 0.418
- -> test with 'GB'
- GB tn, fp: 2155, 30
- GB fn, tp: 17, 35
- GB f1 score: 0.598
- GB cohens kappa score: 0.588
- -> test with 'KNN'
- KNN tn, fp: 1462, 723
- KNN fn, tp: 12, 40
- KNN f1 score: 0.098
- KNN cohens kappa score: 0.057
- ------ Step 3/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1960, 225
- LR fn, tp: 4, 48
- LR f1 score: 0.295
- LR cohens kappa score: 0.267
- LR average precision score: 0.486
- -> test with 'GB'
- GB tn, fp: 2138, 47
- GB fn, tp: 6, 46
- GB f1 score: 0.634
- GB cohens kappa score: 0.623
- -> test with 'KNN'
- KNN tn, fp: 2134, 51
- KNN fn, tp: 8, 44
- KNN f1 score: 0.599
- KNN cohens kappa score: 0.586
- ------ Step 3/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1971, 214
- LR fn, tp: 11, 41
- LR f1 score: 0.267
- LR cohens kappa score: 0.238
- LR average precision score: 0.519
- -> test with 'GB'
- GB tn, fp: 2149, 36
- GB fn, tp: 17, 35
- GB f1 score: 0.569
- GB cohens kappa score: 0.557
- -> test with 'KNN'
- KNN tn, fp: 2145, 40
- KNN fn, tp: 15, 37
- KNN f1 score: 0.574
- KNN cohens kappa score: 0.561
- ------ Step 3/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1958, 225
- LR fn, tp: 7, 45
- LR f1 score: 0.280
- LR cohens kappa score: 0.250
- LR average precision score: 0.586
- -> test with 'GB'
- GB tn, fp: 2148, 35
- GB fn, tp: 17, 35
- GB f1 score: 0.574
- GB cohens kappa score: 0.562
- -> test with 'KNN'
- KNN tn, fp: 2143, 40
- KNN fn, tp: 12, 40
- KNN f1 score: 0.606
- KNN cohens kappa score: 0.595
- ====== 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: 1972, 213
- LR fn, tp: 8, 44
- LR f1 score: 0.285
- LR cohens kappa score: 0.256
- LR average precision score: 0.570
- -> test with 'GB'
- GB tn, fp: 2152, 33
- GB fn, tp: 19, 33
- GB f1 score: 0.559
- GB cohens kappa score: 0.548
- -> test with 'KNN'
- KNN tn, fp: 2152, 33
- KNN fn, tp: 13, 39
- KNN f1 score: 0.629
- KNN cohens kappa score: 0.619
- ------ Step 4/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1968, 217
- LR fn, tp: 8, 44
- LR f1 score: 0.281
- LR cohens kappa score: 0.252
- LR average precision score: 0.424
- -> test with 'GB'
- GB tn, fp: 2146, 39
- GB fn, tp: 13, 39
- GB f1 score: 0.600
- GB cohens kappa score: 0.589
- -> test with 'KNN'
- KNN tn, fp: 2141, 44
- KNN fn, tp: 11, 41
- KNN f1 score: 0.599
- KNN cohens kappa score: 0.587
- ------ Step 4/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1980, 205
- LR fn, tp: 7, 45
- LR f1 score: 0.298
- LR cohens kappa score: 0.270
- LR average precision score: 0.507
- -> test with 'GB'
- GB tn, fp: 2152, 33
- GB fn, tp: 9, 43
- GB f1 score: 0.672
- GB cohens kappa score: 0.663
- -> test with 'KNN'
- KNN tn, fp: 2140, 45
- KNN fn, tp: 9, 43
- KNN f1 score: 0.614
- KNN cohens kappa score: 0.603
- ------ Step 4/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1974, 211
- LR fn, tp: 10, 42
- LR f1 score: 0.275
- LR cohens kappa score: 0.246
- LR average precision score: 0.481
- -> test with 'GB'
- GB tn, fp: 2145, 40
- GB fn, tp: 14, 38
- GB f1 score: 0.585
- GB cohens kappa score: 0.573
- -> test with 'KNN'
- KNN tn, fp: 2135, 50
- KNN fn, tp: 14, 38
- KNN f1 score: 0.543
- KNN cohens kappa score: 0.529
- ------ Step 4/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1954, 229
- LR fn, tp: 5, 47
- LR f1 score: 0.287
- LR cohens kappa score: 0.258
- LR average precision score: 0.509
- -> test with 'GB'
- GB tn, fp: 2144, 39
- GB fn, tp: 10, 42
- GB f1 score: 0.632
- GB cohens kappa score: 0.621
- -> test with 'KNN'
- KNN tn, fp: 2134, 49
- KNN fn, tp: 12, 40
- KNN f1 score: 0.567
- KNN cohens kappa score: 0.554
- ====== 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: 1973, 212
- LR fn, tp: 4, 48
- LR f1 score: 0.308
- LR cohens kappa score: 0.280
- LR average precision score: 0.542
- -> test with 'GB'
- GB tn, fp: 2149, 36
- GB fn, tp: 12, 40
- GB f1 score: 0.625
- GB cohens kappa score: 0.614
- -> test with 'KNN'
- KNN tn, fp: 2149, 36
- KNN fn, tp: 10, 42
- KNN f1 score: 0.646
- KNN cohens kappa score: 0.636
- ------ Step 5/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1970, 215
- LR fn, tp: 8, 44
- LR f1 score: 0.283
- LR cohens kappa score: 0.254
- LR average precision score: 0.446
- -> test with 'GB'
- GB tn, fp: 2146, 39
- GB fn, tp: 16, 36
- GB f1 score: 0.567
- GB cohens kappa score: 0.555
- -> test with 'KNN'
- KNN tn, fp: 2134, 51
- KNN fn, tp: 10, 42
- KNN f1 score: 0.579
- KNN cohens kappa score: 0.566
- ------ Step 5/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1980, 205
- LR fn, tp: 11, 41
- LR f1 score: 0.275
- LR cohens kappa score: 0.246
- LR average precision score: 0.540
- -> test with 'GB'
- GB tn, fp: 2154, 31
- GB fn, tp: 16, 36
- GB f1 score: 0.605
- GB cohens kappa score: 0.594
- -> test with 'KNN'
- KNN tn, fp: 2139, 46
- KNN fn, tp: 18, 34
- KNN f1 score: 0.515
- KNN cohens kappa score: 0.501
- ------ Step 5/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8530 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1960, 225
- LR fn, tp: 4, 48
- LR f1 score: 0.295
- LR cohens kappa score: 0.267
- LR average precision score: 0.525
- -> test with 'GB'
- GB tn, fp: 2138, 47
- GB fn, tp: 12, 40
- GB f1 score: 0.576
- GB cohens kappa score: 0.563
- -> test with 'KNN'
- KNN tn, fp: 2141, 44
- KNN fn, tp: 9, 43
- KNN f1 score: 0.619
- KNN cohens kappa score: 0.607
- ------ Step 5/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 8532 synthetic samples
- -> test with 'LR'
- LR tn, fp: 1987, 196
- LR fn, tp: 9, 43
- LR f1 score: 0.296
- LR cohens kappa score: 0.268
- LR average precision score: 0.600
- -> test with 'GB'
- GB tn, fp: 2153, 30
- GB fn, tp: 17, 35
- GB f1 score: 0.598
- GB cohens kappa score: 0.588
- -> test with 'KNN'
- KNN tn, fp: 2141, 42
- KNN fn, tp: 13, 39
- KNN f1 score: 0.586
- KNN cohens kappa score: 0.574
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 2010, 237
- LR fn, tp: 11, 48
- LR f1 score: 0.325
- LR cohens kappa score: 0.298
- LR average precision score: 0.600
- average:
- LR tn, fp: 1971.24, 213.36
- LR fn, tp: 7.56, 44.44
- LR f1 score: 0.287
- LR cohens kappa score: 0.259
- LR average precision score: 0.516
- minimum:
- LR tn, fp: 1948, 175
- LR fn, tp: 4, 41
- LR f1 score: 0.259
- LR cohens kappa score: 0.229
- LR average precision score: 0.328
- -----[ GB ]-----
- maximum:
- GB tn, fp: 2162, 50
- GB fn, tp: 19, 46
- GB f1 score: 0.699
- GB cohens kappa score: 0.691
- average:
- GB tn, fp: 2148.76, 35.84
- GB fn, tp: 13.76, 38.24
- GB f1 score: 0.607
- GB cohens kappa score: 0.596
- minimum:
- GB tn, fp: 2135, 21
- GB fn, tp: 6, 33
- GB f1 score: 0.532
- GB cohens kappa score: 0.518
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 2152, 726
- KNN fn, tp: 18, 44
- KNN f1 score: 0.646
- KNN cohens kappa score: 0.636
- average:
- KNN tn, fp: 2085.68, 98.92
- KNN fn, tp: 11.8, 40.2
- KNN f1 score: 0.549
- KNN cohens kappa score: 0.535
- minimum:
- KNN tn, fp: 1459, 33
- KNN fn, tp: 8, 34
- KNN f1 score: 0.098
- KNN cohens kappa score: 0.057
|