| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702 |
- ///////////////////////////////////////////
- // Running convGAN on imblearn_webpage
- ///////////////////////////////////////////
- Load 'data_input/imblearn_webpage'
- from imblearn
- non empty cut in data_input/imblearn_webpage! (76 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 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6350, 410
- LR fn, tp: 24, 173
- LR f1 score: 0.444
- LR cohens kappa score: 0.419
- LR average precision score: 0.765
- -> test with 'GB'
- GB tn, fp: 6399, 361
- GB fn, tp: 90, 107
- GB f1 score: 0.322
- GB cohens kappa score: 0.294
- -> test with 'KNN'
- KNN tn, fp: 6265, 495
- KNN fn, tp: 15, 182
- KNN f1 score: 0.416
- KNN cohens kappa score: 0.390
- ------ Step 1/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6402, 358
- LR fn, tp: 21, 176
- LR f1 score: 0.482
- LR cohens kappa score: 0.459
- LR average precision score: 0.793
- -> test with 'GB'
- GB tn, fp: 6324, 436
- GB fn, tp: 87, 110
- GB f1 score: 0.296
- GB cohens kappa score: 0.266
- -> test with 'KNN'
- KNN tn, fp: 6370, 390
- KNN fn, tp: 33, 164
- KNN f1 score: 0.437
- KNN cohens kappa score: 0.412
- ------ Step 1/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6386, 374
- LR fn, tp: 15, 182
- LR f1 score: 0.483
- LR cohens kappa score: 0.461
- LR average precision score: 0.841
- -> test with 'GB'
- GB tn, fp: 6359, 401
- GB fn, tp: 89, 108
- GB f1 score: 0.306
- GB cohens kappa score: 0.276
- -> test with 'KNN'
- KNN tn, fp: 6226, 534
- KNN fn, tp: 26, 171
- KNN f1 score: 0.379
- KNN cohens kappa score: 0.350
- ------ Step 1/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6372, 388
- LR fn, tp: 17, 180
- LR f1 score: 0.471
- LR cohens kappa score: 0.447
- LR average precision score: 0.754
- -> test with 'GB'
- GB tn, fp: 6348, 412
- GB fn, tp: 94, 103
- GB f1 score: 0.289
- GB cohens kappa score: 0.259
- -> test with 'KNN'
- KNN tn, fp: 6270, 490
- KNN fn, tp: 27, 170
- KNN f1 score: 0.397
- KNN cohens kappa score: 0.369
- ------ Step 1/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26252 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6398, 361
- LR fn, tp: 33, 160
- LR f1 score: 0.448
- LR cohens kappa score: 0.425
- LR average precision score: 0.741
- -> test with 'GB'
- GB tn, fp: 6373, 386
- GB fn, tp: 92, 101
- GB f1 score: 0.297
- GB cohens kappa score: 0.268
- -> test with 'KNN'
- KNN tn, fp: 6246, 513
- KNN fn, tp: 30, 163
- KNN f1 score: 0.375
- KNN cohens kappa score: 0.347
- ====== Step 2/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 2/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6374, 386
- LR fn, tp: 23, 174
- LR f1 score: 0.460
- LR cohens kappa score: 0.436
- LR average precision score: 0.793
- -> test with 'GB'
- GB tn, fp: 6353, 407
- GB fn, tp: 87, 110
- GB f1 score: 0.308
- GB cohens kappa score: 0.279
- -> test with 'KNN'
- KNN tn, fp: 6243, 517
- KNN fn, tp: 30, 167
- KNN f1 score: 0.379
- KNN cohens kappa score: 0.351
- ------ Step 2/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6390, 370
- LR fn, tp: 22, 175
- LR f1 score: 0.472
- LR cohens kappa score: 0.449
- LR average precision score: 0.796
- -> test with 'GB'
- GB tn, fp: 6383, 377
- GB fn, tp: 93, 104
- GB f1 score: 0.307
- GB cohens kappa score: 0.278
- -> test with 'KNN'
- KNN tn, fp: 6236, 524
- KNN fn, tp: 27, 170
- KNN f1 score: 0.382
- KNN cohens kappa score: 0.353
- ------ Step 2/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6400, 360
- LR fn, tp: 28, 169
- LR f1 score: 0.466
- LR cohens kappa score: 0.443
- LR average precision score: 0.758
- -> test with 'GB'
- GB tn, fp: 6320, 440
- GB fn, tp: 95, 102
- GB f1 score: 0.276
- GB cohens kappa score: 0.245
- -> test with 'KNN'
- KNN tn, fp: 6260, 500
- KNN fn, tp: 27, 170
- KNN f1 score: 0.392
- KNN cohens kappa score: 0.364
- ------ Step 2/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6330, 430
- LR fn, tp: 20, 177
- LR f1 score: 0.440
- LR cohens kappa score: 0.415
- LR average precision score: 0.755
- -> test with 'GB'
- GB tn, fp: 6422, 338
- GB fn, tp: 91, 106
- GB f1 score: 0.331
- GB cohens kappa score: 0.303
- -> test with 'KNN'
- KNN tn, fp: 6356, 404
- KNN fn, tp: 20, 177
- KNN f1 score: 0.455
- KNN cohens kappa score: 0.431
- ------ Step 2/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26252 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6372, 387
- LR fn, tp: 20, 173
- LR f1 score: 0.459
- LR cohens kappa score: 0.436
- LR average precision score: 0.791
- -> test with 'GB'
- GB tn, fp: 6341, 418
- GB fn, tp: 99, 94
- GB f1 score: 0.267
- GB cohens kappa score: 0.236
- -> test with 'KNN'
- KNN tn, fp: 6292, 467
- KNN fn, tp: 32, 161
- KNN f1 score: 0.392
- KNN cohens kappa score: 0.365
- ====== Step 3/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 3/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6360, 400
- LR fn, tp: 30, 167
- LR f1 score: 0.437
- LR cohens kappa score: 0.412
- LR average precision score: 0.733
- -> test with 'GB'
- GB tn, fp: 6361, 399
- GB fn, tp: 93, 104
- GB f1 score: 0.297
- GB cohens kappa score: 0.267
- -> test with 'KNN'
- KNN tn, fp: 6339, 421
- KNN fn, tp: 29, 168
- KNN f1 score: 0.427
- KNN cohens kappa score: 0.402
- ------ Step 3/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6410, 350
- LR fn, tp: 18, 179
- LR f1 score: 0.493
- LR cohens kappa score: 0.471
- LR average precision score: 0.798
- -> test with 'GB'
- GB tn, fp: 6342, 418
- GB fn, tp: 94, 103
- GB f1 score: 0.287
- GB cohens kappa score: 0.256
- -> test with 'KNN'
- KNN tn, fp: 6234, 526
- KNN fn, tp: 23, 174
- KNN f1 score: 0.388
- KNN cohens kappa score: 0.360
- ------ Step 3/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6400, 360
- LR fn, tp: 32, 165
- LR f1 score: 0.457
- LR cohens kappa score: 0.434
- LR average precision score: 0.706
- -> test with 'GB'
- GB tn, fp: 6390, 370
- GB fn, tp: 100, 97
- GB f1 score: 0.292
- GB cohens kappa score: 0.263
- -> test with 'KNN'
- KNN tn, fp: 6282, 478
- KNN fn, tp: 40, 157
- KNN f1 score: 0.377
- KNN cohens kappa score: 0.349
- ------ Step 3/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6360, 400
- LR fn, tp: 17, 180
- LR f1 score: 0.463
- LR cohens kappa score: 0.440
- LR average precision score: 0.808
- -> test with 'GB'
- GB tn, fp: 6320, 440
- GB fn, tp: 86, 111
- GB f1 score: 0.297
- GB cohens kappa score: 0.266
- -> test with 'KNN'
- KNN tn, fp: 6253, 507
- KNN fn, tp: 21, 176
- KNN f1 score: 0.400
- KNN cohens kappa score: 0.372
- ------ Step 3/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26252 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6372, 387
- LR fn, tp: 17, 176
- LR f1 score: 0.466
- LR cohens kappa score: 0.443
- LR average precision score: 0.773
- -> test with 'GB'
- GB tn, fp: 6391, 368
- GB fn, tp: 91, 102
- GB f1 score: 0.308
- GB cohens kappa score: 0.279
- -> test with 'KNN'
- KNN tn, fp: 6240, 519
- KNN fn, tp: 16, 177
- KNN f1 score: 0.398
- KNN cohens kappa score: 0.371
- ====== Step 4/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 4/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6398, 362
- LR fn, tp: 27, 170
- LR f1 score: 0.466
- LR cohens kappa score: 0.443
- LR average precision score: 0.745
- -> test with 'GB'
- GB tn, fp: 6387, 373
- GB fn, tp: 100, 97
- GB f1 score: 0.291
- GB cohens kappa score: 0.261
- -> test with 'KNN'
- KNN tn, fp: 6270, 490
- KNN fn, tp: 37, 160
- KNN f1 score: 0.378
- KNN cohens kappa score: 0.350
- ------ Step 4/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6351, 409
- LR fn, tp: 21, 176
- LR f1 score: 0.450
- LR cohens kappa score: 0.426
- LR average precision score: 0.756
- -> test with 'GB'
- GB tn, fp: 6331, 429
- GB fn, tp: 101, 96
- GB f1 score: 0.266
- GB cohens kappa score: 0.234
- -> test with 'KNN'
- KNN tn, fp: 6238, 522
- KNN fn, tp: 26, 171
- KNN f1 score: 0.384
- KNN cohens kappa score: 0.356
- ------ Step 4/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6377, 383
- LR fn, tp: 17, 180
- LR f1 score: 0.474
- LR cohens kappa score: 0.451
- LR average precision score: 0.807
- -> test with 'GB'
- GB tn, fp: 6421, 339
- GB fn, tp: 79, 118
- GB f1 score: 0.361
- GB cohens kappa score: 0.335
- -> test with 'KNN'
- KNN tn, fp: 6346, 414
- KNN fn, tp: 19, 178
- KNN f1 score: 0.451
- KNN cohens kappa score: 0.427
- ------ Step 4/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6377, 383
- LR fn, tp: 21, 176
- LR f1 score: 0.466
- LR cohens kappa score: 0.442
- LR average precision score: 0.752
- -> test with 'GB'
- GB tn, fp: 6317, 443
- GB fn, tp: 92, 105
- GB f1 score: 0.282
- GB cohens kappa score: 0.251
- -> test with 'KNN'
- KNN tn, fp: 6230, 530
- KNN fn, tp: 29, 168
- KNN f1 score: 0.375
- KNN cohens kappa score: 0.347
- ------ Step 4/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26252 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6354, 405
- LR fn, tp: 20, 173
- LR f1 score: 0.449
- LR cohens kappa score: 0.425
- LR average precision score: 0.791
- -> test with 'GB'
- GB tn, fp: 6351, 408
- GB fn, tp: 87, 106
- GB f1 score: 0.300
- GB cohens kappa score: 0.270
- -> test with 'KNN'
- KNN tn, fp: 6250, 509
- KNN fn, tp: 21, 172
- KNN f1 score: 0.394
- KNN cohens kappa score: 0.366
- ====== Step 5/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 5/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6411, 349
- LR fn, tp: 22, 175
- LR f1 score: 0.485
- LR cohens kappa score: 0.463
- LR average precision score: 0.769
- -> test with 'GB'
- GB tn, fp: 6387, 373
- GB fn, tp: 91, 106
- GB f1 score: 0.314
- GB cohens kappa score: 0.285
- -> test with 'KNN'
- KNN tn, fp: 6320, 440
- KNN fn, tp: 23, 174
- KNN f1 score: 0.429
- KNN cohens kappa score: 0.404
- ------ Step 5/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6407, 353
- LR fn, tp: 26, 171
- LR f1 score: 0.474
- LR cohens kappa score: 0.452
- LR average precision score: 0.741
- -> test with 'GB'
- GB tn, fp: 6355, 405
- GB fn, tp: 94, 103
- GB f1 score: 0.292
- GB cohens kappa score: 0.262
- -> test with 'KNN'
- KNN tn, fp: 6243, 517
- KNN fn, tp: 31, 166
- KNN f1 score: 0.377
- KNN cohens kappa score: 0.349
- ------ Step 5/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6311, 449
- LR fn, tp: 25, 172
- LR f1 score: 0.421
- LR cohens kappa score: 0.395
- LR average precision score: 0.746
- -> test with 'GB'
- GB tn, fp: 6335, 425
- GB fn, tp: 85, 112
- GB f1 score: 0.305
- GB cohens kappa score: 0.275
- -> test with 'KNN'
- KNN tn, fp: 6301, 459
- KNN fn, tp: 21, 176
- KNN f1 score: 0.423
- KNN cohens kappa score: 0.397
- ------ Step 5/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26255 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6375, 385
- LR fn, tp: 17, 180
- LR f1 score: 0.472
- LR cohens kappa score: 0.449
- LR average precision score: 0.824
- -> test with 'GB'
- GB tn, fp: 6353, 407
- GB fn, tp: 92, 105
- GB f1 score: 0.296
- GB cohens kappa score: 0.266
- -> test with 'KNN'
- KNN tn, fp: 6276, 484
- KNN fn, tp: 30, 167
- KNN f1 score: 0.394
- KNN cohens kappa score: 0.366
- ------ Step 5/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 26252 synthetic samples
- -> test with 'LR'
- LR tn, fp: 6388, 371
- LR fn, tp: 25, 168
- LR f1 score: 0.459
- LR cohens kappa score: 0.436
- LR average precision score: 0.755
- -> test with 'GB'
- GB tn, fp: 6372, 387
- GB fn, tp: 100, 93
- GB f1 score: 0.276
- GB cohens kappa score: 0.247
- -> test with 'KNN'
- KNN tn, fp: 6213, 546
- KNN fn, tp: 31, 162
- KNN f1 score: 0.360
- KNN cohens kappa score: 0.330
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 6411, 449
- LR fn, tp: 33, 182
- LR f1 score: 0.493
- LR cohens kappa score: 0.471
- LR average precision score: 0.841
- average:
- LR tn, fp: 6377.0, 382.8
- LR fn, tp: 22.32, 173.88
- LR f1 score: 0.462
- LR cohens kappa score: 0.439
- LR average precision score: 0.772
- minimum:
- LR tn, fp: 6311, 349
- LR fn, tp: 15, 160
- LR f1 score: 0.421
- LR cohens kappa score: 0.395
- LR average precision score: 0.706
- -----[ GB ]-----
- maximum:
- GB tn, fp: 6422, 443
- GB fn, tp: 101, 118
- GB f1 score: 0.361
- GB cohens kappa score: 0.335
- average:
- GB tn, fp: 6361.4, 398.4
- GB fn, tp: 92.08, 104.12
- GB f1 score: 0.298
- GB cohens kappa score: 0.269
- minimum:
- GB tn, fp: 6317, 338
- GB fn, tp: 79, 93
- GB f1 score: 0.266
- GB cohens kappa score: 0.234
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 6370, 546
- KNN fn, tp: 40, 182
- KNN f1 score: 0.455
- KNN cohens kappa score: 0.431
- average:
- KNN tn, fp: 6271.96, 487.84
- KNN fn, tp: 26.56, 169.64
- KNN f1 score: 0.398
- KNN cohens kappa score: 0.371
- minimum:
- KNN tn, fp: 6213, 390
- KNN fn, tp: 15, 157
- KNN f1 score: 0.360
- KNN cohens kappa score: 0.330
|