| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701 |
- ///////////////////////////////////////////
- // Running ProWRAS on imblearn_ozone_level
- ///////////////////////////////////////////
- Load 'data_input/imblearn_ozone_level'
- from imblearn
- 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 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 459, 34
- LR fn, tp: 2, 13
- LR f1 score: 0.419
- LR cohens kappa score: 0.392
- LR average precision score: 0.394
- -> test with 'GB'
- GB tn, fp: 482, 11
- GB fn, tp: 11, 4
- GB f1 score: 0.267
- GB cohens kappa score: 0.244
- -> test with 'KNN'
- KNN tn, fp: 424, 69
- KNN fn, tp: 11, 4
- KNN f1 score: 0.091
- KNN cohens kappa score: 0.044
- ------ Step 1/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 452, 41
- LR fn, tp: 5, 10
- LR f1 score: 0.303
- LR cohens kappa score: 0.270
- LR average precision score: 0.237
- -> test with 'GB'
- GB tn, fp: 490, 3
- GB fn, tp: 11, 4
- GB f1 score: 0.364
- GB cohens kappa score: 0.351
- -> test with 'KNN'
- KNN tn, fp: 426, 67
- KNN fn, tp: 10, 5
- KNN f1 score: 0.115
- KNN cohens kappa score: 0.069
- ------ Step 1/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 451, 42
- LR fn, tp: 5, 10
- LR f1 score: 0.299
- LR cohens kappa score: 0.265
- LR average precision score: 0.168
- -> test with 'GB'
- GB tn, fp: 485, 8
- GB fn, tp: 11, 4
- GB f1 score: 0.296
- GB cohens kappa score: 0.277
- -> test with 'KNN'
- KNN tn, fp: 421, 72
- KNN fn, tp: 9, 6
- KNN f1 score: 0.129
- KNN cohens kappa score: 0.084
- ------ Step 1/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 444, 49
- LR fn, tp: 7, 8
- LR f1 score: 0.222
- LR cohens kappa score: 0.184
- LR average precision score: 0.220
- -> test with 'GB'
- GB tn, fp: 487, 6
- GB fn, tp: 12, 3
- GB f1 score: 0.250
- GB cohens kappa score: 0.233
- -> test with 'KNN'
- KNN tn, fp: 449, 44
- KNN fn, tp: 8, 7
- KNN f1 score: 0.212
- KNN cohens kappa score: 0.174
- ------ Step 1/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 443, 48
- LR fn, tp: 3, 10
- LR f1 score: 0.282
- LR cohens kappa score: 0.250
- LR average precision score: 0.144
- -> test with 'GB'
- GB tn, fp: 484, 7
- GB fn, tp: 10, 3
- GB f1 score: 0.261
- GB cohens kappa score: 0.244
- -> test with 'KNN'
- KNN tn, fp: 425, 66
- KNN fn, tp: 9, 4
- KNN f1 score: 0.096
- KNN cohens kappa score: 0.055
- ====== Step 2/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 2/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 453, 40
- LR fn, tp: 8, 7
- LR f1 score: 0.226
- LR cohens kappa score: 0.190
- LR average precision score: 0.203
- -> test with 'GB'
- GB tn, fp: 484, 9
- GB fn, tp: 12, 3
- GB f1 score: 0.222
- GB cohens kappa score: 0.201
- -> test with 'KNN'
- KNN tn, fp: 428, 65
- KNN fn, tp: 11, 4
- KNN f1 score: 0.095
- KNN cohens kappa score: 0.049
- ------ Step 2/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 461, 32
- LR fn, tp: 5, 10
- LR f1 score: 0.351
- LR cohens kappa score: 0.321
- LR average precision score: 0.180
- -> test with 'GB'
- GB tn, fp: 485, 8
- GB fn, tp: 13, 2
- GB f1 score: 0.160
- GB cohens kappa score: 0.140
- -> test with 'KNN'
- KNN tn, fp: 428, 65
- KNN fn, tp: 6, 9
- KNN f1 score: 0.202
- KNN cohens kappa score: 0.161
- ------ Step 2/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 454, 39
- LR fn, tp: 2, 13
- LR f1 score: 0.388
- LR cohens kappa score: 0.359
- LR average precision score: 0.404
- -> test with 'GB'
- GB tn, fp: 487, 6
- GB fn, tp: 11, 4
- GB f1 score: 0.320
- GB cohens kappa score: 0.304
- -> test with 'KNN'
- KNN tn, fp: 427, 66
- KNN fn, tp: 10, 5
- KNN f1 score: 0.116
- KNN cohens kappa score: 0.071
- ------ Step 2/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 458, 35
- LR fn, tp: 5, 10
- LR f1 score: 0.333
- LR cohens kappa score: 0.302
- LR average precision score: 0.165
- -> test with 'GB'
- GB tn, fp: 485, 8
- GB fn, tp: 12, 3
- GB f1 score: 0.231
- GB cohens kappa score: 0.211
- -> test with 'KNN'
- KNN tn, fp: 441, 52
- KNN fn, tp: 9, 6
- KNN f1 score: 0.164
- KNN cohens kappa score: 0.123
- ------ Step 2/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 442, 49
- LR fn, tp: 5, 8
- LR f1 score: 0.229
- LR cohens kappa score: 0.195
- LR average precision score: 0.195
- -> test with 'GB'
- GB tn, fp: 488, 3
- GB fn, tp: 11, 2
- GB f1 score: 0.222
- GB cohens kappa score: 0.211
- -> test with 'KNN'
- KNN tn, fp: 413, 78
- KNN fn, tp: 7, 6
- KNN f1 score: 0.124
- KNN cohens kappa score: 0.083
- ====== Step 3/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 3/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 450, 43
- LR fn, tp: 4, 11
- LR f1 score: 0.319
- LR cohens kappa score: 0.286
- LR average precision score: 0.236
- -> test with 'GB'
- GB tn, fp: 485, 8
- GB fn, tp: 14, 1
- GB f1 score: 0.083
- GB cohens kappa score: 0.063
- -> test with 'KNN'
- KNN tn, fp: 445, 48
- KNN fn, tp: 11, 4
- KNN f1 score: 0.119
- KNN cohens kappa score: 0.077
- ------ Step 3/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 448, 45
- LR fn, tp: 5, 10
- LR f1 score: 0.286
- LR cohens kappa score: 0.251
- LR average precision score: 0.168
- -> test with 'GB'
- GB tn, fp: 482, 11
- GB fn, tp: 10, 5
- GB f1 score: 0.323
- GB cohens kappa score: 0.301
- -> test with 'KNN'
- KNN tn, fp: 443, 50
- KNN fn, tp: 11, 4
- KNN f1 score: 0.116
- KNN cohens kappa score: 0.073
- ------ Step 3/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 453, 40
- LR fn, tp: 5, 10
- LR f1 score: 0.308
- LR cohens kappa score: 0.275
- LR average precision score: 0.251
- -> test with 'GB'
- GB tn, fp: 485, 8
- GB fn, tp: 12, 3
- GB f1 score: 0.231
- GB cohens kappa score: 0.211
- -> test with 'KNN'
- KNN tn, fp: 433, 60
- KNN fn, tp: 10, 5
- KNN f1 score: 0.125
- KNN cohens kappa score: 0.081
- ------ Step 3/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 463, 30
- LR fn, tp: 7, 8
- LR f1 score: 0.302
- LR cohens kappa score: 0.271
- LR average precision score: 0.183
- -> test with 'GB'
- GB tn, fp: 490, 3
- GB fn, tp: 12, 3
- GB f1 score: 0.286
- GB cohens kappa score: 0.273
- -> test with 'KNN'
- KNN tn, fp: 425, 68
- KNN fn, tp: 9, 6
- KNN f1 score: 0.135
- KNN cohens kappa score: 0.090
- ------ Step 3/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 443, 48
- LR fn, tp: 4, 9
- LR f1 score: 0.257
- LR cohens kappa score: 0.225
- LR average precision score: 0.347
- -> test with 'GB'
- GB tn, fp: 485, 6
- GB fn, tp: 8, 5
- GB f1 score: 0.417
- GB cohens kappa score: 0.403
- -> test with 'KNN'
- KNN tn, fp: 409, 82
- KNN fn, tp: 7, 6
- KNN f1 score: 0.119
- KNN cohens kappa score: 0.077
- ====== Step 4/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 4/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 449, 44
- LR fn, tp: 4, 11
- LR f1 score: 0.314
- LR cohens kappa score: 0.281
- LR average precision score: 0.273
- -> test with 'GB'
- GB tn, fp: 485, 8
- GB fn, tp: 12, 3
- GB f1 score: 0.231
- GB cohens kappa score: 0.211
- -> test with 'KNN'
- KNN tn, fp: 426, 67
- KNN fn, tp: 12, 3
- KNN f1 score: 0.071
- KNN cohens kappa score: 0.023
- ------ Step 4/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 457, 36
- LR fn, tp: 4, 11
- LR f1 score: 0.355
- LR cohens kappa score: 0.325
- LR average precision score: 0.239
- -> test with 'GB'
- GB tn, fp: 487, 6
- GB fn, tp: 12, 3
- GB f1 score: 0.250
- GB cohens kappa score: 0.233
- -> test with 'KNN'
- KNN tn, fp: 436, 57
- KNN fn, tp: 9, 6
- KNN f1 score: 0.154
- KNN cohens kappa score: 0.111
- ------ Step 4/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 461, 32
- LR fn, tp: 7, 8
- LR f1 score: 0.291
- LR cohens kappa score: 0.259
- LR average precision score: 0.201
- -> test with 'GB'
- GB tn, fp: 491, 2
- GB fn, tp: 10, 5
- GB f1 score: 0.455
- GB cohens kappa score: 0.444
- -> test with 'KNN'
- KNN tn, fp: 428, 65
- KNN fn, tp: 11, 4
- KNN f1 score: 0.095
- KNN cohens kappa score: 0.049
- ------ Step 4/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 447, 46
- LR fn, tp: 3, 12
- LR f1 score: 0.329
- LR cohens kappa score: 0.296
- LR average precision score: 0.318
- -> test with 'GB'
- GB tn, fp: 489, 4
- GB fn, tp: 11, 4
- GB f1 score: 0.348
- GB cohens kappa score: 0.334
- -> test with 'KNN'
- KNN tn, fp: 424, 69
- KNN fn, tp: 10, 5
- KNN f1 score: 0.112
- KNN cohens kappa score: 0.067
- ------ Step 4/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 456, 35
- LR fn, tp: 4, 9
- LR f1 score: 0.316
- LR cohens kappa score: 0.287
- LR average precision score: 0.203
- -> test with 'GB'
- GB tn, fp: 484, 7
- GB fn, tp: 10, 3
- GB f1 score: 0.261
- GB cohens kappa score: 0.244
- -> test with 'KNN'
- KNN tn, fp: 421, 70
- KNN fn, tp: 7, 6
- KNN f1 score: 0.135
- KNN cohens kappa score: 0.095
- ====== Step 5/5 =======
- -> Shuffling data
- -> Spliting data to slices
- ------ Step 5/5: Slice 1/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 461, 32
- LR fn, tp: 4, 11
- LR f1 score: 0.379
- LR cohens kappa score: 0.351
- LR average precision score: 0.263
- -> test with 'GB'
- GB tn, fp: 486, 7
- GB fn, tp: 6, 9
- GB f1 score: 0.581
- GB cohens kappa score: 0.567
- -> test with 'KNN'
- KNN tn, fp: 419, 74
- KNN fn, tp: 10, 5
- KNN f1 score: 0.106
- KNN cohens kappa score: 0.060
- ------ Step 5/5: Slice 2/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 443, 50
- LR fn, tp: 5, 10
- LR f1 score: 0.267
- LR cohens kappa score: 0.230
- LR average precision score: 0.206
- -> test with 'GB'
- GB tn, fp: 483, 10
- GB fn, tp: 12, 3
- GB f1 score: 0.214
- GB cohens kappa score: 0.192
- -> test with 'KNN'
- KNN tn, fp: 426, 67
- KNN fn, tp: 11, 4
- KNN f1 score: 0.093
- KNN cohens kappa score: 0.047
- ------ Step 5/5: Slice 3/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 470, 23
- LR fn, tp: 8, 7
- LR f1 score: 0.311
- LR cohens kappa score: 0.283
- LR average precision score: 0.179
- -> test with 'GB'
- GB tn, fp: 487, 6
- GB fn, tp: 13, 2
- GB f1 score: 0.174
- GB cohens kappa score: 0.157
- -> test with 'KNN'
- KNN tn, fp: 419, 74
- KNN fn, tp: 7, 8
- KNN f1 score: 0.165
- KNN cohens kappa score: 0.121
- ------ Step 5/5: Slice 4/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 444, 49
- LR fn, tp: 3, 12
- LR f1 score: 0.316
- LR cohens kappa score: 0.282
- LR average precision score: 0.226
- -> test with 'GB'
- GB tn, fp: 487, 6
- GB fn, tp: 9, 6
- GB f1 score: 0.444
- GB cohens kappa score: 0.429
- -> test with 'KNN'
- KNN tn, fp: 438, 55
- KNN fn, tp: 9, 6
- KNN f1 score: 0.158
- KNN cohens kappa score: 0.116
- ------ Step 5/5: Slice 5/5 -------
- -> Reset the GAN
- -> Train generator for synthetic samples
- -> create 1912 synthetic samples
- -> test with 'LR'
- LR tn, fp: 442, 49
- LR fn, tp: 3, 10
- LR f1 score: 0.278
- LR cohens kappa score: 0.246
- LR average precision score: 0.230
- -> test with 'GB'
- GB tn, fp: 484, 7
- GB fn, tp: 9, 4
- GB f1 score: 0.333
- GB cohens kappa score: 0.317
- -> test with 'KNN'
- KNN tn, fp: 423, 68
- KNN fn, tp: 10, 3
- KNN f1 score: 0.071
- KNN cohens kappa score: 0.029
- ### Exercise is done.
- -----[ LR ]-----
- maximum:
- LR tn, fp: 470, 50
- LR fn, tp: 8, 13
- LR f1 score: 0.419
- LR cohens kappa score: 0.392
- LR average precision score: 0.404
- average:
- LR tn, fp: 452.16, 40.44
- LR fn, tp: 4.68, 9.92
- LR f1 score: 0.307
- LR cohens kappa score: 0.275
- LR average precision score: 0.233
- minimum:
- LR tn, fp: 442, 23
- LR fn, tp: 2, 7
- LR f1 score: 0.222
- LR cohens kappa score: 0.184
- LR average precision score: 0.144
- -----[ GB ]-----
- maximum:
- GB tn, fp: 491, 11
- GB fn, tp: 14, 9
- GB f1 score: 0.581
- GB cohens kappa score: 0.567
- average:
- GB tn, fp: 485.88, 6.72
- GB fn, tp: 10.96, 3.64
- GB f1 score: 0.289
- GB cohens kappa score: 0.272
- minimum:
- GB tn, fp: 482, 2
- GB fn, tp: 6, 1
- GB f1 score: 0.083
- GB cohens kappa score: 0.063
- -----[ KNN ]-----
- maximum:
- KNN tn, fp: 449, 82
- KNN fn, tp: 12, 9
- KNN f1 score: 0.212
- KNN cohens kappa score: 0.174
- average:
- KNN tn, fp: 427.88, 64.72
- KNN fn, tp: 9.36, 5.24
- KNN f1 score: 0.125
- KNN cohens kappa score: 0.081
- minimum:
- KNN tn, fp: 409, 44
- KNN fn, tp: 6, 3
- KNN f1 score: 0.071
- KNN cohens kappa score: 0.023
|