/////////////////////////////////////////// // Running CTAB-GAN 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 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 2047, 138 LR fn, tp: 16, 36 LR f1 score: 0.319 LR cohens kappa score: 0.293 LR average precision score: 0.458 -> test with 'GB' GB tn, fp: 2160, 25 GB fn, tp: 23, 29 GB f1 score: 0.547 GB cohens kappa score: 0.536 -> test with 'KNN' KNN tn, fp: 1498, 687 KNN fn, tp: 23, 29 KNN f1 score: 0.076 KNN cohens kappa score: 0.034 ------ Step 1/5: Slice 2/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 1857, 328 LR fn, tp: 8, 44 LR f1 score: 0.208 LR cohens kappa score: 0.174 LR average precision score: 0.459 -> test with 'GB' GB tn, fp: 2164, 21 GB fn, tp: 24, 28 GB f1 score: 0.554 GB cohens kappa score: 0.544 -> test with 'KNN' KNN tn, fp: 2158, 27 KNN fn, tp: 24, 28 KNN f1 score: 0.523 KNN cohens kappa score: 0.512 ------ Step 1/5: Slice 3/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 1995, 190 LR fn, tp: 9, 43 LR f1 score: 0.302 LR cohens kappa score: 0.274 LR average precision score: 0.555 -> test with 'GB' GB tn, fp: 2168, 17 GB fn, tp: 16, 36 GB f1 score: 0.686 GB cohens kappa score: 0.678 -> test with 'KNN' KNN tn, fp: 2167, 18 KNN fn, tp: 17, 35 KNN f1 score: 0.667 KNN cohens kappa score: 0.659 ------ Step 1/5: Slice 4/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 2070, 115 LR fn, tp: 22, 30 LR f1 score: 0.305 LR cohens kappa score: 0.280 LR average precision score: 0.346 -> test with 'GB' GB tn, fp: 2172, 13 GB fn, tp: 28, 24 GB f1 score: 0.539 GB cohens kappa score: 0.530 -> test with 'KNN' KNN tn, fp: 2164, 21 KNN fn, tp: 26, 26 KNN f1 score: 0.525 KNN cohens kappa score: 0.515 ------ Step 1/5: Slice 5/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8532 synthetic samples -> test with 'LR' LR tn, fp: 1889, 294 LR fn, tp: 10, 42 LR f1 score: 0.216 LR cohens kappa score: 0.184 LR average precision score: 0.535 -> test with 'GB' GB tn, fp: 2162, 21 GB fn, tp: 23, 29 GB f1 score: 0.569 GB cohens kappa score: 0.559 -> test with 'KNN' KNN tn, fp: 2144, 39 KNN fn, tp: 20, 32 KNN f1 score: 0.520 KNN cohens kappa score: 0.507 ====== Step 2/5 ======= -> Shuffling data -> Spliting data to slices ------ Step 2/5: Slice 1/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 2016, 169 LR fn, tp: 15, 37 LR f1 score: 0.287 LR cohens kappa score: 0.259 LR average precision score: 0.478 -> test with 'GB' GB tn, fp: 2171, 14 GB fn, tp: 21, 31 GB f1 score: 0.639 GB cohens kappa score: 0.631 -> test with 'KNN' KNN tn, fp: 2157, 28 KNN fn, tp: 15, 37 KNN f1 score: 0.632 KNN cohens kappa score: 0.623 ------ Step 2/5: Slice 2/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 1957, 228 LR fn, tp: 10, 42 LR f1 score: 0.261 LR cohens kappa score: 0.231 LR average precision score: 0.480 -> test with 'GB' GB tn, fp: 2161, 24 GB fn, tp: 23, 29 GB f1 score: 0.552 GB cohens kappa score: 0.542 -> test with 'KNN' KNN tn, fp: 2152, 33 KNN fn, tp: 17, 35 KNN f1 score: 0.583 KNN cohens kappa score: 0.572 ------ Step 2/5: Slice 3/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 2016, 169 LR fn, tp: 15, 37 LR f1 score: 0.287 LR cohens kappa score: 0.259 LR average precision score: 0.468 -> test with 'GB' GB tn, fp: 2166, 19 GB fn, tp: 26, 26 GB f1 score: 0.536 GB cohens kappa score: 0.526 -> test with 'KNN' KNN tn, fp: 2159, 26 KNN fn, tp: 25, 27 KNN f1 score: 0.514 KNN cohens kappa score: 0.503 ------ Step 2/5: Slice 4/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 2032, 153 LR fn, tp: 8, 44 LR f1 score: 0.353 LR cohens kappa score: 0.329 LR average precision score: 0.525 -> test with 'GB' GB tn, fp: 2161, 24 GB fn, tp: 25, 27 GB f1 score: 0.524 GB cohens kappa score: 0.513 -> test with 'KNN' KNN tn, fp: 2164, 21 KNN fn, tp: 26, 26 KNN f1 score: 0.525 KNN cohens kappa score: 0.515 ------ Step 2/5: Slice 5/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8532 synthetic samples -> test with 'LR' LR tn, fp: 1911, 272 LR fn, tp: 10, 42 LR f1 score: 0.230 LR cohens kappa score: 0.197 LR average precision score: 0.531 -> test with 'GB' GB tn, fp: 2163, 20 GB fn, tp: 25, 27 GB f1 score: 0.545 GB cohens kappa score: 0.535 -> test with 'KNN' KNN tn, fp: 2161, 22 KNN fn, tp: 26, 26 KNN f1 score: 0.520 KNN cohens kappa score: 0.509 ====== Step 3/5 ======= -> Shuffling data -> Spliting data to slices ------ Step 3/5: Slice 1/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 1883, 302 LR fn, tp: 11, 41 LR f1 score: 0.208 LR cohens kappa score: 0.174 LR average precision score: 0.550 -> test with 'GB' GB tn, fp: 2166, 19 GB fn, tp: 18, 34 GB f1 score: 0.648 GB cohens kappa score: 0.639 -> test with 'KNN' KNN tn, fp: 2154, 31 KNN fn, tp: 18, 34 KNN f1 score: 0.581 KNN cohens kappa score: 0.570 ------ Step 3/5: Slice 2/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 1947, 238 LR fn, tp: 9, 43 LR f1 score: 0.258 LR cohens kappa score: 0.228 LR average precision score: 0.420 -> test with 'GB' GB tn, fp: 2165, 20 GB fn, tp: 30, 22 GB f1 score: 0.468 GB cohens kappa score: 0.457 -> test with 'KNN' KNN tn, fp: 1483, 702 KNN fn, tp: 26, 26 KNN f1 score: 0.067 KNN cohens kappa score: 0.024 ------ Step 3/5: Slice 3/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 2066, 119 LR fn, tp: 12, 40 LR f1 score: 0.379 LR cohens kappa score: 0.357 LR average precision score: 0.513 -> test with 'GB' GB tn, fp: 2174, 11 GB fn, tp: 21, 31 GB f1 score: 0.660 GB cohens kappa score: 0.652 -> test with 'KNN' KNN tn, fp: 2171, 14 KNN fn, tp: 26, 26 KNN f1 score: 0.565 KNN cohens kappa score: 0.556 ------ Step 3/5: Slice 4/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 2119, 66 LR fn, tp: 25, 27 LR f1 score: 0.372 LR cohens kappa score: 0.353 LR average precision score: 0.474 -> test with 'GB' GB tn, fp: 2177, 8 GB fn, tp: 23, 29 GB f1 score: 0.652 GB cohens kappa score: 0.645 -> test with 'KNN' KNN tn, fp: 2175, 10 KNN fn, tp: 25, 27 KNN f1 score: 0.607 KNN cohens kappa score: 0.599 ------ Step 3/5: Slice 5/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8532 synthetic samples -> test with 'LR' LR tn, fp: 2074, 109 LR fn, tp: 13, 39 LR f1 score: 0.390 LR cohens kappa score: 0.368 LR average precision score: 0.526 -> test with 'GB' GB tn, fp: 2173, 10 GB fn, tp: 22, 30 GB f1 score: 0.652 GB cohens kappa score: 0.645 -> test with 'KNN' KNN tn, fp: 2169, 14 KNN fn, tp: 23, 29 KNN f1 score: 0.611 KNN cohens kappa score: 0.602 ====== Step 4/5 ======= -> Shuffling data -> Spliting data to slices ------ Step 4/5: Slice 1/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 2048, 137 LR fn, tp: 17, 35 LR f1 score: 0.312 LR cohens kappa score: 0.287 LR average precision score: 0.532 -> test with 'GB' GB tn, fp: 2172, 13 GB fn, tp: 23, 29 GB f1 score: 0.617 GB cohens kappa score: 0.609 -> test with 'KNN' KNN tn, fp: 2165, 20 KNN fn, tp: 22, 30 KNN f1 score: 0.588 KNN cohens kappa score: 0.579 ------ Step 4/5: Slice 2/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 2096, 89 LR fn, tp: 19, 33 LR f1 score: 0.379 LR cohens kappa score: 0.358 LR average precision score: 0.469 -> test with 'GB' GB tn, fp: 2172, 13 GB fn, tp: 23, 29 GB f1 score: 0.617 GB cohens kappa score: 0.609 -> test with 'KNN' KNN tn, fp: 2172, 13 KNN fn, tp: 23, 29 KNN f1 score: 0.617 KNN cohens kappa score: 0.609 ------ Step 4/5: Slice 3/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 1957, 228 LR fn, tp: 10, 42 LR f1 score: 0.261 LR cohens kappa score: 0.231 LR average precision score: 0.506 -> test with 'GB' GB tn, fp: 2167, 18 GB fn, tp: 21, 31 GB f1 score: 0.614 GB cohens kappa score: 0.605 -> test with 'KNN' KNN tn, fp: 2163, 22 KNN fn, tp: 24, 28 KNN f1 score: 0.549 KNN cohens kappa score: 0.539 ------ Step 4/5: Slice 4/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 1988, 197 LR fn, tp: 17, 35 LR f1 score: 0.246 LR cohens kappa score: 0.217 LR average precision score: 0.389 -> test with 'GB' GB tn, fp: 2165, 20 GB fn, tp: 26, 26 GB f1 score: 0.531 GB cohens kappa score: 0.520 -> test with 'KNN' KNN tn, fp: 2161, 24 KNN fn, tp: 24, 28 KNN f1 score: 0.538 KNN cohens kappa score: 0.527 ------ Step 4/5: Slice 5/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8532 synthetic samples -> test with 'LR' LR tn, fp: 1976, 207 LR fn, tp: 8, 44 LR f1 score: 0.290 LR cohens kappa score: 0.262 LR average precision score: 0.513 -> test with 'GB' GB tn, fp: 2158, 25 GB fn, tp: 25, 27 GB f1 score: 0.519 GB cohens kappa score: 0.508 -> test with 'KNN' KNN tn, fp: 2151, 32 KNN fn, tp: 16, 36 KNN f1 score: 0.600 KNN cohens kappa score: 0.589 ====== Step 5/5 ======= -> Shuffling data -> Spliting data to slices ------ Step 5/5: Slice 1/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 1909, 276 LR fn, tp: 6, 46 LR f1 score: 0.246 LR cohens kappa score: 0.215 LR average precision score: 0.484 -> test with 'GB' GB tn, fp: 2163, 22 GB fn, tp: 22, 30 GB f1 score: 0.577 GB cohens kappa score: 0.567 -> test with 'KNN' KNN tn, fp: 1499, 686 KNN fn, tp: 17, 35 KNN f1 score: 0.091 KNN cohens kappa score: 0.049 ------ Step 5/5: Slice 2/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 2027, 158 LR fn, tp: 16, 36 LR f1 score: 0.293 LR cohens kappa score: 0.266 LR average precision score: 0.455 -> test with 'GB' GB tn, fp: 2168, 17 GB fn, tp: 25, 27 GB f1 score: 0.562 GB cohens kappa score: 0.553 -> test with 'KNN' KNN tn, fp: 2158, 27 KNN fn, tp: 24, 28 KNN f1 score: 0.523 KNN cohens kappa score: 0.512 ------ Step 5/5: Slice 3/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 2048, 137 LR fn, tp: 17, 35 LR f1 score: 0.312 LR cohens kappa score: 0.287 LR average precision score: 0.435 -> test with 'GB' GB tn, fp: 2173, 12 GB fn, tp: 28, 24 GB f1 score: 0.545 GB cohens kappa score: 0.537 -> test with 'KNN' KNN tn, fp: 2163, 22 KNN fn, tp: 26, 26 KNN f1 score: 0.520 KNN cohens kappa score: 0.509 ------ Step 5/5: Slice 4/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8530 synthetic samples -> test with 'LR' LR tn, fp: 1990, 195 LR fn, tp: 9, 43 LR f1 score: 0.297 LR cohens kappa score: 0.269 LR average precision score: 0.482 -> test with 'GB' GB tn, fp: 2165, 20 GB fn, tp: 19, 33 GB f1 score: 0.629 GB cohens kappa score: 0.620 -> test with 'KNN' KNN tn, fp: 2165, 20 KNN fn, tp: 15, 37 KNN f1 score: 0.679 KNN cohens kappa score: 0.671 ------ Step 5/5: Slice 5/5 ------- -> Reset the GAN -> Train generator for synthetic samples 0%| | 0/10 [00:00 create 8532 synthetic samples -> test with 'LR' LR tn, fp: 2109, 74 LR fn, tp: 21, 31 LR f1 score: 0.395 LR cohens kappa score: 0.375 LR average precision score: 0.501 -> test with 'GB' GB tn, fp: 2177, 6 GB fn, tp: 24, 28 GB f1 score: 0.651 GB cohens kappa score: 0.645 -> test with 'KNN' KNN tn, fp: 2170, 13 KNN fn, tp: 27, 25 KNN f1 score: 0.556 KNN cohens kappa score: 0.547 ### Exercise is done. -----[ LR ]----- maximum: LR tn, fp: 2119, 328 LR fn, tp: 25, 46 LR f1 score: 0.395 LR cohens kappa score: 0.375 LR average precision score: 0.555 average: LR tn, fp: 2001.08, 183.52 LR fn, tp: 13.32, 38.68 LR f1 score: 0.296 LR cohens kappa score: 0.269 LR average precision score: 0.483 minimum: LR tn, fp: 1857, 66 LR fn, tp: 6, 27 LR f1 score: 0.208 LR cohens kappa score: 0.174 LR average precision score: 0.346 -----[ GB ]----- maximum: GB tn, fp: 2177, 25 GB fn, tp: 30, 36 GB f1 score: 0.686 GB cohens kappa score: 0.678 average: GB tn, fp: 2167.32, 17.28 GB fn, tp: 23.36, 28.64 GB f1 score: 0.585 GB cohens kappa score: 0.576 minimum: GB tn, fp: 2158, 6 GB fn, tp: 16, 22 GB f1 score: 0.468 GB cohens kappa score: 0.457 -----[ KNN ]----- maximum: KNN tn, fp: 2175, 702 KNN fn, tp: 27, 37 KNN f1 score: 0.679 KNN cohens kappa score: 0.671 average: KNN tn, fp: 2081.72, 102.88 KNN fn, tp: 22.2, 29.8 KNN f1 score: 0.511 KNN cohens kappa score: 0.497 minimum: KNN tn, fp: 1483, 10 KNN fn, tp: 15, 25 KNN f1 score: 0.067 KNN cohens kappa score: 0.024