{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "reserved-pursuit",
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "from library.analysis import runExerciseForRepeater"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "sweet-equivalent",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_abalone_17_vs_7_8_9_10\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23452 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 401, 55\n",
      "LR fn, tp: 0, 12\n",
      "LR f1 score: 0.304\n",
      "LR cohens kappa score: 0.272\n",
      "LR average precision score: 0.466\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 435, 21\n",
      "GB fn, tp: 5, 7\n",
      "GB f1 score: 0.350\n",
      "GB cohens kappa score: 0.326\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 437, 19\n",
      "KNN fn, tp: 6, 6\n",
      "KNN f1 score: 0.324\n",
      "KNN cohens kappa score: 0.300\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23756 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 402, 54\n",
      "LR fn, tp: 2, 10\n",
      "LR f1 score: 0.263\n",
      "LR cohens kappa score: 0.230\n",
      "LR average precision score: 0.617\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 439, 17\n",
      "GB fn, tp: 5, 7\n",
      "GB f1 score: 0.389\n",
      "GB cohens kappa score: 0.367\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 426, 30\n",
      "KNN fn, tp: 4, 8\n",
      "KNN f1 score: 0.320\n",
      "KNN cohens kappa score: 0.292\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23860 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 410, 46\n",
      "LR fn, tp: 2, 10\n",
      "LR f1 score: 0.294\n",
      "LR cohens kappa score: 0.263\n",
      "LR average precision score: 0.355\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 442, 14\n",
      "GB fn, tp: 7, 5\n",
      "GB f1 score: 0.323\n",
      "GB cohens kappa score: 0.301\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 438, 18\n",
      "KNN fn, tp: 5, 7\n",
      "KNN f1 score: 0.378\n",
      "KNN cohens kappa score: 0.356\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22268 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 407, 49\n",
      "LR fn, tp: 1, 11\n",
      "LR f1 score: 0.306\n",
      "LR cohens kappa score: 0.275\n",
      "LR average precision score: 0.562\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 439, 17\n",
      "GB fn, tp: 7, 5\n",
      "GB f1 score: 0.294\n",
      "GB cohens kappa score: 0.270\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 442, 14\n",
      "KNN fn, tp: 5, 7\n",
      "KNN f1 score: 0.424\n",
      "KNN cohens kappa score: 0.405\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1776 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24620 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 400, 56\n",
      "LR fn, tp: 1, 9\n",
      "LR f1 score: 0.240\n",
      "LR cohens kappa score: 0.211\n",
      "LR average precision score: 0.312\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 445, 11\n",
      "GB fn, tp: 6, 4\n",
      "GB f1 score: 0.320\n",
      "GB cohens kappa score: 0.302\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 436, 20\n",
      "KNN fn, tp: 6, 4\n",
      "KNN f1 score: 0.235\n",
      "KNN cohens kappa score: 0.211\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23956 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 407, 49\n",
      "LR fn, tp: 1, 11\n",
      "LR f1 score: 0.306\n",
      "LR cohens kappa score: 0.275\n",
      "LR average precision score: 0.628\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 443, 13\n",
      "GB fn, tp: 4, 8\n",
      "GB f1 score: 0.485\n",
      "GB cohens kappa score: 0.467\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 436, 20\n",
      "KNN fn, tp: 8, 4\n",
      "KNN f1 score: 0.222\n",
      "KNN cohens kappa score: 0.195\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22788 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 394, 62\n",
      "LR fn, tp: 0, 12\n",
      "LR f1 score: 0.279\n",
      "LR cohens kappa score: 0.246\n",
      "LR average precision score: 0.550\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 435, 21\n",
      "GB fn, tp: 3, 9\n",
      "GB f1 score: 0.429\n",
      "GB cohens kappa score: 0.407\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 432, 24\n",
      "KNN fn, tp: 4, 8\n",
      "KNN f1 score: 0.364\n",
      "KNN cohens kappa score: 0.339\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23624 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 400, 56\n",
      "LR fn, tp: 2, 10\n",
      "LR f1 score: 0.256\n",
      "LR cohens kappa score: 0.223\n",
      "LR average precision score: 0.257\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 439, 17\n",
      "GB fn, tp: 7, 5\n",
      "GB f1 score: 0.294\n",
      "GB cohens kappa score: 0.270\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 432, 24\n",
      "KNN fn, tp: 6, 6\n",
      "KNN f1 score: 0.286\n",
      "KNN cohens kappa score: 0.259\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22720 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 418, 38\n",
      "LR fn, tp: 3, 9\n",
      "LR f1 score: 0.305\n",
      "LR cohens kappa score: 0.275\n",
      "LR average precision score: 0.520\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 446, 10\n",
      "GB fn, tp: 9, 3\n",
      "GB f1 score: 0.240\n",
      "GB cohens kappa score: 0.219\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 437, 19\n",
      "KNN fn, tp: 6, 6\n",
      "KNN f1 score: 0.324\n",
      "KNN cohens kappa score: 0.300\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1776 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23424 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 404, 52\n",
      "LR fn, tp: 2, 8\n",
      "LR f1 score: 0.229\n",
      "LR cohens kappa score: 0.199\n",
      "LR average precision score: 0.426\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 436, 20\n",
      "GB fn, tp: 6, 4\n",
      "GB f1 score: 0.235\n",
      "GB cohens kappa score: 0.211\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 432, 24\n",
      "KNN fn, tp: 3, 7\n",
      "KNN f1 score: 0.341\n",
      "KNN cohens kappa score: 0.319\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24364 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 405, 51\n",
      "LR fn, tp: 3, 9\n",
      "LR f1 score: 0.250\n",
      "LR cohens kappa score: 0.217\n",
      "LR average precision score: 0.522\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 445, 11\n",
      "GB fn, tp: 7, 5\n",
      "GB f1 score: 0.357\n",
      "GB cohens kappa score: 0.338\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 437, 19\n",
      "KNN fn, tp: 4, 8\n",
      "KNN f1 score: 0.410\n",
      "KNN cohens kappa score: 0.389\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24152 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 399, 57\n",
      "LR fn, tp: 2, 10\n",
      "LR f1 score: 0.253\n",
      "LR cohens kappa score: 0.219\n",
      "LR average precision score: 0.354\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 431, 25\n",
      "GB fn, tp: 7, 5\n",
      "GB f1 score: 0.238\n",
      "GB cohens kappa score: 0.209\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 436, 20\n",
      "KNN fn, tp: 5, 7\n",
      "KNN f1 score: 0.359\n",
      "KNN cohens kappa score: 0.335\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25028 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 411, 45\n",
      "LR fn, tp: 1, 11\n",
      "LR f1 score: 0.324\n",
      "LR cohens kappa score: 0.294\n",
      "LR average precision score: 0.493\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 442, 14\n",
      "GB fn, tp: 3, 9\n",
      "GB f1 score: 0.514\n",
      "GB cohens kappa score: 0.497\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 430, 26\n",
      "KNN fn, tp: 5, 7\n",
      "KNN f1 score: 0.311\n",
      "KNN cohens kappa score: 0.284\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22848 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 407, 49\n",
      "LR fn, tp: 2, 10\n",
      "LR f1 score: 0.282\n",
      "LR cohens kappa score: 0.250\n",
      "LR average precision score: 0.332\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 443, 13\n",
      "GB fn, tp: 9, 3\n",
      "GB f1 score: 0.214\n",
      "GB cohens kappa score: 0.191\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 438, 18\n",
      "KNN fn, tp: 10, 2\n",
      "KNN f1 score: 0.125\n",
      "KNN cohens kappa score: 0.096\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1776 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 20740 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 396, 60\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 0.250\n",
      "LR cohens kappa score: 0.221\n",
      "LR average precision score: 0.593\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 441, 15\n",
      "GB fn, tp: 4, 6\n",
      "GB f1 score: 0.387\n",
      "GB cohens kappa score: 0.369\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 434, 22\n",
      "KNN fn, tp: 4, 6\n",
      "KNN f1 score: 0.316\n",
      "KNN cohens kappa score: 0.293\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24892 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 402, 54\n",
      "LR fn, tp: 1, 11\n",
      "LR f1 score: 0.286\n",
      "LR cohens kappa score: 0.253\n",
      "LR average precision score: 0.640\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 438, 18\n",
      "GB fn, tp: 5, 7\n",
      "GB f1 score: 0.378\n",
      "GB cohens kappa score: 0.356\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 429, 27\n",
      "KNN fn, tp: 4, 8\n",
      "KNN f1 score: 0.340\n",
      "KNN cohens kappa score: 0.314\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23988 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 383, 73\n",
      "LR fn, tp: 1, 11\n",
      "LR f1 score: 0.229\n",
      "LR cohens kappa score: 0.193\n",
      "LR average precision score: 0.622\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 438, 18\n",
      "GB fn, tp: 6, 6\n",
      "GB f1 score: 0.333\n",
      "GB cohens kappa score: 0.310\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 441, 15\n",
      "KNN fn, tp: 5, 7\n",
      "KNN f1 score: 0.412\n",
      "KNN cohens kappa score: 0.392\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23820 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 406, 50\n",
      "LR fn, tp: 2, 10\n",
      "LR f1 score: 0.278\n",
      "LR cohens kappa score: 0.246\n",
      "LR average precision score: 0.433\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 447, 9\n",
      "GB fn, tp: 9, 3\n",
      "GB f1 score: 0.250\n",
      "GB cohens kappa score: 0.230\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 429, 27\n",
      "KNN fn, tp: 7, 5\n",
      "KNN f1 score: 0.227\n",
      "KNN cohens kappa score: 0.197\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 20392 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 413, 43\n",
      "LR fn, tp: 1, 11\n",
      "LR f1 score: 0.333\n",
      "LR cohens kappa score: 0.304\n",
      "LR average precision score: 0.480\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 442, 14\n",
      "GB fn, tp: 8, 4\n",
      "GB f1 score: 0.267\n",
      "GB cohens kappa score: 0.243\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 438, 18\n",
      "KNN fn, tp: 8, 4\n",
      "KNN f1 score: 0.235\n",
      "KNN cohens kappa score: 0.209\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1776 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22536 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 413, 43\n",
      "LR fn, tp: 2, 8\n",
      "LR f1 score: 0.262\n",
      "LR cohens kappa score: 0.235\n",
      "LR average precision score: 0.343\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 443, 13\n",
      "GB fn, tp: 4, 6\n",
      "GB f1 score: 0.414\n",
      "GB cohens kappa score: 0.397\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 438, 18\n",
      "KNN fn, tp: 4, 6\n",
      "KNN f1 score: 0.353\n",
      "KNN cohens kappa score: 0.333\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 20888 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 394, 62\n",
      "LR fn, tp: 2, 10\n",
      "LR f1 score: 0.238\n",
      "LR cohens kappa score: 0.203\n",
      "LR average precision score: 0.373\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 440, 16\n",
      "GB fn, tp: 6, 6\n",
      "GB f1 score: 0.353\n",
      "GB cohens kappa score: 0.331\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 433, 23\n",
      "KNN fn, tp: 8, 4\n",
      "KNN f1 score: 0.205\n",
      "KNN cohens kappa score: 0.176\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24284 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 403, 53\n",
      "LR fn, tp: 2, 10\n",
      "LR f1 score: 0.267\n",
      "LR cohens kappa score: 0.234\n",
      "LR average precision score: 0.354\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 440, 16\n",
      "GB fn, tp: 11, 1\n",
      "GB f1 score: 0.069\n",
      "GB cohens kappa score: 0.040\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 431, 25\n",
      "KNN fn, tp: 6, 6\n",
      "KNN f1 score: 0.279\n",
      "KNN cohens kappa score: 0.251\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 21656 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 407, 49\n",
      "LR fn, tp: 2, 10\n",
      "LR f1 score: 0.282\n",
      "LR cohens kappa score: 0.250\n",
      "LR average precision score: 0.365\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 446, 10\n",
      "GB fn, tp: 5, 7\n",
      "GB f1 score: 0.483\n",
      "GB cohens kappa score: 0.467\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 433, 23\n",
      "KNN fn, tp: 6, 6\n",
      "KNN f1 score: 0.293\n",
      "KNN cohens kappa score: 0.266\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1778 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23872 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 399, 57\n",
      "LR fn, tp: 1, 11\n",
      "LR f1 score: 0.275\n",
      "LR cohens kappa score: 0.242\n",
      "LR average precision score: 0.696\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 436, 20\n",
      "GB fn, tp: 7, 5\n",
      "GB f1 score: 0.270\n",
      "GB cohens kappa score: 0.244\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 441, 15\n",
      "KNN fn, tp: 4, 8\n",
      "KNN f1 score: 0.457\n",
      "KNN cohens kappa score: 0.438\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1776 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23320 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 409, 47\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 0.299\n",
      "LR cohens kappa score: 0.272\n",
      "LR average precision score: 0.490\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 440, 16\n",
      "GB fn, tp: 5, 5\n",
      "GB f1 score: 0.323\n",
      "GB cohens kappa score: 0.302\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 437, 19\n",
      "KNN fn, tp: 4, 6\n",
      "KNN f1 score: 0.343\n",
      "KNN cohens kappa score: 0.322\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 418, 73\n",
      "LR fn, tp: 3, 12\n",
      "LR f1 score: 0.333\n",
      "LR cohens kappa score: 0.304\n",
      "LR average precision score: 0.696\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 403.6, 52.4\n",
      "LR fn, tp: 1.44, 10.16\n",
      "LR f1 score: 0.276\n",
      "LR cohens kappa score: 0.244\n",
      "LR average precision score: 0.471\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 383, 38\n",
      "LR fn, tp: 0, 8\n",
      "LR f1 score: 0.229\n",
      "LR cohens kappa score: 0.193\n",
      "LR average precision score: 0.257\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 447, 25\n",
      "GB fn, tp: 11, 9\n",
      "GB f1 score: 0.514\n",
      "GB cohens kappa score: 0.497\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 440.44, 15.56\n",
      "GB fn, tp: 6.2, 5.4\n",
      "GB f1 score: 0.328\n",
      "GB cohens kappa score: 0.307\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 431, 9\n",
      "GB fn, tp: 3, 1\n",
      "GB f1 score: 0.069\n",
      "GB cohens kappa score: 0.040\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 442, 30\n",
      "KNN fn, tp: 10, 8\n",
      "KNN f1 score: 0.457\n",
      "KNN cohens kappa score: 0.438\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 434.92, 21.08\n",
      "KNN fn, tp: 5.48, 6.12\n",
      "KNN f1 score: 0.315\n",
      "KNN cohens kappa score: 0.291\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 426, 14\n",
      "KNN fn, tp: 3, 2\n",
      "KNN f1 score: 0.125\n",
      "KNN cohens kappa score: 0.096\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_abalone_17_vs_7_8_9_10\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "graphic-fancy",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_abalone9-18\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22276 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 115, 23\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.439\n",
      "LR cohens kappa score: 0.380\n",
      "LR average precision score: 0.927\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 132, 6\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.571\n",
      "GB cohens kappa score: 0.539\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 124, 14\n",
      "KNN fn, tp: 5, 4\n",
      "KNN f1 score: 0.296\n",
      "KNN cohens kappa score: 0.234\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 20252 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 126, 12\n",
      "LR fn, tp: 3, 6\n",
      "LR f1 score: 0.444\n",
      "LR cohens kappa score: 0.395\n",
      "LR average precision score: 0.587\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 131, 7\n",
      "GB fn, tp: 6, 3\n",
      "GB f1 score: 0.316\n",
      "GB cohens kappa score: 0.269\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 122, 16\n",
      "KNN fn, tp: 5, 4\n",
      "KNN f1 score: 0.276\n",
      "KNN cohens kappa score: 0.209\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22680 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 126, 12\n",
      "LR fn, tp: 1, 8\n",
      "LR f1 score: 0.552\n",
      "LR cohens kappa score: 0.510\n",
      "LR average precision score: 0.805\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 135, 3\n",
      "GB fn, tp: 7, 2\n",
      "GB f1 score: 0.286\n",
      "GB cohens kappa score: 0.253\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 126, 12\n",
      "KNN fn, tp: 4, 5\n",
      "KNN f1 score: 0.385\n",
      "KNN cohens kappa score: 0.331\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 20336 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 120, 18\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.412\n",
      "LR cohens kappa score: 0.354\n",
      "LR average precision score: 0.526\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 137, 1\n",
      "GB fn, tp: 6, 3\n",
      "GB f1 score: 0.462\n",
      "GB cohens kappa score: 0.440\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 124, 14\n",
      "KNN fn, tp: 2, 7\n",
      "KNN f1 score: 0.467\n",
      "KNN cohens kappa score: 0.417\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 516 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 21164 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 124, 13\n",
      "LR fn, tp: 1, 5\n",
      "LR f1 score: 0.417\n",
      "LR cohens kappa score: 0.377\n",
      "LR average precision score: 0.482\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 132, 5\n",
      "GB fn, tp: 5, 1\n",
      "GB f1 score: 0.167\n",
      "GB cohens kappa score: 0.130\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 127, 10\n",
      "KNN fn, tp: 3, 3\n",
      "KNN f1 score: 0.316\n",
      "KNN cohens kappa score: 0.274\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 20372 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 119, 19\n",
      "LR fn, tp: 1, 8\n",
      "LR f1 score: 0.444\n",
      "LR cohens kappa score: 0.388\n",
      "LR average precision score: 0.651\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 133, 5\n",
      "GB fn, tp: 6, 3\n",
      "GB f1 score: 0.353\n",
      "GB cohens kappa score: 0.313\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 130, 8\n",
      "KNN fn, tp: 5, 4\n",
      "KNN f1 score: 0.381\n",
      "KNN cohens kappa score: 0.334\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23124 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 127, 11\n",
      "LR fn, tp: 1, 8\n",
      "LR f1 score: 0.571\n",
      "LR cohens kappa score: 0.533\n",
      "LR average precision score: 0.787\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 135, 3\n",
      "GB fn, tp: 5, 4\n",
      "GB f1 score: 0.500\n",
      "GB cohens kappa score: 0.472\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 125, 13\n",
      "KNN fn, tp: 4, 5\n",
      "KNN f1 score: 0.370\n",
      "KNN cohens kappa score: 0.314\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22232 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 127, 11\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.519\n",
      "LR cohens kappa score: 0.476\n",
      "LR average precision score: 0.726\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 131, 7\n",
      "GB fn, tp: 5, 4\n",
      "GB f1 score: 0.400\n",
      "GB cohens kappa score: 0.357\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 119, 19\n",
      "KNN fn, tp: 3, 6\n",
      "KNN f1 score: 0.353\n",
      "KNN cohens kappa score: 0.289\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23116 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 120, 18\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.500\n",
      "LR cohens kappa score: 0.449\n",
      "LR average precision score: 0.710\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 130, 8\n",
      "GB fn, tp: 5, 4\n",
      "GB f1 score: 0.381\n",
      "GB cohens kappa score: 0.334\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 124, 14\n",
      "KNN fn, tp: 4, 5\n",
      "KNN f1 score: 0.357\n",
      "KNN cohens kappa score: 0.299\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 516 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 19840 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 124, 13\n",
      "LR fn, tp: 1, 5\n",
      "LR f1 score: 0.417\n",
      "LR cohens kappa score: 0.377\n",
      "LR average precision score: 0.661\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 129, 8\n",
      "GB fn, tp: 2, 4\n",
      "GB f1 score: 0.444\n",
      "GB cohens kappa score: 0.412\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 124, 13\n",
      "KNN fn, tp: 2, 4\n",
      "KNN f1 score: 0.348\n",
      "KNN cohens kappa score: 0.305\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 20776 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 124, 14\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.467\n",
      "LR cohens kappa score: 0.417\n",
      "LR average precision score: 0.548\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 133, 5\n",
      "GB fn, tp: 7, 2\n",
      "GB f1 score: 0.250\n",
      "GB cohens kappa score: 0.208\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 121, 17\n",
      "KNN fn, tp: 3, 6\n",
      "KNN f1 score: 0.375\n",
      "KNN cohens kappa score: 0.315\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 19024 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 127, 11\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.621\n",
      "LR cohens kappa score: 0.586\n",
      "LR average precision score: 0.906\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 134, 4\n",
      "GB fn, tp: 6, 3\n",
      "GB f1 score: 0.375\n",
      "GB cohens kappa score: 0.340\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 119, 19\n",
      "KNN fn, tp: 3, 6\n",
      "KNN f1 score: 0.353\n",
      "KNN cohens kappa score: 0.289\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 21348 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 128, 10\n",
      "LR fn, tp: 4, 5\n",
      "LR f1 score: 0.417\n",
      "LR cohens kappa score: 0.368\n",
      "LR average precision score: 0.653\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 133, 5\n",
      "GB fn, tp: 7, 2\n",
      "GB f1 score: 0.250\n",
      "GB cohens kappa score: 0.208\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 126, 12\n",
      "KNN fn, tp: 6, 3\n",
      "KNN f1 score: 0.250\n",
      "KNN cohens kappa score: 0.188\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24400 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 114, 24\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.350\n",
      "LR cohens kappa score: 0.282\n",
      "LR average precision score: 0.620\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 132, 6\n",
      "GB fn, tp: 4, 5\n",
      "GB f1 score: 0.500\n",
      "GB cohens kappa score: 0.464\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 122, 16\n",
      "KNN fn, tp: 4, 5\n",
      "KNN f1 score: 0.333\n",
      "KNN cohens kappa score: 0.271\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 516 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 21016 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 122, 15\n",
      "LR fn, tp: 1, 5\n",
      "LR f1 score: 0.385\n",
      "LR cohens kappa score: 0.342\n",
      "LR average precision score: 0.528\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 131, 6\n",
      "GB fn, tp: 3, 3\n",
      "GB f1 score: 0.400\n",
      "GB cohens kappa score: 0.368\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 126, 11\n",
      "KNN fn, tp: 3, 3\n",
      "KNN f1 score: 0.300\n",
      "KNN cohens kappa score: 0.256\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23140 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 125, 13\n",
      "LR fn, tp: 4, 5\n",
      "LR f1 score: 0.370\n",
      "LR cohens kappa score: 0.314\n",
      "LR average precision score: 0.529\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 132, 6\n",
      "GB fn, tp: 6, 3\n",
      "GB f1 score: 0.333\n",
      "GB cohens kappa score: 0.290\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 124, 14\n",
      "KNN fn, tp: 5, 4\n",
      "KNN f1 score: 0.296\n",
      "KNN cohens kappa score: 0.234\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 20588 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 120, 18\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.412\n",
      "LR cohens kappa score: 0.354\n",
      "LR average precision score: 0.650\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 126, 12\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.444\n",
      "GB cohens kappa score: 0.395\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 124, 14\n",
      "KNN fn, tp: 2, 7\n",
      "KNN f1 score: 0.467\n",
      "KNN cohens kappa score: 0.417\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 21244 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 123, 15\n",
      "LR fn, tp: 1, 8\n",
      "LR f1 score: 0.500\n",
      "LR cohens kappa score: 0.452\n",
      "LR average precision score: 0.743\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 131, 7\n",
      "GB fn, tp: 5, 4\n",
      "GB f1 score: 0.400\n",
      "GB cohens kappa score: 0.357\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 128, 10\n",
      "KNN fn, tp: 5, 4\n",
      "KNN f1 score: 0.348\n",
      "KNN cohens kappa score: 0.295\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 21464 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 120, 18\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.500\n",
      "LR cohens kappa score: 0.449\n",
      "LR average precision score: 0.947\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 132, 6\n",
      "GB fn, tp: 4, 5\n",
      "GB f1 score: 0.500\n",
      "GB cohens kappa score: 0.464\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 122, 16\n",
      "KNN fn, tp: 3, 6\n",
      "KNN f1 score: 0.387\n",
      "KNN cohens kappa score: 0.329\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 516 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22548 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 124, 13\n",
      "LR fn, tp: 1, 5\n",
      "LR f1 score: 0.417\n",
      "LR cohens kappa score: 0.377\n",
      "LR average precision score: 0.589\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 133, 4\n",
      "GB fn, tp: 4, 2\n",
      "GB f1 score: 0.333\n",
      "GB cohens kappa score: 0.304\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 121, 16\n",
      "KNN fn, tp: 2, 4\n",
      "KNN f1 score: 0.308\n",
      "KNN cohens kappa score: 0.260\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 21404 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 116, 22\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.368\n",
      "LR cohens kappa score: 0.303\n",
      "LR average precision score: 0.690\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 133, 5\n",
      "GB fn, tp: 7, 2\n",
      "GB f1 score: 0.250\n",
      "GB cohens kappa score: 0.208\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 123, 15\n",
      "KNN fn, tp: 5, 4\n",
      "KNN f1 score: 0.286\n",
      "KNN cohens kappa score: 0.221\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22152 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 122, 16\n",
      "LR fn, tp: 1, 8\n",
      "LR f1 score: 0.485\n",
      "LR cohens kappa score: 0.434\n",
      "LR average precision score: 0.680\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 133, 5\n",
      "GB fn, tp: 4, 5\n",
      "GB f1 score: 0.526\n",
      "GB cohens kappa score: 0.494\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 122, 16\n",
      "KNN fn, tp: 4, 5\n",
      "KNN f1 score: 0.333\n",
      "KNN cohens kappa score: 0.271\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23016 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 123, 15\n",
      "LR fn, tp: 3, 6\n",
      "LR f1 score: 0.400\n",
      "LR cohens kappa score: 0.344\n",
      "LR average precision score: 0.521\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 132, 6\n",
      "GB fn, tp: 7, 2\n",
      "GB f1 score: 0.235\n",
      "GB cohens kappa score: 0.189\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 124, 14\n",
      "KNN fn, tp: 5, 4\n",
      "KNN f1 score: 0.296\n",
      "KNN cohens kappa score: 0.234\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 518 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 21684 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 123, 15\n",
      "LR fn, tp: 1, 8\n",
      "LR f1 score: 0.500\n",
      "LR cohens kappa score: 0.452\n",
      "LR average precision score: 0.878\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 133, 5\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.600\n",
      "GB cohens kappa score: 0.571\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 126, 12\n",
      "KNN fn, tp: 4, 5\n",
      "KNN f1 score: 0.385\n",
      "KNN cohens kappa score: 0.331\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 516 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 20896 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 127, 10\n",
      "LR fn, tp: 0, 6\n",
      "LR f1 score: 0.545\n",
      "LR cohens kappa score: 0.516\n",
      "LR average precision score: 0.819\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 134, 3\n",
      "GB fn, tp: 4, 2\n",
      "GB f1 score: 0.364\n",
      "GB cohens kappa score: 0.338\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 124, 13\n",
      "KNN fn, tp: 3, 3\n",
      "KNN f1 score: 0.273\n",
      "KNN cohens kappa score: 0.225\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 128, 24\n",
      "LR fn, tp: 4, 9\n",
      "LR f1 score: 0.621\n",
      "LR cohens kappa score: 0.586\n",
      "LR average precision score: 0.947\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 122.64, 15.16\n",
      "LR fn, tp: 1.44, 6.96\n",
      "LR f1 score: 0.458\n",
      "LR cohens kappa score: 0.409\n",
      "LR average precision score: 0.687\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 114, 10\n",
      "LR fn, tp: 0, 5\n",
      "LR f1 score: 0.350\n",
      "LR cohens kappa score: 0.282\n",
      "LR average precision score: 0.482\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 137, 12\n",
      "GB fn, tp: 7, 6\n",
      "GB f1 score: 0.600\n",
      "GB cohens kappa score: 0.571\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 132.28, 5.52\n",
      "GB fn, tp: 4.96, 3.44\n",
      "GB f1 score: 0.386\n",
      "GB cohens kappa score: 0.349\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 126, 1\n",
      "GB fn, tp: 2, 1\n",
      "GB f1 score: 0.167\n",
      "GB cohens kappa score: 0.130\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 130, 19\n",
      "KNN fn, tp: 6, 7\n",
      "KNN f1 score: 0.467\n",
      "KNN cohens kappa score: 0.417\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 123.88, 13.92\n",
      "KNN fn, tp: 3.76, 4.64\n",
      "KNN f1 score: 0.342\n",
      "KNN cohens kappa score: 0.286\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 119, 8\n",
      "KNN fn, tp: 2, 3\n",
      "KNN f1 score: 0.250\n",
      "KNN cohens kappa score: 0.188\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_abalone9-18\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "fiscal-villa",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_car_good\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27908 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 170, 162\n",
      "LR fn, tp: 4, 10\n",
      "LR f1 score: 0.108\n",
      "LR cohens kappa score: 0.035\n",
      "LR average precision score: 0.061\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 325, 7\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.800\n",
      "GB cohens kappa score: 0.790\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 273, 59\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.322\n",
      "KNN cohens kappa score: 0.272\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25960 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 185, 147\n",
      "LR fn, tp: 3, 11\n",
      "LR f1 score: 0.128\n",
      "LR cohens kappa score: 0.058\n",
      "LR average precision score: 0.087\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 327, 5\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.848\n",
      "GB cohens kappa score: 0.841\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 273, 59\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.322\n",
      "KNN cohens kappa score: 0.272\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27112 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 172, 160\n",
      "LR fn, tp: 4, 10\n",
      "LR f1 score: 0.109\n",
      "LR cohens kappa score: 0.037\n",
      "LR average precision score: 0.057\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 328, 4\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.875\n",
      "GB cohens kappa score: 0.869\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 283, 49\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.364\n",
      "KNN cohens kappa score: 0.319\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26608 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 178, 154\n",
      "LR fn, tp: 4, 10\n",
      "LR f1 score: 0.112\n",
      "LR cohens kappa score: 0.041\n",
      "LR average precision score: 0.077\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 327, 5\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.848\n",
      "GB cohens kappa score: 0.841\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 283, 49\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.364\n",
      "KNN cohens kappa score: 0.319\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25564 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 175, 156\n",
      "LR fn, tp: 4, 9\n",
      "LR f1 score: 0.101\n",
      "LR cohens kappa score: 0.033\n",
      "LR average precision score: 0.056\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 325, 6\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.813\n",
      "GB cohens kappa score: 0.804\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 290, 41\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.388\n",
      "KNN cohens kappa score: 0.348\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28144 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 157, 175\n",
      "LR fn, tp: 4, 10\n",
      "LR f1 score: 0.101\n",
      "LR cohens kappa score: 0.027\n",
      "LR average precision score: 0.068\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 325, 7\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.800\n",
      "GB cohens kappa score: 0.790\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 285, 47\n",
      "KNN fn, tp: 1, 13\n",
      "KNN f1 score: 0.351\n",
      "KNN cohens kappa score: 0.306\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26520 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 169, 163\n",
      "LR fn, tp: 3, 11\n",
      "LR f1 score: 0.117\n",
      "LR cohens kappa score: 0.046\n",
      "LR average precision score: 0.070\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 329, 3\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.903\n",
      "GB cohens kappa score: 0.899\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 286, 46\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.378\n",
      "KNN cohens kappa score: 0.335\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28052 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 186, 146\n",
      "LR fn, tp: 4, 10\n",
      "LR f1 score: 0.118\n",
      "LR cohens kappa score: 0.047\n",
      "LR average precision score: 0.072\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 330, 2\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.933\n",
      "GB cohens kappa score: 0.930\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 292, 40\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.412\n",
      "KNN cohens kappa score: 0.371\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27964 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 183, 149\n",
      "LR fn, tp: 7, 7\n",
      "LR f1 score: 0.082\n",
      "LR cohens kappa score: 0.009\n",
      "LR average precision score: 0.050\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 323, 9\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.757\n",
      "GB cohens kappa score: 0.744\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 267, 65\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.301\n",
      "KNN cohens kappa score: 0.249\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28788 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 180, 151\n",
      "LR fn, tp: 5, 8\n",
      "LR f1 score: 0.093\n",
      "LR cohens kappa score: 0.025\n",
      "LR average precision score: 0.077\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 325, 6\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.813\n",
      "GB cohens kappa score: 0.804\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 270, 61\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.299\n",
      "KNN cohens kappa score: 0.251\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28080 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 168, 164\n",
      "LR fn, tp: 3, 11\n",
      "LR f1 score: 0.116\n",
      "LR cohens kappa score: 0.045\n",
      "LR average precision score: 0.077\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 328, 4\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.875\n",
      "GB cohens kappa score: 0.869\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 285, 47\n",
      "KNN fn, tp: 1, 13\n",
      "KNN f1 score: 0.351\n",
      "KNN cohens kappa score: 0.306\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28904 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 190, 142\n",
      "LR fn, tp: 3, 11\n",
      "LR f1 score: 0.132\n",
      "LR cohens kappa score: 0.062\n",
      "LR average precision score: 0.067\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 324, 8\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.778\n",
      "GB cohens kappa score: 0.766\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 280, 52\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.350\n",
      "KNN cohens kappa score: 0.303\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25080 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 180, 152\n",
      "LR fn, tp: 6, 8\n",
      "LR f1 score: 0.092\n",
      "LR cohens kappa score: 0.019\n",
      "LR average precision score: 0.056\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 326, 6\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.824\n",
      "GB cohens kappa score: 0.815\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 287, 45\n",
      "KNN fn, tp: 1, 13\n",
      "KNN f1 score: 0.361\n",
      "KNN cohens kappa score: 0.317\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26656 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 170, 162\n",
      "LR fn, tp: 3, 11\n",
      "LR f1 score: 0.118\n",
      "LR cohens kappa score: 0.046\n",
      "LR average precision score: 0.083\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 329, 3\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.903\n",
      "GB cohens kappa score: 0.899\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 288, 44\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.389\n",
      "KNN cohens kappa score: 0.346\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27932 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 168, 163\n",
      "LR fn, tp: 4, 9\n",
      "LR f1 score: 0.097\n",
      "LR cohens kappa score: 0.029\n",
      "LR average precision score: 0.055\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 325, 6\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.813\n",
      "GB cohens kappa score: 0.804\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 271, 60\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.302\n",
      "KNN cohens kappa score: 0.254\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27024 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 177, 155\n",
      "LR fn, tp: 3, 11\n",
      "LR f1 score: 0.122\n",
      "LR cohens kappa score: 0.051\n",
      "LR average precision score: 0.067\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 327, 5\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.848\n",
      "GB cohens kappa score: 0.841\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 284, 48\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.368\n",
      "KNN cohens kappa score: 0.324\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29172 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 173, 159\n",
      "LR fn, tp: 6, 8\n",
      "LR f1 score: 0.088\n",
      "LR cohens kappa score: 0.015\n",
      "LR average precision score: 0.063\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 329, 3\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.903\n",
      "GB cohens kappa score: 0.899\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 279, 53\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.346\n",
      "KNN cohens kappa score: 0.299\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25944 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 170, 162\n",
      "LR fn, tp: 4, 10\n",
      "LR f1 score: 0.108\n",
      "LR cohens kappa score: 0.035\n",
      "LR average precision score: 0.066\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 325, 7\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.800\n",
      "GB cohens kappa score: 0.790\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 281, 51\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.354\n",
      "KNN cohens kappa score: 0.308\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27432 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 189, 143\n",
      "LR fn, tp: 6, 8\n",
      "LR f1 score: 0.097\n",
      "LR cohens kappa score: 0.025\n",
      "LR average precision score: 0.056\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 326, 6\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.824\n",
      "GB cohens kappa score: 0.815\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 288, 44\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.389\n",
      "KNN cohens kappa score: 0.346\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27984 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 170, 161\n",
      "LR fn, tp: 1, 12\n",
      "LR f1 score: 0.129\n",
      "LR cohens kappa score: 0.063\n",
      "LR average precision score: 0.081\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 325, 6\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.813\n",
      "GB cohens kappa score: 0.804\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 275, 56\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.317\n",
      "KNN cohens kappa score: 0.271\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28284 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 175, 157\n",
      "LR fn, tp: 8, 6\n",
      "LR f1 score: 0.068\n",
      "LR cohens kappa score: -0.007\n",
      "LR average precision score: 0.054\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 329, 3\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.903\n",
      "GB cohens kappa score: 0.899\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 286, 46\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.378\n",
      "KNN cohens kappa score: 0.335\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26836 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 187, 145\n",
      "LR fn, tp: 6, 8\n",
      "LR f1 score: 0.096\n",
      "LR cohens kappa score: 0.023\n",
      "LR average precision score: 0.070\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 327, 5\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.848\n",
      "GB cohens kappa score: 0.841\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 284, 48\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.368\n",
      "KNN cohens kappa score: 0.324\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27324 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 162, 170\n",
      "LR fn, tp: 3, 11\n",
      "LR f1 score: 0.113\n",
      "LR cohens kappa score: 0.041\n",
      "LR average precision score: 0.079\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 323, 9\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.757\n",
      "GB cohens kappa score: 0.744\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 272, 60\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.318\n",
      "KNN cohens kappa score: 0.268\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26576 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 173, 159\n",
      "LR fn, tp: 4, 10\n",
      "LR f1 score: 0.109\n",
      "LR cohens kappa score: 0.037\n",
      "LR average precision score: 0.078\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 326, 6\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.824\n",
      "GB cohens kappa score: 0.815\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 280, 52\n",
      "KNN fn, tp: 0, 14\n",
      "KNN f1 score: 0.350\n",
      "KNN cohens kappa score: 0.303\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1272 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28312 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 176, 155\n",
      "LR fn, tp: 4, 9\n",
      "LR f1 score: 0.102\n",
      "LR cohens kappa score: 0.034\n",
      "LR average precision score: 0.065\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 327, 4\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.867\n",
      "GB cohens kappa score: 0.861\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 282, 49\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.347\n",
      "KNN cohens kappa score: 0.303\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 190, 175\n",
      "LR fn, tp: 8, 12\n",
      "LR f1 score: 0.132\n",
      "LR cohens kappa score: 0.063\n",
      "LR average precision score: 0.087\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 175.32, 156.48\n",
      "LR fn, tp: 4.24, 9.56\n",
      "LR f1 score: 0.106\n",
      "LR cohens kappa score: 0.035\n",
      "LR average precision score: 0.068\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 157, 142\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.068\n",
      "LR cohens kappa score: -0.007\n",
      "LR average precision score: 0.050\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 330, 9\n",
      "GB fn, tp: 0, 14\n",
      "GB f1 score: 0.933\n",
      "GB cohens kappa score: 0.930\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 326.4, 5.4\n",
      "GB fn, tp: 0.0, 13.8\n",
      "GB f1 score: 0.839\n",
      "GB cohens kappa score: 0.831\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 323, 2\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.757\n",
      "GB cohens kappa score: 0.744\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 292, 65\n",
      "KNN fn, tp: 1, 14\n",
      "KNN f1 score: 0.412\n",
      "KNN cohens kappa score: 0.371\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 280.96, 50.84\n",
      "KNN fn, tp: 0.12, 13.68\n",
      "KNN f1 score: 0.352\n",
      "KNN cohens kappa score: 0.306\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 267, 40\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.299\n",
      "KNN cohens kappa score: 0.249\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_car_good\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "indie-refrigerator",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_car-vgood\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25272 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 286, 47\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.356\n",
      "LR cohens kappa score: 0.314\n",
      "LR average precision score: 0.363\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 332, 1\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.963\n",
      "GB cohens kappa score: 0.961\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 304, 29\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.473\n",
      "KNN cohens kappa score: 0.441\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28040 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 286, 47\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.356\n",
      "LR cohens kappa score: 0.314\n",
      "LR average precision score: 0.304\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 332, 1\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.963\n",
      "GB cohens kappa score: 0.961\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 296, 37\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.413\n",
      "KNN cohens kappa score: 0.375\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28220 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 278, 55\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.321\n",
      "LR cohens kappa score: 0.275\n",
      "LR average precision score: 0.392\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 331, 2\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.929\n",
      "GB cohens kappa score: 0.926\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 285, 48\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.351\n",
      "KNN cohens kappa score: 0.309\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27916 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 290, 43\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.377\n",
      "LR cohens kappa score: 0.336\n",
      "LR average precision score: 0.367\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 332, 1\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.963\n",
      "GB cohens kappa score: 0.961\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 291, 42\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.382\n",
      "KNN cohens kappa score: 0.342\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1280 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28144 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 294, 37\n",
      "LR fn, tp: 1, 12\n",
      "LR f1 score: 0.387\n",
      "LR cohens kappa score: 0.348\n",
      "LR average precision score: 0.447\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 326, 5\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.839\n",
      "GB cohens kappa score: 0.831\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 299, 32\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.448\n",
      "KNN cohens kappa score: 0.414\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28808 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 290, 43\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.377\n",
      "LR cohens kappa score: 0.336\n",
      "LR average precision score: 0.289\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 330, 3\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.897\n",
      "GB cohens kappa score: 0.892\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 297, 36\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.419\n",
      "KNN cohens kappa score: 0.383\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28892 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 274, 59\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.306\n",
      "LR cohens kappa score: 0.259\n",
      "LR average precision score: 0.366\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 331, 2\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.929\n",
      "GB cohens kappa score: 0.926\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 288, 45\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.366\n",
      "KNN cohens kappa score: 0.325\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29280 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 293, 40\n",
      "LR fn, tp: 1, 12\n",
      "LR f1 score: 0.369\n",
      "LR cohens kappa score: 0.329\n",
      "LR average precision score: 0.345\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 332, 1\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.963\n",
      "GB cohens kappa score: 0.961\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 298, 35\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.426\n",
      "KNN cohens kappa score: 0.390\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27976 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 295, 38\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.406\n",
      "LR cohens kappa score: 0.368\n",
      "LR average precision score: 0.286\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 332, 1\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.963\n",
      "GB cohens kappa score: 0.961\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 294, 39\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.400\n",
      "KNN cohens kappa score: 0.362\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1280 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28164 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 284, 47\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.356\n",
      "LR cohens kappa score: 0.314\n",
      "LR average precision score: 0.555\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 331, 0\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 302, 29\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.473\n",
      "KNN cohens kappa score: 0.440\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27384 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 288, 45\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.366\n",
      "LR cohens kappa score: 0.325\n",
      "LR average precision score: 0.308\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 332, 1\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.963\n",
      "GB cohens kappa score: 0.961\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 293, 40\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.394\n",
      "KNN cohens kappa score: 0.355\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 30344 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 294, 39\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.400\n",
      "LR cohens kappa score: 0.362\n",
      "LR average precision score: 0.436\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 331, 2\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.929\n",
      "GB cohens kappa score: 0.926\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 296, 37\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.413\n",
      "KNN cohens kappa score: 0.375\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29304 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 280, 53\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.329\n",
      "LR cohens kappa score: 0.284\n",
      "LR average precision score: 0.314\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 328, 5\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.839\n",
      "GB cohens kappa score: 0.831\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 296, 37\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.413\n",
      "KNN cohens kappa score: 0.375\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27356 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 291, 42\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.382\n",
      "LR cohens kappa score: 0.342\n",
      "LR average precision score: 0.385\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 333, 0\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 289, 44\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.371\n",
      "KNN cohens kappa score: 0.330\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1280 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27440 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 286, 45\n",
      "LR fn, tp: 1, 12\n",
      "LR f1 score: 0.343\n",
      "LR cohens kappa score: 0.300\n",
      "LR average precision score: 0.376\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 330, 1\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.963\n",
      "GB cohens kappa score: 0.961\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 296, 35\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.426\n",
      "KNN cohens kappa score: 0.390\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25932 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 291, 42\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.382\n",
      "LR cohens kappa score: 0.342\n",
      "LR average precision score: 0.419\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 331, 2\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.929\n",
      "GB cohens kappa score: 0.926\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 296, 37\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.413\n",
      "KNN cohens kappa score: 0.375\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28604 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 284, 49\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.347\n",
      "LR cohens kappa score: 0.303\n",
      "LR average precision score: 0.511\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 332, 1\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.963\n",
      "GB cohens kappa score: 0.961\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 299, 34\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.433\n",
      "KNN cohens kappa score: 0.398\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26908 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 280, 53\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.329\n",
      "LR cohens kappa score: 0.284\n",
      "LR average precision score: 0.320\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 332, 1\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.963\n",
      "GB cohens kappa score: 0.961\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 292, 41\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.388\n",
      "KNN cohens kappa score: 0.349\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27744 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 290, 43\n",
      "LR fn, tp: 1, 12\n",
      "LR f1 score: 0.353\n",
      "LR cohens kappa score: 0.311\n",
      "LR average precision score: 0.275\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 332, 1\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.963\n",
      "GB cohens kappa score: 0.961\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 292, 41\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.388\n",
      "KNN cohens kappa score: 0.349\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1280 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28028 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 289, 42\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.382\n",
      "LR cohens kappa score: 0.342\n",
      "LR average precision score: 0.321\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 329, 2\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.929\n",
      "GB cohens kappa score: 0.926\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 294, 37\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.413\n",
      "KNN cohens kappa score: 0.375\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27880 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 279, 54\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.325\n",
      "LR cohens kappa score: 0.280\n",
      "LR average precision score: 0.292\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 331, 2\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.929\n",
      "GB cohens kappa score: 0.926\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 293, 40\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.394\n",
      "KNN cohens kappa score: 0.355\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27424 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 293, 40\n",
      "LR fn, tp: 1, 12\n",
      "LR f1 score: 0.369\n",
      "LR cohens kappa score: 0.329\n",
      "LR average precision score: 0.359\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 332, 1\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.963\n",
      "GB cohens kappa score: 0.961\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 304, 29\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.473\n",
      "KNN cohens kappa score: 0.441\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27672 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 298, 35\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.426\n",
      "LR cohens kappa score: 0.390\n",
      "LR average precision score: 0.336\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 332, 1\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.963\n",
      "GB cohens kappa score: 0.961\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 298, 35\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.426\n",
      "KNN cohens kappa score: 0.390\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1278 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28748 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 282, 51\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.338\n",
      "LR cohens kappa score: 0.294\n",
      "LR average precision score: 0.295\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 327, 6\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.813\n",
      "GB cohens kappa score: 0.804\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 287, 46\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.361\n",
      "KNN cohens kappa score: 0.319\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1280 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29072 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 287, 44\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.371\n",
      "LR cohens kappa score: 0.330\n",
      "LR average precision score: 0.488\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 329, 2\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.929\n",
      "GB cohens kappa score: 0.926\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 296, 35\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.426\n",
      "KNN cohens kappa score: 0.390\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 298, 59\n",
      "LR fn, tp: 1, 13\n",
      "LR f1 score: 0.426\n",
      "LR cohens kappa score: 0.390\n",
      "LR average precision score: 0.555\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 287.28, 45.32\n",
      "LR fn, tp: 0.2, 12.8\n",
      "LR f1 score: 0.362\n",
      "LR cohens kappa score: 0.320\n",
      "LR average precision score: 0.366\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 274, 35\n",
      "LR fn, tp: 0, 12\n",
      "LR f1 score: 0.306\n",
      "LR cohens kappa score: 0.259\n",
      "LR average precision score: 0.275\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 333, 6\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 330.8, 1.8\n",
      "GB fn, tp: 0.0, 13.0\n",
      "GB f1 score: 0.938\n",
      "GB cohens kappa score: 0.935\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 326, 0\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.813\n",
      "GB cohens kappa score: 0.804\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 304, 48\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.473\n",
      "KNN cohens kappa score: 0.441\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 295.0, 37.6\n",
      "KNN fn, tp: 0.0, 13.0\n",
      "KNN f1 score: 0.411\n",
      "KNN cohens kappa score: 0.374\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 285, 29\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.351\n",
      "KNN cohens kappa score: 0.309\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_car-vgood\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "sustainable-firmware",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_flare-F\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 15952 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 165, 40\n",
      "LR fn, tp: 5, 4\n",
      "LR f1 score: 0.151\n",
      "LR cohens kappa score: 0.087\n",
      "LR average precision score: 0.070\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 177, 28\n",
      "GB fn, tp: 6, 3\n",
      "GB f1 score: 0.150\n",
      "GB cohens kappa score: 0.091\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 169, 36\n",
      "KNN fn, tp: 5, 4\n",
      "KNN f1 score: 0.163\n",
      "KNN cohens kappa score: 0.102\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 18788 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 153, 52\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.257\n",
      "LR cohens kappa score: 0.198\n",
      "LR average precision score: 0.371\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 175, 30\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.267\n",
      "GB cohens kappa score: 0.214\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 166, 39\n",
      "KNN fn, tp: 1, 8\n",
      "KNN f1 score: 0.286\n",
      "KNN cohens kappa score: 0.231\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 18176 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 167, 38\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.259\n",
      "LR cohens kappa score: 0.203\n",
      "LR average precision score: 0.397\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 184, 21\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.333\n",
      "GB cohens kappa score: 0.288\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 173, 32\n",
      "KNN fn, tp: 6, 3\n",
      "KNN f1 score: 0.136\n",
      "KNN cohens kappa score: 0.074\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 18080 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 179, 26\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.409\n",
      "LR cohens kappa score: 0.367\n",
      "LR average precision score: 0.768\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 181, 24\n",
      "GB fn, tp: 2, 7\n",
      "GB f1 score: 0.350\n",
      "GB cohens kappa score: 0.305\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 177, 28\n",
      "KNN fn, tp: 1, 8\n",
      "KNN f1 score: 0.356\n",
      "KNN cohens kappa score: 0.309\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 18616 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 168, 35\n",
      "LR fn, tp: 2, 5\n",
      "LR f1 score: 0.213\n",
      "LR cohens kappa score: 0.165\n",
      "LR average precision score: 0.222\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 175, 28\n",
      "GB fn, tp: 1, 6\n",
      "GB f1 score: 0.293\n",
      "GB cohens kappa score: 0.251\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 170, 33\n",
      "KNN fn, tp: 2, 5\n",
      "KNN f1 score: 0.222\n",
      "KNN cohens kappa score: 0.176\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16348 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 166, 39\n",
      "LR fn, tp: 1, 8\n",
      "LR f1 score: 0.286\n",
      "LR cohens kappa score: 0.231\n",
      "LR average precision score: 0.401\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 179, 26\n",
      "GB fn, tp: 2, 7\n",
      "GB f1 score: 0.333\n",
      "GB cohens kappa score: 0.286\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 169, 36\n",
      "KNN fn, tp: 3, 6\n",
      "KNN f1 score: 0.235\n",
      "KNN cohens kappa score: 0.178\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 14648 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 166, 39\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.255\n",
      "LR cohens kappa score: 0.198\n",
      "LR average precision score: 0.368\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 176, 29\n",
      "GB fn, tp: 1, 8\n",
      "GB f1 score: 0.348\n",
      "GB cohens kappa score: 0.301\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 174, 31\n",
      "KNN fn, tp: 3, 6\n",
      "KNN f1 score: 0.261\n",
      "KNN cohens kappa score: 0.207\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17964 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 165, 40\n",
      "LR fn, tp: 1, 8\n",
      "LR f1 score: 0.281\n",
      "LR cohens kappa score: 0.226\n",
      "LR average precision score: 0.322\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 175, 30\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.267\n",
      "GB cohens kappa score: 0.214\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 175, 30\n",
      "KNN fn, tp: 3, 6\n",
      "KNN f1 score: 0.267\n",
      "KNN cohens kappa score: 0.214\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17048 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 177, 28\n",
      "LR fn, tp: 3, 6\n",
      "LR f1 score: 0.279\n",
      "LR cohens kappa score: 0.228\n",
      "LR average precision score: 0.310\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 187, 18\n",
      "GB fn, tp: 4, 5\n",
      "GB f1 score: 0.312\n",
      "GB cohens kappa score: 0.268\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 176, 29\n",
      "KNN fn, tp: 3, 6\n",
      "KNN f1 score: 0.273\n",
      "KNN cohens kappa score: 0.221\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17112 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 162, 41\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.255\n",
      "LR cohens kappa score: 0.208\n",
      "LR average precision score: 0.416\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 173, 30\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.195\n",
      "GB cohens kappa score: 0.148\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 169, 34\n",
      "KNN fn, tp: 1, 6\n",
      "KNN f1 score: 0.255\n",
      "KNN cohens kappa score: 0.211\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17768 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 180, 25\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.419\n",
      "LR cohens kappa score: 0.377\n",
      "LR average precision score: 0.779\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 191, 14\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.414\n",
      "GB cohens kappa score: 0.378\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 188, 17\n",
      "KNN fn, tp: 3, 6\n",
      "KNN f1 score: 0.375\n",
      "KNN cohens kappa score: 0.335\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17072 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 159, 46\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.226\n",
      "LR cohens kappa score: 0.166\n",
      "LR average precision score: 0.243\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 173, 32\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.255\n",
      "GB cohens kappa score: 0.201\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 159, 46\n",
      "KNN fn, tp: 2, 7\n",
      "KNN f1 score: 0.226\n",
      "KNN cohens kappa score: 0.166\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 18632 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 162, 43\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.237\n",
      "LR cohens kappa score: 0.179\n",
      "LR average precision score: 0.353\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 180, 25\n",
      "GB fn, tp: 2, 7\n",
      "GB f1 score: 0.341\n",
      "GB cohens kappa score: 0.295\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 165, 40\n",
      "KNN fn, tp: 1, 8\n",
      "KNN f1 score: 0.281\n",
      "KNN cohens kappa score: 0.226\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 18756 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 172, 33\n",
      "LR fn, tp: 3, 6\n",
      "LR f1 score: 0.250\n",
      "LR cohens kappa score: 0.195\n",
      "LR average precision score: 0.294\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 184, 21\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.333\n",
      "GB cohens kappa score: 0.288\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 175, 30\n",
      "KNN fn, tp: 5, 4\n",
      "KNN f1 score: 0.186\n",
      "KNN cohens kappa score: 0.128\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 15960 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 159, 44\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.211\n",
      "LR cohens kappa score: 0.161\n",
      "LR average precision score: 0.224\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 169, 34\n",
      "GB fn, tp: 4, 3\n",
      "GB f1 score: 0.136\n",
      "GB cohens kappa score: 0.085\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 171, 32\n",
      "KNN fn, tp: 4, 3\n",
      "KNN f1 score: 0.143\n",
      "KNN cohens kappa score: 0.092\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17984 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 163, 42\n",
      "LR fn, tp: 1, 8\n",
      "LR f1 score: 0.271\n",
      "LR cohens kappa score: 0.215\n",
      "LR average precision score: 0.186\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 176, 29\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.273\n",
      "GB cohens kappa score: 0.221\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 174, 31\n",
      "KNN fn, tp: 3, 6\n",
      "KNN f1 score: 0.261\n",
      "KNN cohens kappa score: 0.207\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 18788 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 172, 33\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.286\n",
      "LR cohens kappa score: 0.233\n",
      "LR average precision score: 0.537\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 188, 17\n",
      "GB fn, tp: 4, 5\n",
      "GB f1 score: 0.323\n",
      "GB cohens kappa score: 0.280\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 178, 27\n",
      "KNN fn, tp: 2, 7\n",
      "KNN f1 score: 0.326\n",
      "KNN cohens kappa score: 0.278\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 18040 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 165, 40\n",
      "LR fn, tp: 3, 6\n",
      "LR f1 score: 0.218\n",
      "LR cohens kappa score: 0.159\n",
      "LR average precision score: 0.244\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 167, 38\n",
      "GB fn, tp: 4, 5\n",
      "GB f1 score: 0.192\n",
      "GB cohens kappa score: 0.132\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 158, 47\n",
      "KNN fn, tp: 5, 4\n",
      "KNN f1 score: 0.133\n",
      "KNN cohens kappa score: 0.067\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16996 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 168, 37\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.327\n",
      "LR cohens kappa score: 0.276\n",
      "LR average precision score: 0.387\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 177, 28\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.279\n",
      "GB cohens kappa score: 0.228\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 175, 30\n",
      "KNN fn, tp: 2, 7\n",
      "KNN f1 score: 0.304\n",
      "KNN cohens kappa score: 0.254\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 18752 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 165, 38\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.269\n",
      "LR cohens kappa score: 0.224\n",
      "LR average precision score: 0.592\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 179, 24\n",
      "GB fn, tp: 2, 5\n",
      "GB f1 score: 0.278\n",
      "GB cohens kappa score: 0.237\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 169, 34\n",
      "KNN fn, tp: 2, 5\n",
      "KNN f1 score: 0.217\n",
      "KNN cohens kappa score: 0.171\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 19012 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 168, 37\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.264\n",
      "LR cohens kappa score: 0.209\n",
      "LR average precision score: 0.200\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 180, 25\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.300\n",
      "GB cohens kappa score: 0.251\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 174, 31\n",
      "KNN fn, tp: 4, 5\n",
      "KNN f1 score: 0.222\n",
      "KNN cohens kappa score: 0.166\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 18164 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 158, 47\n",
      "LR fn, tp: 1, 8\n",
      "LR f1 score: 0.250\n",
      "LR cohens kappa score: 0.192\n",
      "LR average precision score: 0.418\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 180, 25\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.300\n",
      "GB cohens kappa score: 0.251\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 169, 36\n",
      "KNN fn, tp: 3, 6\n",
      "KNN f1 score: 0.235\n",
      "KNN cohens kappa score: 0.178\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16236 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 164, 41\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.305\n",
      "LR cohens kappa score: 0.252\n",
      "LR average precision score: 0.500\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 181, 24\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.308\n",
      "GB cohens kappa score: 0.260\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 168, 37\n",
      "KNN fn, tp: 1, 8\n",
      "KNN f1 score: 0.296\n",
      "KNN cohens kappa score: 0.243\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 18360 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 175, 30\n",
      "LR fn, tp: 4, 5\n",
      "LR f1 score: 0.227\n",
      "LR cohens kappa score: 0.172\n",
      "LR average precision score: 0.187\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 183, 22\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.324\n",
      "GB cohens kappa score: 0.278\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 184, 21\n",
      "KNN fn, tp: 5, 4\n",
      "KNN f1 score: 0.235\n",
      "KNN cohens kappa score: 0.185\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 784 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 18628 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 160, 43\n",
      "LR fn, tp: 2, 5\n",
      "LR f1 score: 0.182\n",
      "LR cohens kappa score: 0.131\n",
      "LR average precision score: 0.430\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 171, 32\n",
      "GB fn, tp: 2, 5\n",
      "GB f1 score: 0.227\n",
      "GB cohens kappa score: 0.181\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 161, 42\n",
      "KNN fn, tp: 2, 5\n",
      "KNN f1 score: 0.185\n",
      "KNN cohens kappa score: 0.135\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 180, 52\n",
      "LR fn, tp: 5, 9\n",
      "LR f1 score: 0.419\n",
      "LR cohens kappa score: 0.377\n",
      "LR average precision score: 0.779\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 166.32, 38.28\n",
      "LR fn, tp: 1.56, 7.04\n",
      "LR f1 score: 0.263\n",
      "LR cohens kappa score: 0.210\n",
      "LR average precision score: 0.369\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 153, 25\n",
      "LR fn, tp: 0, 4\n",
      "LR f1 score: 0.151\n",
      "LR cohens kappa score: 0.087\n",
      "LR average precision score: 0.070\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 191, 38\n",
      "GB fn, tp: 6, 8\n",
      "GB f1 score: 0.414\n",
      "GB cohens kappa score: 0.378\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 178.44, 26.16\n",
      "GB fn, tp: 2.92, 5.68\n",
      "GB f1 score: 0.285\n",
      "GB cohens kappa score: 0.237\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 167, 14\n",
      "GB fn, tp: 1, 3\n",
      "GB f1 score: 0.136\n",
      "GB cohens kappa score: 0.085\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 188, 47\n",
      "KNN fn, tp: 6, 8\n",
      "KNN f1 score: 0.375\n",
      "KNN cohens kappa score: 0.335\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 171.44, 33.16\n",
      "KNN fn, tp: 2.88, 5.72\n",
      "KNN f1 score: 0.243\n",
      "KNN cohens kappa score: 0.190\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 158, 17\n",
      "KNN fn, tp: 1, 3\n",
      "KNN f1 score: 0.133\n",
      "KNN cohens kappa score: 0.067\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_flare-F\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "original-twist",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_hypothyroid\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 31776 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 520, 83\n",
      "LR fn, tp: 4, 27\n",
      "LR f1 score: 0.383\n",
      "LR cohens kappa score: 0.332\n",
      "LR average precision score: 0.472\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 592, 11\n",
      "GB fn, tp: 3, 28\n",
      "GB f1 score: 0.800\n",
      "GB cohens kappa score: 0.788\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 574, 29\n",
      "KNN fn, tp: 2, 29\n",
      "KNN f1 score: 0.652\n",
      "KNN cohens kappa score: 0.628\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 30528 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 506, 97\n",
      "LR fn, tp: 2, 29\n",
      "LR f1 score: 0.369\n",
      "LR cohens kappa score: 0.316\n",
      "LR average precision score: 0.469\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 586, 17\n",
      "GB fn, tp: 2, 29\n",
      "GB f1 score: 0.753\n",
      "GB cohens kappa score: 0.738\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 566, 37\n",
      "KNN fn, tp: 6, 25\n",
      "KNN f1 score: 0.538\n",
      "KNN cohens kappa score: 0.505\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29948 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 501, 102\n",
      "LR fn, tp: 4, 27\n",
      "LR f1 score: 0.337\n",
      "LR cohens kappa score: 0.281\n",
      "LR average precision score: 0.344\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 587, 16\n",
      "GB fn, tp: 2, 29\n",
      "GB f1 score: 0.763\n",
      "GB cohens kappa score: 0.749\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 572, 31\n",
      "KNN fn, tp: 6, 25\n",
      "KNN f1 score: 0.575\n",
      "KNN cohens kappa score: 0.546\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 31512 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 500, 103\n",
      "LR fn, tp: 3, 28\n",
      "LR f1 score: 0.346\n",
      "LR cohens kappa score: 0.289\n",
      "LR average precision score: 0.416\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 597, 6\n",
      "GB fn, tp: 7, 24\n",
      "GB f1 score: 0.787\n",
      "GB cohens kappa score: 0.776\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 571, 32\n",
      "KNN fn, tp: 11, 20\n",
      "KNN f1 score: 0.482\n",
      "KNN cohens kappa score: 0.448\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2288 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 30596 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 509, 91\n",
      "LR fn, tp: 3, 24\n",
      "LR f1 score: 0.338\n",
      "LR cohens kappa score: 0.288\n",
      "LR average precision score: 0.525\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 592, 8\n",
      "GB fn, tp: 3, 24\n",
      "GB f1 score: 0.814\n",
      "GB cohens kappa score: 0.804\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 567, 33\n",
      "KNN fn, tp: 3, 24\n",
      "KNN f1 score: 0.571\n",
      "KNN cohens kappa score: 0.545\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29852 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 521, 82\n",
      "LR fn, tp: 3, 28\n",
      "LR f1 score: 0.397\n",
      "LR cohens kappa score: 0.347\n",
      "LR average precision score: 0.484\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 590, 13\n",
      "GB fn, tp: 2, 29\n",
      "GB f1 score: 0.795\n",
      "GB cohens kappa score: 0.782\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 580, 23\n",
      "KNN fn, tp: 6, 25\n",
      "KNN f1 score: 0.633\n",
      "KNN cohens kappa score: 0.610\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 33492 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 519, 84\n",
      "LR fn, tp: 5, 26\n",
      "LR f1 score: 0.369\n",
      "LR cohens kappa score: 0.317\n",
      "LR average precision score: 0.411\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 588, 15\n",
      "GB fn, tp: 3, 28\n",
      "GB f1 score: 0.757\n",
      "GB cohens kappa score: 0.742\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 573, 30\n",
      "KNN fn, tp: 4, 27\n",
      "KNN f1 score: 0.614\n",
      "KNN cohens kappa score: 0.588\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 30660 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 504, 99\n",
      "LR fn, tp: 2, 29\n",
      "LR f1 score: 0.365\n",
      "LR cohens kappa score: 0.310\n",
      "LR average precision score: 0.577\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 594, 9\n",
      "GB fn, tp: 6, 25\n",
      "GB f1 score: 0.769\n",
      "GB cohens kappa score: 0.757\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 569, 34\n",
      "KNN fn, tp: 7, 24\n",
      "KNN f1 score: 0.539\n",
      "KNN cohens kappa score: 0.508\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 31012 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 508, 95\n",
      "LR fn, tp: 5, 26\n",
      "LR f1 score: 0.342\n",
      "LR cohens kappa score: 0.287\n",
      "LR average precision score: 0.297\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 589, 14\n",
      "GB fn, tp: 4, 27\n",
      "GB f1 score: 0.750\n",
      "GB cohens kappa score: 0.735\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 569, 34\n",
      "KNN fn, tp: 7, 24\n",
      "KNN f1 score: 0.539\n",
      "KNN cohens kappa score: 0.508\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2288 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 30496 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 495, 105\n",
      "LR fn, tp: 1, 26\n",
      "LR f1 score: 0.329\n",
      "LR cohens kappa score: 0.278\n",
      "LR average precision score: 0.472\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 591, 9\n",
      "GB fn, tp: 2, 25\n",
      "GB f1 score: 0.820\n",
      "GB cohens kappa score: 0.811\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 565, 35\n",
      "KNN fn, tp: 5, 22\n",
      "KNN f1 score: 0.524\n",
      "KNN cohens kappa score: 0.494\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 31068 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 500, 103\n",
      "LR fn, tp: 1, 30\n",
      "LR f1 score: 0.366\n",
      "LR cohens kappa score: 0.311\n",
      "LR average precision score: 0.478\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 595, 8\n",
      "GB fn, tp: 3, 28\n",
      "GB f1 score: 0.836\n",
      "GB cohens kappa score: 0.827\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 579, 24\n",
      "KNN fn, tp: 7, 24\n",
      "KNN f1 score: 0.608\n",
      "KNN cohens kappa score: 0.583\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 30708 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 525, 78\n",
      "LR fn, tp: 10, 21\n",
      "LR f1 score: 0.323\n",
      "LR cohens kappa score: 0.269\n",
      "LR average precision score: 0.291\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 588, 15\n",
      "GB fn, tp: 3, 28\n",
      "GB f1 score: 0.757\n",
      "GB cohens kappa score: 0.742\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 572, 31\n",
      "KNN fn, tp: 6, 25\n",
      "KNN f1 score: 0.575\n",
      "KNN cohens kappa score: 0.546\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 30060 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 509, 94\n",
      "LR fn, tp: 1, 30\n",
      "LR f1 score: 0.387\n",
      "LR cohens kappa score: 0.335\n",
      "LR average precision score: 0.548\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 585, 18\n",
      "GB fn, tp: 3, 28\n",
      "GB f1 score: 0.727\n",
      "GB cohens kappa score: 0.710\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 566, 37\n",
      "KNN fn, tp: 7, 24\n",
      "KNN f1 score: 0.522\n",
      "KNN cohens kappa score: 0.489\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 31492 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 510, 93\n",
      "LR fn, tp: 2, 29\n",
      "LR f1 score: 0.379\n",
      "LR cohens kappa score: 0.327\n",
      "LR average precision score: 0.493\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 592, 11\n",
      "GB fn, tp: 4, 27\n",
      "GB f1 score: 0.783\n",
      "GB cohens kappa score: 0.770\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 570, 33\n",
      "KNN fn, tp: 7, 24\n",
      "KNN f1 score: 0.545\n",
      "KNN cohens kappa score: 0.515\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2288 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 33648 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 510, 90\n",
      "LR fn, tp: 4, 23\n",
      "LR f1 score: 0.329\n",
      "LR cohens kappa score: 0.278\n",
      "LR average precision score: 0.283\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 591, 9\n",
      "GB fn, tp: 1, 26\n",
      "GB f1 score: 0.839\n",
      "GB cohens kappa score: 0.830\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 574, 26\n",
      "KNN fn, tp: 2, 25\n",
      "KNN f1 score: 0.641\n",
      "KNN cohens kappa score: 0.620\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 30688 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 519, 84\n",
      "LR fn, tp: 3, 28\n",
      "LR f1 score: 0.392\n",
      "LR cohens kappa score: 0.341\n",
      "LR average precision score: 0.361\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 588, 15\n",
      "GB fn, tp: 4, 27\n",
      "GB f1 score: 0.740\n",
      "GB cohens kappa score: 0.724\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 570, 33\n",
      "KNN fn, tp: 5, 26\n",
      "KNN f1 score: 0.578\n",
      "KNN cohens kappa score: 0.549\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 34156 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 517, 86\n",
      "LR fn, tp: 5, 26\n",
      "LR f1 score: 0.364\n",
      "LR cohens kappa score: 0.311\n",
      "LR average precision score: 0.419\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 589, 14\n",
      "GB fn, tp: 3, 28\n",
      "GB f1 score: 0.767\n",
      "GB cohens kappa score: 0.753\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 574, 29\n",
      "KNN fn, tp: 4, 27\n",
      "KNN f1 score: 0.621\n",
      "KNN cohens kappa score: 0.595\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 30516 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 507, 96\n",
      "LR fn, tp: 3, 28\n",
      "LR f1 score: 0.361\n",
      "LR cohens kappa score: 0.307\n",
      "LR average precision score: 0.584\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 595, 8\n",
      "GB fn, tp: 3, 28\n",
      "GB f1 score: 0.836\n",
      "GB cohens kappa score: 0.827\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 575, 28\n",
      "KNN fn, tp: 5, 26\n",
      "KNN f1 score: 0.612\n",
      "KNN cohens kappa score: 0.586\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 30296 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 492, 111\n",
      "LR fn, tp: 2, 29\n",
      "LR f1 score: 0.339\n",
      "LR cohens kappa score: 0.282\n",
      "LR average precision score: 0.430\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 592, 11\n",
      "GB fn, tp: 2, 29\n",
      "GB f1 score: 0.817\n",
      "GB cohens kappa score: 0.806\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 570, 33\n",
      "KNN fn, tp: 7, 24\n",
      "KNN f1 score: 0.545\n",
      "KNN cohens kappa score: 0.515\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2288 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 30772 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 506, 94\n",
      "LR fn, tp: 3, 24\n",
      "LR f1 score: 0.331\n",
      "LR cohens kappa score: 0.281\n",
      "LR average precision score: 0.422\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 586, 14\n",
      "GB fn, tp: 4, 23\n",
      "GB f1 score: 0.719\n",
      "GB cohens kappa score: 0.704\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 565, 35\n",
      "KNN fn, tp: 6, 21\n",
      "KNN f1 score: 0.506\n",
      "KNN cohens kappa score: 0.476\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 34296 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 507, 96\n",
      "LR fn, tp: 3, 28\n",
      "LR f1 score: 0.361\n",
      "LR cohens kappa score: 0.307\n",
      "LR average precision score: 0.437\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 587, 16\n",
      "GB fn, tp: 3, 28\n",
      "GB f1 score: 0.747\n",
      "GB cohens kappa score: 0.731\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 575, 28\n",
      "KNN fn, tp: 6, 25\n",
      "KNN f1 score: 0.595\n",
      "KNN cohens kappa score: 0.569\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29752 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 512, 91\n",
      "LR fn, tp: 4, 27\n",
      "LR f1 score: 0.362\n",
      "LR cohens kappa score: 0.309\n",
      "LR average precision score: 0.476\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 595, 8\n",
      "GB fn, tp: 1, 30\n",
      "GB f1 score: 0.870\n",
      "GB cohens kappa score: 0.862\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 570, 33\n",
      "KNN fn, tp: 8, 23\n",
      "KNN f1 score: 0.529\n",
      "KNN cohens kappa score: 0.497\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28952 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 501, 102\n",
      "LR fn, tp: 2, 29\n",
      "LR f1 score: 0.358\n",
      "LR cohens kappa score: 0.303\n",
      "LR average precision score: 0.496\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 588, 15\n",
      "GB fn, tp: 7, 24\n",
      "GB f1 score: 0.686\n",
      "GB cohens kappa score: 0.668\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 568, 35\n",
      "KNN fn, tp: 7, 24\n",
      "KNN f1 score: 0.533\n",
      "KNN cohens kappa score: 0.501\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2289 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 30516 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 505, 98\n",
      "LR fn, tp: 3, 28\n",
      "LR f1 score: 0.357\n",
      "LR cohens kappa score: 0.302\n",
      "LR average precision score: 0.523\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 594, 9\n",
      "GB fn, tp: 2, 29\n",
      "GB f1 score: 0.841\n",
      "GB cohens kappa score: 0.832\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 570, 33\n",
      "KNN fn, tp: 6, 25\n",
      "KNN f1 score: 0.562\n",
      "KNN cohens kappa score: 0.532\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2288 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 31260 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 517, 83\n",
      "LR fn, tp: 2, 25\n",
      "LR f1 score: 0.370\n",
      "LR cohens kappa score: 0.324\n",
      "LR average precision score: 0.309\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 590, 10\n",
      "GB fn, tp: 5, 22\n",
      "GB f1 score: 0.746\n",
      "GB cohens kappa score: 0.733\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 569, 31\n",
      "KNN fn, tp: 5, 22\n",
      "KNN f1 score: 0.550\n",
      "KNN cohens kappa score: 0.523\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 525, 111\n",
      "LR fn, tp: 10, 30\n",
      "LR f1 score: 0.397\n",
      "LR cohens kappa score: 0.347\n",
      "LR average precision score: 0.584\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 508.8, 93.6\n",
      "LR fn, tp: 3.2, 27.0\n",
      "LR f1 score: 0.358\n",
      "LR cohens kappa score: 0.305\n",
      "LR average precision score: 0.441\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 492, 78\n",
      "LR fn, tp: 1, 21\n",
      "LR f1 score: 0.323\n",
      "LR cohens kappa score: 0.269\n",
      "LR average precision score: 0.283\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 597, 18\n",
      "GB fn, tp: 7, 30\n",
      "GB f1 score: 0.870\n",
      "GB cohens kappa score: 0.862\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 590.44, 11.96\n",
      "GB fn, tp: 3.28, 26.92\n",
      "GB f1 score: 0.781\n",
      "GB cohens kappa score: 0.768\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 585, 6\n",
      "GB fn, tp: 1, 22\n",
      "GB f1 score: 0.686\n",
      "GB cohens kappa score: 0.668\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 580, 37\n",
      "KNN fn, tp: 11, 29\n",
      "KNN f1 score: 0.652\n",
      "KNN cohens kappa score: 0.628\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 570.92, 31.48\n",
      "KNN fn, tp: 5.8, 24.4\n",
      "KNN f1 score: 0.568\n",
      "KNN cohens kappa score: 0.539\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 565, 23\n",
      "KNN fn, tp: 2, 20\n",
      "KNN f1 score: 0.482\n",
      "KNN cohens kappa score: 0.448\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_hypothyroid\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "numerous-graduation",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_kddcup-guess_passwd_vs_satan\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16884 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17460 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16768 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 317, 1\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 0.957\n",
      "KNN cohens kappa score: 0.955\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17408 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1228 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17480 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 317, 0\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 317, 0\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 317, 0\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17540 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17120 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 317, 1\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 0.957\n",
      "LR cohens kappa score: 0.955\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 317, 1\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 0.957\n",
      "KNN cohens kappa score: 0.955\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16984 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17756 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1228 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17420 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 317, 0\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 317, 0\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 317, 0\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16896 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 317, 1\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 0.957\n",
      "KNN cohens kappa score: 0.955\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17564 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17228 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17480 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1228 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16860 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 317, 0\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 317, 0\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 317, 0\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17576 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17164 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17444 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17024 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1228 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16912 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 317, 0\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 317, 0\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 316, 1\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.947\n",
      "KNN cohens kappa score: 0.946\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16956 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 317, 1\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 0.957\n",
      "LR cohens kappa score: 0.955\n",
      "LR average precision score: 0.917\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 317, 1\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 0.957\n",
      "KNN cohens kappa score: 0.955\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17160 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17564 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1229 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17100 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 318, 0\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 318, 0\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1228 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17252 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 317, 0\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 317, 0\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 317, 0\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 318, 1\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 317.72, 0.08\n",
      "LR fn, tp: 0.0, 10.6\n",
      "LR f1 score: 0.997\n",
      "LR cohens kappa score: 0.996\n",
      "LR average precision score: 0.997\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 317, 0\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.957\n",
      "LR cohens kappa score: 0.955\n",
      "LR average precision score: 0.917\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 318, 0\n",
      "GB fn, tp: 0, 11\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 317.8, 0.0\n",
      "GB fn, tp: 0.0, 10.6\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 317, 0\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 318, 1\n",
      "KNN fn, tp: 0, 11\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 317.6, 0.2\n",
      "KNN fn, tp: 0.0, 10.6\n",
      "KNN f1 score: 0.991\n",
      "KNN cohens kappa score: 0.991\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 316, 0\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.947\n",
      "KNN cohens kappa score: 0.946\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_kddcup-guess_passwd_vs_satan\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "thorough-impression",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_kr-vs-k-three_vs_eleven\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 42324 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 570, 1\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.971\n",
      "LR cohens kappa score: 0.971\n",
      "LR average precision score: 0.997\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 567, 4\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.895\n",
      "KNN cohens kappa score: 0.891\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 42048 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 571, 0\n",
      "LR fn, tp: 1, 16\n",
      "LR f1 score: 0.970\n",
      "LR cohens kappa score: 0.969\n",
      "LR average precision score: 0.997\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 568, 3\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.919\n",
      "KNN cohens kappa score: 0.916\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 42224 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 570, 1\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.971\n",
      "LR cohens kappa score: 0.971\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 567, 4\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.895\n",
      "KNN cohens kappa score: 0.891\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 41424 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 569, 2\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.944\n",
      "LR cohens kappa score: 0.943\n",
      "LR average precision score: 0.997\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 564, 7\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.829\n",
      "KNN cohens kappa score: 0.823\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2216 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 42260 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 566, 4\n",
      "LR fn, tp: 1, 12\n",
      "LR f1 score: 0.828\n",
      "LR cohens kappa score: 0.823\n",
      "LR average precision score: 0.850\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 568, 2\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.929\n",
      "GB cohens kappa score: 0.927\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 568, 2\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.929\n",
      "KNN cohens kappa score: 0.927\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 42532 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 569, 2\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.944\n",
      "LR cohens kappa score: 0.943\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 571, 0\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 41612 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 571, 0\n",
      "LR fn, tp: 1, 16\n",
      "LR f1 score: 0.970\n",
      "LR cohens kappa score: 0.969\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 569, 2\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.944\n",
      "KNN cohens kappa score: 0.943\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 41808 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 570, 1\n",
      "LR fn, tp: 1, 16\n",
      "LR f1 score: 0.941\n",
      "LR cohens kappa score: 0.939\n",
      "LR average precision score: 0.979\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 566, 5\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.872\n",
      "KNN cohens kappa score: 0.867\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 42040 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 569, 2\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.944\n",
      "LR cohens kappa score: 0.943\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 568, 3\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.919\n",
      "KNN cohens kappa score: 0.916\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2216 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 42900 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 569, 1\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 0.963\n",
      "LR cohens kappa score: 0.962\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 570, 0\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 565, 5\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.839\n",
      "KNN cohens kappa score: 0.834\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 40764 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 569, 2\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.944\n",
      "LR cohens kappa score: 0.943\n",
      "LR average precision score: 0.993\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 568, 3\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.919\n",
      "KNN cohens kappa score: 0.916\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 42160 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 570, 1\n",
      "LR fn, tp: 1, 16\n",
      "LR f1 score: 0.941\n",
      "LR cohens kappa score: 0.939\n",
      "LR average precision score: 0.997\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 569, 2\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.944\n",
      "KNN cohens kappa score: 0.943\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 41068 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 570, 1\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.971\n",
      "LR cohens kappa score: 0.971\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 567, 4\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.895\n",
      "KNN cohens kappa score: 0.891\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 41256 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 570, 1\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.971\n",
      "LR cohens kappa score: 0.971\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 569, 2\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.944\n",
      "KNN cohens kappa score: 0.943\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2216 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 40928 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 567, 3\n",
      "LR fn, tp: 1, 12\n",
      "LR f1 score: 0.857\n",
      "LR cohens kappa score: 0.854\n",
      "LR average precision score: 0.976\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 570, 0\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 568, 2\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.929\n",
      "KNN cohens kappa score: 0.927\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 42272 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 569, 2\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.944\n",
      "LR cohens kappa score: 0.943\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 564, 7\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.829\n",
      "KNN cohens kappa score: 0.823\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 41672 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 570, 1\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.971\n",
      "LR cohens kappa score: 0.971\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 570, 1\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.971\n",
      "KNN cohens kappa score: 0.971\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 41608 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 569, 2\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.944\n",
      "LR cohens kappa score: 0.943\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 567, 4\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.895\n",
      "KNN cohens kappa score: 0.891\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 39388 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 568, 3\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.919\n",
      "LR cohens kappa score: 0.916\n",
      "LR average precision score: 0.889\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 569, 2\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 0.944\n",
      "GB cohens kappa score: 0.943\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 569, 2\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.944\n",
      "KNN cohens kappa score: 0.943\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2216 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 41084 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 569, 1\n",
      "LR fn, tp: 1, 12\n",
      "LR f1 score: 0.923\n",
      "LR cohens kappa score: 0.921\n",
      "LR average precision score: 0.990\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 570, 0\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 568, 2\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.929\n",
      "KNN cohens kappa score: 0.927\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 42796 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 568, 3\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.919\n",
      "LR cohens kappa score: 0.916\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 566, 5\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.872\n",
      "KNN cohens kappa score: 0.867\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 41364 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 568, 3\n",
      "LR fn, tp: 0, 17\n",
      "LR f1 score: 0.919\n",
      "LR cohens kappa score: 0.916\n",
      "LR average precision score: 0.990\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 570, 1\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.971\n",
      "KNN cohens kappa score: 0.971\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 42496 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 570, 1\n",
      "LR fn, tp: 1, 16\n",
      "LR f1 score: 0.941\n",
      "LR cohens kappa score: 0.939\n",
      "LR average precision score: 0.997\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 567, 4\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.895\n",
      "KNN cohens kappa score: 0.891\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2219 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 42296 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 570, 1\n",
      "LR fn, tp: 1, 16\n",
      "LR f1 score: 0.941\n",
      "LR cohens kappa score: 0.939\n",
      "LR average precision score: 0.993\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 571, 0\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 567, 4\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 0.895\n",
      "KNN cohens kappa score: 0.891\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2216 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 41780 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 570, 0\n",
      "LR fn, tp: 0, 13\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 570, 0\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 567, 3\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.897\n",
      "KNN cohens kappa score: 0.894\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 571, 4\n",
      "LR fn, tp: 1, 17\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 569.24, 1.56\n",
      "LR fn, tp: 0.36, 15.84\n",
      "LR f1 score: 0.942\n",
      "LR cohens kappa score: 0.941\n",
      "LR average precision score: 0.986\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 566, 0\n",
      "LR fn, tp: 0, 12\n",
      "LR f1 score: 0.828\n",
      "LR cohens kappa score: 0.823\n",
      "LR average precision score: 0.850\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 571, 2\n",
      "GB fn, tp: 0, 17\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 570.64, 0.16\n",
      "GB fn, tp: 0.0, 16.2\n",
      "GB f1 score: 0.995\n",
      "GB cohens kappa score: 0.995\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 568, 0\n",
      "GB fn, tp: 0, 13\n",
      "GB f1 score: 0.929\n",
      "GB cohens kappa score: 0.927\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 571, 7\n",
      "KNN fn, tp: 0, 17\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 567.56, 3.24\n",
      "KNN fn, tp: 0.0, 16.2\n",
      "KNN f1 score: 0.911\n",
      "KNN cohens kappa score: 0.908\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 564, 0\n",
      "KNN fn, tp: 0, 13\n",
      "KNN f1 score: 0.829\n",
      "KNN cohens kappa score: 0.823\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_kr-vs-k-three_vs_eleven\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "working-poland",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_kr-vs-k-zero-one_vs_draw\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 39072 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 544, 16\n",
      "LR fn, tp: 2, 19\n",
      "LR f1 score: 0.679\n",
      "LR cohens kappa score: 0.663\n",
      "LR average precision score: 0.877\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 558, 2\n",
      "GB fn, tp: 1, 20\n",
      "GB f1 score: 0.930\n",
      "GB cohens kappa score: 0.928\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 549, 11\n",
      "KNN fn, tp: 2, 19\n",
      "KNN f1 score: 0.745\n",
      "KNN cohens kappa score: 0.734\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 40816 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 546, 14\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.750\n",
      "LR cohens kappa score: 0.738\n",
      "LR average precision score: 0.918\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 560, 0\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 556, 4\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.913\n",
      "KNN cohens kappa score: 0.909\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 37060 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 530, 30\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.583\n",
      "LR cohens kappa score: 0.561\n",
      "LR average precision score: 0.810\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 557, 3\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.933\n",
      "GB cohens kappa score: 0.931\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 551, 9\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.824\n",
      "KNN cohens kappa score: 0.816\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 40916 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 532, 28\n",
      "LR fn, tp: 1, 20\n",
      "LR f1 score: 0.580\n",
      "LR cohens kappa score: 0.557\n",
      "LR average precision score: 0.826\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 553, 7\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.857\n",
      "GB cohens kappa score: 0.851\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 552, 8\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.840\n",
      "KNN cohens kappa score: 0.833\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2156 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 40456 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 536, 20\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.677\n",
      "LR cohens kappa score: 0.661\n",
      "LR average precision score: 0.968\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 556, 0\n",
      "GB fn, tp: 1, 20\n",
      "GB f1 score: 0.976\n",
      "GB cohens kappa score: 0.975\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 550, 6\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.875\n",
      "KNN cohens kappa score: 0.870\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 42064 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 539, 21\n",
      "LR fn, tp: 1, 20\n",
      "LR f1 score: 0.645\n",
      "LR cohens kappa score: 0.627\n",
      "LR average precision score: 0.925\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 557, 3\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.933\n",
      "GB cohens kappa score: 0.931\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 550, 10\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.808\n",
      "KNN cohens kappa score: 0.799\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 39340 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 541, 19\n",
      "LR fn, tp: 2, 19\n",
      "LR f1 score: 0.644\n",
      "LR cohens kappa score: 0.627\n",
      "LR average precision score: 0.917\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 558, 2\n",
      "GB fn, tp: 1, 20\n",
      "GB f1 score: 0.930\n",
      "GB cohens kappa score: 0.928\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 554, 6\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.875\n",
      "KNN cohens kappa score: 0.870\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 41396 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 539, 21\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.667\n",
      "LR cohens kappa score: 0.650\n",
      "LR average precision score: 0.895\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 559, 1\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.977\n",
      "GB cohens kappa score: 0.976\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 557, 3\n",
      "KNN fn, tp: 1, 20\n",
      "KNN f1 score: 0.909\n",
      "KNN cohens kappa score: 0.906\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 40252 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 535, 25\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.627\n",
      "LR cohens kappa score: 0.607\n",
      "LR average precision score: 0.860\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 559, 1\n",
      "GB fn, tp: 1, 20\n",
      "GB f1 score: 0.952\n",
      "GB cohens kappa score: 0.951\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 549, 11\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.792\n",
      "KNN cohens kappa score: 0.783\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2156 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 39648 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 535, 21\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.667\n",
      "LR cohens kappa score: 0.650\n",
      "LR average precision score: 0.872\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 554, 2\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.955\n",
      "GB cohens kappa score: 0.953\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 554, 2\n",
      "KNN fn, tp: 1, 20\n",
      "KNN f1 score: 0.930\n",
      "KNN cohens kappa score: 0.928\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 39808 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 544, 16\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.724\n",
      "LR cohens kappa score: 0.711\n",
      "LR average precision score: 0.940\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 559, 1\n",
      "GB fn, tp: 1, 20\n",
      "GB f1 score: 0.952\n",
      "GB cohens kappa score: 0.951\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 549, 11\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.792\n",
      "KNN cohens kappa score: 0.783\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 39996 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 546, 14\n",
      "LR fn, tp: 1, 20\n",
      "LR f1 score: 0.727\n",
      "LR cohens kappa score: 0.715\n",
      "LR average precision score: 0.887\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 559, 1\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.977\n",
      "GB cohens kappa score: 0.976\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 557, 3\n",
      "KNN fn, tp: 1, 20\n",
      "KNN f1 score: 0.909\n",
      "KNN cohens kappa score: 0.906\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 39396 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 534, 26\n",
      "LR fn, tp: 1, 20\n",
      "LR f1 score: 0.597\n",
      "LR cohens kappa score: 0.576\n",
      "LR average precision score: 0.794\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 558, 2\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.955\n",
      "GB cohens kappa score: 0.953\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 552, 8\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.840\n",
      "KNN cohens kappa score: 0.833\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 39920 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 535, 25\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.627\n",
      "LR cohens kappa score: 0.607\n",
      "LR average precision score: 0.909\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 559, 1\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.977\n",
      "GB cohens kappa score: 0.976\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 554, 6\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.875\n",
      "KNN cohens kappa score: 0.870\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2156 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 40496 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 524, 32\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.568\n",
      "LR cohens kappa score: 0.544\n",
      "LR average precision score: 0.882\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 551, 5\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.894\n",
      "GB cohens kappa score: 0.889\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 547, 9\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.824\n",
      "KNN cohens kappa score: 0.816\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 40588 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 540, 20\n",
      "LR fn, tp: 1, 20\n",
      "LR f1 score: 0.656\n",
      "LR cohens kappa score: 0.639\n",
      "LR average precision score: 0.926\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 558, 2\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.955\n",
      "GB cohens kappa score: 0.953\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 551, 9\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.824\n",
      "KNN cohens kappa score: 0.816\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 39988 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 532, 28\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.600\n",
      "LR cohens kappa score: 0.579\n",
      "LR average precision score: 0.936\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 557, 3\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.933\n",
      "GB cohens kappa score: 0.931\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 550, 10\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.808\n",
      "KNN cohens kappa score: 0.799\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 39540 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 532, 28\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.600\n",
      "LR cohens kappa score: 0.579\n",
      "LR average precision score: 0.762\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 557, 3\n",
      "GB fn, tp: 1, 20\n",
      "GB f1 score: 0.909\n",
      "GB cohens kappa score: 0.906\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 554, 6\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.875\n",
      "KNN cohens kappa score: 0.870\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 39832 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 537, 23\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.646\n",
      "LR cohens kappa score: 0.628\n",
      "LR average precision score: 0.889\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 559, 1\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.977\n",
      "GB cohens kappa score: 0.976\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 554, 6\n",
      "KNN fn, tp: 1, 20\n",
      "KNN f1 score: 0.851\n",
      "KNN cohens kappa score: 0.845\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2156 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 40016 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 544, 12\n",
      "LR fn, tp: 1, 20\n",
      "LR f1 score: 0.755\n",
      "LR cohens kappa score: 0.743\n",
      "LR average precision score: 0.906\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 555, 1\n",
      "GB fn, tp: 2, 19\n",
      "GB f1 score: 0.927\n",
      "GB cohens kappa score: 0.924\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 548, 8\n",
      "KNN fn, tp: 1, 20\n",
      "KNN f1 score: 0.816\n",
      "KNN cohens kappa score: 0.808\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 41112 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 539, 21\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.667\n",
      "LR cohens kappa score: 0.650\n",
      "LR average precision score: 0.948\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 555, 5\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.894\n",
      "GB cohens kappa score: 0.889\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 555, 5\n",
      "KNN fn, tp: 1, 20\n",
      "KNN f1 score: 0.870\n",
      "KNN cohens kappa score: 0.864\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 40608 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 542, 18\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.700\n",
      "LR cohens kappa score: 0.685\n",
      "LR average precision score: 0.901\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 558, 2\n",
      "GB fn, tp: 1, 20\n",
      "GB f1 score: 0.930\n",
      "GB cohens kappa score: 0.928\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 555, 5\n",
      "KNN fn, tp: 1, 20\n",
      "KNN f1 score: 0.870\n",
      "KNN cohens kappa score: 0.864\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 36252 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 536, 24\n",
      "LR fn, tp: 0, 21\n",
      "LR f1 score: 0.636\n",
      "LR cohens kappa score: 0.618\n",
      "LR average precision score: 0.833\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 559, 1\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.977\n",
      "GB cohens kappa score: 0.976\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 553, 7\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.857\n",
      "KNN cohens kappa score: 0.851\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2152 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 40388 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 536, 24\n",
      "LR fn, tp: 1, 20\n",
      "LR f1 score: 0.615\n",
      "LR cohens kappa score: 0.596\n",
      "LR average precision score: 0.851\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 559, 1\n",
      "GB fn, tp: 1, 20\n",
      "GB f1 score: 0.952\n",
      "GB cohens kappa score: 0.951\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 553, 7\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.857\n",
      "KNN cohens kappa score: 0.851\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2156 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 39692 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 532, 24\n",
      "LR fn, tp: 1, 20\n",
      "LR f1 score: 0.615\n",
      "LR cohens kappa score: 0.595\n",
      "LR average precision score: 0.872\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 554, 2\n",
      "GB fn, tp: 0, 21\n",
      "GB f1 score: 0.955\n",
      "GB cohens kappa score: 0.953\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 549, 7\n",
      "KNN fn, tp: 0, 21\n",
      "KNN f1 score: 0.857\n",
      "KNN cohens kappa score: 0.851\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 546, 32\n",
      "LR fn, tp: 2, 21\n",
      "LR f1 score: 0.755\n",
      "LR cohens kappa score: 0.743\n",
      "LR average precision score: 0.968\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 537.2, 22.0\n",
      "LR fn, tp: 0.48, 20.52\n",
      "LR f1 score: 0.650\n",
      "LR cohens kappa score: 0.632\n",
      "LR average precision score: 0.884\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 524, 12\n",
      "LR fn, tp: 0, 19\n",
      "LR f1 score: 0.568\n",
      "LR cohens kappa score: 0.544\n",
      "LR average precision score: 0.762\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 560, 7\n",
      "GB fn, tp: 2, 21\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 557.12, 2.08\n",
      "GB fn, tp: 0.4, 20.6\n",
      "GB f1 score: 0.944\n",
      "GB cohens kappa score: 0.942\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 551, 0\n",
      "GB fn, tp: 0, 19\n",
      "GB f1 score: 0.857\n",
      "GB cohens kappa score: 0.851\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 557, 11\n",
      "KNN fn, tp: 2, 21\n",
      "KNN f1 score: 0.930\n",
      "KNN cohens kappa score: 0.928\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 552.12, 7.08\n",
      "KNN fn, tp: 0.36, 20.64\n",
      "KNN f1 score: 0.849\n",
      "KNN cohens kappa score: 0.843\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 547, 2\n",
      "KNN fn, tp: 0, 19\n",
      "KNN f1 score: 0.745\n",
      "KNN cohens kappa score: 0.734\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_kr-vs-k-zero-one_vs_draw\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "complimentary-observer",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_shuttle-2_vs_5\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13756 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 653, 1\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 0.952\n",
      "LR cohens kappa score: 0.952\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 653, 1\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 0.952\n",
      "KNN cohens kappa score: 0.952\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12168 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 653, 1\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 0.952\n",
      "KNN cohens kappa score: 0.952\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13372 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 654, 0\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12988 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 652, 2\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 0.909\n",
      "KNN cohens kappa score: 0.908\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2576 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13148 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 651, 0\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 651, 0\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 650, 1\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.947\n",
      "KNN cohens kappa score: 0.947\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 11616 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 653, 1\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 0.952\n",
      "KNN cohens kappa score: 0.952\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13048 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 654, 0\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12308 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 652, 2\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 0.909\n",
      "KNN cohens kappa score: 0.908\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12124 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 654, 0\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2576 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12536 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 651, 0\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 651, 0\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 649, 2\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.900\n",
      "KNN cohens kappa score: 0.898\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 11640 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 653, 1\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 0.952\n",
      "KNN cohens kappa score: 0.952\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13708 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 653, 1\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 0.952\n",
      "KNN cohens kappa score: 0.952\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12268 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 654, 0\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12160 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 653, 1\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 0.952\n",
      "KNN cohens kappa score: 0.952\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2576 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13504 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 651, 0\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 651, 0\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 649, 2\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.900\n",
      "KNN cohens kappa score: 0.898\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 11816 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 654, 0\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12144 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 651, 3\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 0.870\n",
      "KNN cohens kappa score: 0.867\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13144 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 654, 0\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 11464 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 653, 1\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 0.952\n",
      "KNN cohens kappa score: 0.952\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2576 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 11584 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 651, 0\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 651, 0\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 650, 1\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.947\n",
      "KNN cohens kappa score: 0.947\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12308 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 653, 1\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 0.952\n",
      "KNN cohens kappa score: 0.952\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 11844 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 654, 0\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 11756 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 650, 4\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 0.833\n",
      "KNN cohens kappa score: 0.830\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2574 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 11900 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 654, 0\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 654, 0\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 2576 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 11184 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 651, 0\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 651, 0\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 650, 1\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.947\n",
      "KNN cohens kappa score: 0.947\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 654, 1\n",
      "LR fn, tp: 0, 10\n",
      "LR f1 score: 1.000\n",
      "LR cohens kappa score: 1.000\n",
      "LR average precision score: 1.000\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 653.36, 0.04\n",
      "LR fn, tp: 0.0, 9.8\n",
      "LR f1 score: 0.998\n",
      "LR cohens kappa score: 0.998\n",
      "LR average precision score: 1.000\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 651, 0\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.952\n",
      "LR cohens kappa score: 0.952\n",
      "LR average precision score: 1.000\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 654, 0\n",
      "GB fn, tp: 0, 10\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 653.4, 0.0\n",
      "GB fn, tp: 0.0, 9.8\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 651, 0\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 1.000\n",
      "GB cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 654, 4\n",
      "KNN fn, tp: 0, 10\n",
      "KNN f1 score: 1.000\n",
      "KNN cohens kappa score: 1.000\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 652.36, 1.04\n",
      "KNN fn, tp: 0.0, 9.8\n",
      "KNN f1 score: 0.951\n",
      "KNN cohens kappa score: 0.951\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 649, 0\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.833\n",
      "KNN cohens kappa score: 0.830\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_shuttle-2_vs_5\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "included-pound",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_winequality-red-4\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28068 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 186, 124\n",
      "LR fn, tp: 1, 10\n",
      "LR f1 score: 0.138\n",
      "LR cohens kappa score: 0.080\n",
      "LR average precision score: 0.093\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 304, 6\n",
      "GB fn, tp: 10, 1\n",
      "GB f1 score: 0.111\n",
      "GB cohens kappa score: 0.087\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 261, 49\n",
      "KNN fn, tp: 10, 1\n",
      "KNN f1 score: 0.033\n",
      "KNN cohens kappa score: -0.025\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28664 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 201, 109\n",
      "LR fn, tp: 3, 8\n",
      "LR f1 score: 0.125\n",
      "LR cohens kappa score: 0.067\n",
      "LR average precision score: 0.111\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 297, 13\n",
      "GB fn, tp: 9, 2\n",
      "GB f1 score: 0.154\n",
      "GB cohens kappa score: 0.119\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 266, 44\n",
      "KNN fn, tp: 7, 4\n",
      "KNN f1 score: 0.136\n",
      "KNN cohens kappa score: 0.085\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28536 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 167, 143\n",
      "LR fn, tp: 1, 10\n",
      "LR f1 score: 0.122\n",
      "LR cohens kappa score: 0.062\n",
      "LR average precision score: 0.146\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 298, 12\n",
      "GB fn, tp: 7, 4\n",
      "GB f1 score: 0.296\n",
      "GB cohens kappa score: 0.267\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 264, 46\n",
      "KNN fn, tp: 8, 3\n",
      "KNN f1 score: 0.100\n",
      "KNN cohens kappa score: 0.047\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28312 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 213, 97\n",
      "LR fn, tp: 6, 5\n",
      "LR f1 score: 0.088\n",
      "LR cohens kappa score: 0.028\n",
      "LR average precision score: 0.117\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 293, 17\n",
      "GB fn, tp: 11, 0\n",
      "GB f1 score: 0.000\n",
      "GB cohens kappa score: -0.043\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 265, 45\n",
      "KNN fn, tp: 8, 3\n",
      "KNN f1 score: 0.102\n",
      "KNN cohens kappa score: 0.049\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1196 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28788 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 209, 97\n",
      "LR fn, tp: 4, 5\n",
      "LR f1 score: 0.090\n",
      "LR cohens kappa score: 0.040\n",
      "LR average precision score: 0.225\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 296, 10\n",
      "GB fn, tp: 8, 1\n",
      "GB f1 score: 0.100\n",
      "GB cohens kappa score: 0.071\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 267, 39\n",
      "KNN fn, tp: 8, 1\n",
      "KNN f1 score: 0.041\n",
      "KNN cohens kappa score: -0.006\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29076 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 186, 124\n",
      "LR fn, tp: 2, 9\n",
      "LR f1 score: 0.125\n",
      "LR cohens kappa score: 0.066\n",
      "LR average precision score: 0.129\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 291, 19\n",
      "GB fn, tp: 8, 3\n",
      "GB f1 score: 0.182\n",
      "GB cohens kappa score: 0.143\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 268, 42\n",
      "KNN fn, tp: 10, 1\n",
      "KNN f1 score: 0.037\n",
      "KNN cohens kappa score: -0.019\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28940 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 191, 119\n",
      "LR fn, tp: 3, 8\n",
      "LR f1 score: 0.116\n",
      "LR cohens kappa score: 0.056\n",
      "LR average precision score: 0.143\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 305, 5\n",
      "GB fn, tp: 10, 1\n",
      "GB f1 score: 0.118\n",
      "GB cohens kappa score: 0.096\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 270, 40\n",
      "KNN fn, tp: 10, 1\n",
      "KNN f1 score: 0.038\n",
      "KNN cohens kappa score: -0.016\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28648 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 191, 119\n",
      "LR fn, tp: 3, 8\n",
      "LR f1 score: 0.116\n",
      "LR cohens kappa score: 0.056\n",
      "LR average precision score: 0.164\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 299, 11\n",
      "GB fn, tp: 10, 1\n",
      "GB f1 score: 0.087\n",
      "GB cohens kappa score: 0.053\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 263, 47\n",
      "KNN fn, tp: 10, 1\n",
      "KNN f1 score: 0.034\n",
      "KNN cohens kappa score: -0.023\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28172 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 210, 100\n",
      "LR fn, tp: 5, 6\n",
      "LR f1 score: 0.103\n",
      "LR cohens kappa score: 0.043\n",
      "LR average precision score: 0.277\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 298, 12\n",
      "GB fn, tp: 9, 2\n",
      "GB f1 score: 0.160\n",
      "GB cohens kappa score: 0.126\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 271, 39\n",
      "KNN fn, tp: 7, 4\n",
      "KNN f1 score: 0.148\n",
      "KNN cohens kappa score: 0.099\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1196 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28964 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 206, 100\n",
      "LR fn, tp: 3, 6\n",
      "LR f1 score: 0.104\n",
      "LR cohens kappa score: 0.055\n",
      "LR average precision score: 0.091\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 295, 11\n",
      "GB fn, tp: 7, 2\n",
      "GB f1 score: 0.182\n",
      "GB cohens kappa score: 0.153\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 262, 44\n",
      "KNN fn, tp: 7, 2\n",
      "KNN f1 score: 0.073\n",
      "KNN cohens kappa score: 0.026\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29412 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 216, 94\n",
      "LR fn, tp: 5, 6\n",
      "LR f1 score: 0.108\n",
      "LR cohens kappa score: 0.049\n",
      "LR average precision score: 0.118\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 301, 9\n",
      "GB fn, tp: 11, 0\n",
      "GB f1 score: 0.000\n",
      "GB cohens kappa score: -0.032\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 275, 35\n",
      "KNN fn, tp: 9, 2\n",
      "KNN f1 score: 0.083\n",
      "KNN cohens kappa score: 0.032\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28340 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 193, 117\n",
      "LR fn, tp: 2, 9\n",
      "LR f1 score: 0.131\n",
      "LR cohens kappa score: 0.073\n",
      "LR average precision score: 0.224\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 296, 14\n",
      "GB fn, tp: 10, 1\n",
      "GB f1 score: 0.077\n",
      "GB cohens kappa score: 0.039\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 267, 43\n",
      "KNN fn, tp: 10, 1\n",
      "KNN f1 score: 0.036\n",
      "KNN cohens kappa score: -0.020\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28112 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 202, 108\n",
      "LR fn, tp: 6, 5\n",
      "LR f1 score: 0.081\n",
      "LR cohens kappa score: 0.019\n",
      "LR average precision score: 0.077\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 295, 15\n",
      "GB fn, tp: 10, 1\n",
      "GB f1 score: 0.074\n",
      "GB cohens kappa score: 0.035\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 263, 47\n",
      "KNN fn, tp: 8, 3\n",
      "KNN f1 score: 0.098\n",
      "KNN cohens kappa score: 0.045\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28748 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 193, 117\n",
      "LR fn, tp: 2, 9\n",
      "LR f1 score: 0.131\n",
      "LR cohens kappa score: 0.073\n",
      "LR average precision score: 0.151\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 304, 6\n",
      "GB fn, tp: 9, 2\n",
      "GB f1 score: 0.211\n",
      "GB cohens kappa score: 0.187\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 273, 37\n",
      "KNN fn, tp: 9, 2\n",
      "KNN f1 score: 0.080\n",
      "KNN cohens kappa score: 0.028\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1196 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29004 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 197, 109\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.112\n",
      "LR cohens kappa score: 0.062\n",
      "LR average precision score: 0.109\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 297, 9\n",
      "GB fn, tp: 8, 1\n",
      "GB f1 score: 0.105\n",
      "GB cohens kappa score: 0.078\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 258, 48\n",
      "KNN fn, tp: 7, 2\n",
      "KNN f1 score: 0.068\n",
      "KNN cohens kappa score: 0.020\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29148 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 197, 113\n",
      "LR fn, tp: 2, 9\n",
      "LR f1 score: 0.135\n",
      "LR cohens kappa score: 0.077\n",
      "LR average precision score: 0.312\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 299, 11\n",
      "GB fn, tp: 11, 0\n",
      "GB f1 score: 0.000\n",
      "GB cohens kappa score: -0.035\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 272, 38\n",
      "KNN fn, tp: 11, 0\n",
      "KNN f1 score: 0.000\n",
      "KNN cohens kappa score: -0.056\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29128 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 183, 127\n",
      "LR fn, tp: 3, 8\n",
      "LR f1 score: 0.110\n",
      "LR cohens kappa score: 0.049\n",
      "LR average precision score: 0.203\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 299, 11\n",
      "GB fn, tp: 9, 2\n",
      "GB f1 score: 0.167\n",
      "GB cohens kappa score: 0.135\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 271, 39\n",
      "KNN fn, tp: 8, 3\n",
      "KNN f1 score: 0.113\n",
      "KNN cohens kappa score: 0.062\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28348 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 212, 98\n",
      "LR fn, tp: 4, 7\n",
      "LR f1 score: 0.121\n",
      "LR cohens kappa score: 0.063\n",
      "LR average precision score: 0.081\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 298, 12\n",
      "GB fn, tp: 9, 2\n",
      "GB f1 score: 0.160\n",
      "GB cohens kappa score: 0.126\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 276, 34\n",
      "KNN fn, tp: 11, 0\n",
      "KNN f1 score: 0.000\n",
      "KNN cohens kappa score: -0.055\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28000 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 200, 110\n",
      "LR fn, tp: 1, 10\n",
      "LR f1 score: 0.153\n",
      "LR cohens kappa score: 0.096\n",
      "LR average precision score: 0.120\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 298, 12\n",
      "GB fn, tp: 9, 2\n",
      "GB f1 score: 0.160\n",
      "GB cohens kappa score: 0.126\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 266, 44\n",
      "KNN fn, tp: 9, 2\n",
      "KNN f1 score: 0.070\n",
      "KNN cohens kappa score: 0.016\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1196 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28272 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 182, 124\n",
      "LR fn, tp: 5, 4\n",
      "LR f1 score: 0.058\n",
      "LR cohens kappa score: 0.005\n",
      "LR average precision score: 0.056\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 278, 28\n",
      "GB fn, tp: 9, 0\n",
      "GB f1 score: 0.000\n",
      "GB cohens kappa score: -0.045\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 248, 58\n",
      "KNN fn, tp: 8, 1\n",
      "KNN f1 score: 0.029\n",
      "KNN cohens kappa score: -0.021\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28300 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 194, 116\n",
      "LR fn, tp: 5, 6\n",
      "LR f1 score: 0.090\n",
      "LR cohens kappa score: 0.029\n",
      "LR average precision score: 0.071\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 303, 7\n",
      "GB fn, tp: 10, 1\n",
      "GB f1 score: 0.105\n",
      "GB cohens kappa score: 0.079\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 270, 40\n",
      "KNN fn, tp: 9, 2\n",
      "KNN f1 score: 0.075\n",
      "KNN cohens kappa score: 0.022\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28340 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 201, 109\n",
      "LR fn, tp: 5, 6\n",
      "LR f1 score: 0.095\n",
      "LR cohens kappa score: 0.035\n",
      "LR average precision score: 0.086\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 290, 20\n",
      "GB fn, tp: 9, 2\n",
      "GB f1 score: 0.121\n",
      "GB cohens kappa score: 0.079\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 256, 54\n",
      "KNN fn, tp: 8, 3\n",
      "KNN f1 score: 0.088\n",
      "KNN cohens kappa score: 0.033\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28772 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 170, 140\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 0.136\n",
      "LR cohens kappa score: 0.077\n",
      "LR average precision score: 0.233\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 293, 17\n",
      "GB fn, tp: 7, 4\n",
      "GB f1 score: 0.250\n",
      "GB cohens kappa score: 0.215\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 272, 38\n",
      "KNN fn, tp: 8, 3\n",
      "KNN f1 score: 0.115\n",
      "KNN cohens kappa score: 0.065\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1194 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28380 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 194, 116\n",
      "LR fn, tp: 3, 8\n",
      "LR f1 score: 0.119\n",
      "LR cohens kappa score: 0.059\n",
      "LR average precision score: 0.174\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 297, 13\n",
      "GB fn, tp: 8, 3\n",
      "GB f1 score: 0.222\n",
      "GB cohens kappa score: 0.189\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 269, 41\n",
      "KNN fn, tp: 9, 2\n",
      "KNN f1 score: 0.074\n",
      "KNN cohens kappa score: 0.021\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1196 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28528 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 221, 85\n",
      "LR fn, tp: 3, 6\n",
      "LR f1 score: 0.120\n",
      "LR cohens kappa score: 0.072\n",
      "LR average precision score: 0.126\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 291, 15\n",
      "GB fn, tp: 9, 0\n",
      "GB f1 score: 0.000\n",
      "GB cohens kappa score: -0.037\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 267, 39\n",
      "KNN fn, tp: 8, 1\n",
      "KNN f1 score: 0.041\n",
      "KNN cohens kappa score: -0.006\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 221, 143\n",
      "LR fn, tp: 6, 11\n",
      "LR f1 score: 0.153\n",
      "LR cohens kappa score: 0.096\n",
      "LR average precision score: 0.312\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 196.6, 112.6\n",
      "LR fn, tp: 3.16, 7.44\n",
      "LR f1 score: 0.113\n",
      "LR cohens kappa score: 0.056\n",
      "LR average precision score: 0.145\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 167, 85\n",
      "LR fn, tp: 0, 4\n",
      "LR f1 score: 0.058\n",
      "LR cohens kappa score: 0.005\n",
      "LR average precision score: 0.056\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 305, 28\n",
      "GB fn, tp: 11, 4\n",
      "GB f1 score: 0.296\n",
      "GB cohens kappa score: 0.267\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 296.6, 12.6\n",
      "GB fn, tp: 9.08, 1.52\n",
      "GB f1 score: 0.122\n",
      "GB cohens kappa score: 0.088\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 278, 5\n",
      "GB fn, tp: 7, 0\n",
      "GB f1 score: 0.000\n",
      "GB cohens kappa score: -0.045\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 276, 58\n",
      "KNN fn, tp: 11, 4\n",
      "KNN f1 score: 0.148\n",
      "KNN cohens kappa score: 0.099\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 266.4, 42.8\n",
      "KNN fn, tp: 8.68, 1.92\n",
      "KNN f1 score: 0.069\n",
      "KNN cohens kappa score: 0.016\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 248, 34\n",
      "KNN fn, tp: 7, 0\n",
      "KNN f1 score: 0.000\n",
      "KNN cohens kappa score: -0.056\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_winequality-red-4\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "primary-rendering",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_yeast4\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17816 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 234, 53\n",
      "LR fn, tp: 2, 9\n",
      "LR f1 score: 0.247\n",
      "LR cohens kappa score: 0.196\n",
      "LR average precision score: 0.371\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 276, 11\n",
      "GB fn, tp: 5, 6\n",
      "GB f1 score: 0.429\n",
      "GB cohens kappa score: 0.402\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 264, 23\n",
      "KNN fn, tp: 3, 8\n",
      "KNN f1 score: 0.381\n",
      "KNN cohens kappa score: 0.345\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13692 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 232, 55\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 0.286\n",
      "LR cohens kappa score: 0.237\n",
      "LR average precision score: 0.529\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 271, 16\n",
      "GB fn, tp: 3, 8\n",
      "GB f1 score: 0.457\n",
      "GB cohens kappa score: 0.428\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 260, 27\n",
      "KNN fn, tp: 2, 9\n",
      "KNN f1 score: 0.383\n",
      "KNN cohens kappa score: 0.346\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17388 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 229, 58\n",
      "LR fn, tp: 1, 10\n",
      "LR f1 score: 0.253\n",
      "LR cohens kappa score: 0.202\n",
      "LR average precision score: 0.235\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 275, 12\n",
      "GB fn, tp: 5, 6\n",
      "GB f1 score: 0.414\n",
      "GB cohens kappa score: 0.386\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 265, 22\n",
      "KNN fn, tp: 4, 7\n",
      "KNN f1 score: 0.350\n",
      "KNN cohens kappa score: 0.313\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16040 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 240, 47\n",
      "LR fn, tp: 6, 5\n",
      "LR f1 score: 0.159\n",
      "LR cohens kappa score: 0.104\n",
      "LR average precision score: 0.164\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 276, 11\n",
      "GB fn, tp: 7, 4\n",
      "GB f1 score: 0.308\n",
      "GB cohens kappa score: 0.277\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 263, 24\n",
      "KNN fn, tp: 4, 7\n",
      "KNN f1 score: 0.333\n",
      "KNN cohens kappa score: 0.295\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1104 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17816 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 228, 57\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.197\n",
      "LR cohens kappa score: 0.161\n",
      "LR average precision score: 0.429\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 269, 16\n",
      "GB fn, tp: 1, 6\n",
      "GB f1 score: 0.414\n",
      "GB cohens kappa score: 0.392\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 261, 24\n",
      "KNN fn, tp: 2, 5\n",
      "KNN f1 score: 0.278\n",
      "KNN cohens kappa score: 0.249\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13504 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 242, 45\n",
      "LR fn, tp: 1, 10\n",
      "LR f1 score: 0.303\n",
      "LR cohens kappa score: 0.257\n",
      "LR average precision score: 0.263\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 280, 7\n",
      "GB fn, tp: 7, 4\n",
      "GB f1 score: 0.364\n",
      "GB cohens kappa score: 0.339\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 263, 24\n",
      "KNN fn, tp: 3, 8\n",
      "KNN f1 score: 0.372\n",
      "KNN cohens kappa score: 0.336\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17076 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 224, 63\n",
      "LR fn, tp: 1, 10\n",
      "LR f1 score: 0.238\n",
      "LR cohens kappa score: 0.186\n",
      "LR average precision score: 0.418\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 267, 20\n",
      "GB fn, tp: 4, 7\n",
      "GB f1 score: 0.368\n",
      "GB cohens kappa score: 0.333\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 247, 40\n",
      "KNN fn, tp: 3, 8\n",
      "KNN f1 score: 0.271\n",
      "KNN cohens kappa score: 0.225\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17236 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 229, 58\n",
      "LR fn, tp: 3, 8\n",
      "LR f1 score: 0.208\n",
      "LR cohens kappa score: 0.154\n",
      "LR average precision score: 0.314\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 277, 10\n",
      "GB fn, tp: 7, 4\n",
      "GB f1 score: 0.320\n",
      "GB cohens kappa score: 0.291\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 260, 27\n",
      "KNN fn, tp: 3, 8\n",
      "KNN f1 score: 0.348\n",
      "KNN cohens kappa score: 0.309\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17976 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 239, 48\n",
      "LR fn, tp: 2, 9\n",
      "LR f1 score: 0.265\n",
      "LR cohens kappa score: 0.216\n",
      "LR average precision score: 0.248\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 271, 16\n",
      "GB fn, tp: 3, 8\n",
      "GB f1 score: 0.457\n",
      "GB cohens kappa score: 0.428\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 271, 16\n",
      "KNN fn, tp: 5, 6\n",
      "KNN f1 score: 0.364\n",
      "KNN cohens kappa score: 0.331\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1104 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13784 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 227, 58\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.169\n",
      "LR cohens kappa score: 0.131\n",
      "LR average precision score: 0.415\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 269, 16\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.296\n",
      "GB cohens kappa score: 0.270\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 264, 21\n",
      "KNN fn, tp: 3, 4\n",
      "KNN f1 score: 0.250\n",
      "KNN cohens kappa score: 0.221\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13480 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 234, 53\n",
      "LR fn, tp: 1, 10\n",
      "LR f1 score: 0.270\n",
      "LR cohens kappa score: 0.221\n",
      "LR average precision score: 0.345\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 275, 12\n",
      "GB fn, tp: 4, 7\n",
      "GB f1 score: 0.467\n",
      "GB cohens kappa score: 0.441\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 268, 19\n",
      "KNN fn, tp: 4, 7\n",
      "KNN f1 score: 0.378\n",
      "KNN cohens kappa score: 0.344\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17936 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 231, 56\n",
      "LR fn, tp: 1, 10\n",
      "LR f1 score: 0.260\n",
      "LR cohens kappa score: 0.210\n",
      "LR average precision score: 0.395\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 278, 9\n",
      "GB fn, tp: 6, 5\n",
      "GB f1 score: 0.400\n",
      "GB cohens kappa score: 0.374\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 263, 24\n",
      "KNN fn, tp: 2, 9\n",
      "KNN f1 score: 0.409\n",
      "KNN cohens kappa score: 0.374\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17624 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 239, 48\n",
      "LR fn, tp: 3, 8\n",
      "LR f1 score: 0.239\n",
      "LR cohens kappa score: 0.189\n",
      "LR average precision score: 0.219\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 269, 18\n",
      "GB fn, tp: 6, 5\n",
      "GB f1 score: 0.294\n",
      "GB cohens kappa score: 0.257\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 260, 27\n",
      "KNN fn, tp: 4, 7\n",
      "KNN f1 score: 0.311\n",
      "KNN cohens kappa score: 0.270\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17852 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 219, 68\n",
      "LR fn, tp: 0, 11\n",
      "LR f1 score: 0.244\n",
      "LR cohens kappa score: 0.192\n",
      "LR average precision score: 0.423\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 275, 12\n",
      "GB fn, tp: 3, 8\n",
      "GB f1 score: 0.516\n",
      "GB cohens kappa score: 0.492\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 263, 24\n",
      "KNN fn, tp: 5, 6\n",
      "KNN f1 score: 0.293\n",
      "KNN cohens kappa score: 0.252\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1104 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17688 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 235, 50\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.190\n",
      "LR cohens kappa score: 0.154\n",
      "LR average precision score: 0.384\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 269, 16\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.296\n",
      "GB cohens kappa score: 0.270\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 259, 26\n",
      "KNN fn, tp: 2, 5\n",
      "KNN f1 score: 0.263\n",
      "KNN cohens kappa score: 0.233\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13932 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 246, 41\n",
      "LR fn, tp: 4, 7\n",
      "LR f1 score: 0.237\n",
      "LR cohens kappa score: 0.189\n",
      "LR average precision score: 0.462\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 281, 6\n",
      "GB fn, tp: 7, 4\n",
      "GB f1 score: 0.381\n",
      "GB cohens kappa score: 0.358\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 272, 15\n",
      "KNN fn, tp: 8, 3\n",
      "KNN f1 score: 0.207\n",
      "KNN cohens kappa score: 0.169\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 15696 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 235, 52\n",
      "LR fn, tp: 1, 10\n",
      "LR f1 score: 0.274\n",
      "LR cohens kappa score: 0.225\n",
      "LR average precision score: 0.308\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 269, 18\n",
      "GB fn, tp: 4, 7\n",
      "GB f1 score: 0.389\n",
      "GB cohens kappa score: 0.356\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 263, 24\n",
      "KNN fn, tp: 3, 8\n",
      "KNN f1 score: 0.372\n",
      "KNN cohens kappa score: 0.336\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12640 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 231, 56\n",
      "LR fn, tp: 1, 10\n",
      "LR f1 score: 0.260\n",
      "LR cohens kappa score: 0.210\n",
      "LR average precision score: 0.219\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 276, 11\n",
      "GB fn, tp: 5, 6\n",
      "GB f1 score: 0.429\n",
      "GB cohens kappa score: 0.402\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 260, 27\n",
      "KNN fn, tp: 2, 9\n",
      "KNN f1 score: 0.383\n",
      "KNN cohens kappa score: 0.346\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17384 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 226, 61\n",
      "LR fn, tp: 3, 8\n",
      "LR f1 score: 0.200\n",
      "LR cohens kappa score: 0.146\n",
      "LR average precision score: 0.274\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 273, 14\n",
      "GB fn, tp: 5, 6\n",
      "GB f1 score: 0.387\n",
      "GB cohens kappa score: 0.356\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 261, 26\n",
      "KNN fn, tp: 4, 7\n",
      "KNN f1 score: 0.318\n",
      "KNN cohens kappa score: 0.278\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1104 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 18308 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 235, 50\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.219\n",
      "LR cohens kappa score: 0.184\n",
      "LR average precision score: 0.422\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 272, 13\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.333\n",
      "GB cohens kappa score: 0.310\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 259, 26\n",
      "KNN fn, tp: 2, 5\n",
      "KNN f1 score: 0.263\n",
      "KNN cohens kappa score: 0.233\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17972 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 242, 45\n",
      "LR fn, tp: 3, 8\n",
      "LR f1 score: 0.250\n",
      "LR cohens kappa score: 0.201\n",
      "LR average precision score: 0.204\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 276, 11\n",
      "GB fn, tp: 7, 4\n",
      "GB f1 score: 0.308\n",
      "GB cohens kappa score: 0.277\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 267, 20\n",
      "KNN fn, tp: 3, 8\n",
      "KNN f1 score: 0.410\n",
      "KNN cohens kappa score: 0.377\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13504 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 225, 62\n",
      "LR fn, tp: 1, 10\n",
      "LR f1 score: 0.241\n",
      "LR cohens kappa score: 0.189\n",
      "LR average precision score: 0.438\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 268, 19\n",
      "GB fn, tp: 4, 7\n",
      "GB f1 score: 0.378\n",
      "GB cohens kappa score: 0.344\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 259, 28\n",
      "KNN fn, tp: 1, 10\n",
      "KNN f1 score: 0.408\n",
      "KNN cohens kappa score: 0.372\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 14064 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 238, 49\n",
      "LR fn, tp: 3, 8\n",
      "LR f1 score: 0.235\n",
      "LR cohens kappa score: 0.185\n",
      "LR average precision score: 0.431\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 273, 14\n",
      "GB fn, tp: 5, 6\n",
      "GB f1 score: 0.387\n",
      "GB cohens kappa score: 0.356\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 263, 24\n",
      "KNN fn, tp: 5, 6\n",
      "KNN f1 score: 0.293\n",
      "KNN cohens kappa score: 0.252\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1106 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 15632 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 234, 53\n",
      "LR fn, tp: 1, 10\n",
      "LR f1 score: 0.270\n",
      "LR cohens kappa score: 0.221\n",
      "LR average precision score: 0.499\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 271, 16\n",
      "GB fn, tp: 4, 7\n",
      "GB f1 score: 0.412\n",
      "GB cohens kappa score: 0.381\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 259, 28\n",
      "KNN fn, tp: 6, 5\n",
      "KNN f1 score: 0.227\n",
      "KNN cohens kappa score: 0.182\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1104 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17392 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 231, 54\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.179\n",
      "LR cohens kappa score: 0.142\n",
      "LR average precision score: 0.130\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 270, 15\n",
      "GB fn, tp: 4, 3\n",
      "GB f1 score: 0.240\n",
      "GB cohens kappa score: 0.213\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 269, 16\n",
      "KNN fn, tp: 2, 5\n",
      "KNN f1 score: 0.357\n",
      "KNN cohens kappa score: 0.333\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 246, 68\n",
      "LR fn, tp: 6, 11\n",
      "LR f1 score: 0.303\n",
      "LR cohens kappa score: 0.257\n",
      "LR average precision score: 0.529\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 233.0, 53.6\n",
      "LR fn, tp: 1.64, 8.56\n",
      "LR f1 score: 0.236\n",
      "LR cohens kappa score: 0.188\n",
      "LR average precision score: 0.342\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 219, 41\n",
      "LR fn, tp: 0, 5\n",
      "LR f1 score: 0.159\n",
      "LR cohens kappa score: 0.104\n",
      "LR average precision score: 0.130\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 281, 20\n",
      "GB fn, tp: 7, 8\n",
      "GB f1 score: 0.516\n",
      "GB cohens kappa score: 0.492\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 273.04, 13.56\n",
      "GB fn, tp: 4.6, 5.6\n",
      "GB f1 score: 0.378\n",
      "GB cohens kappa score: 0.349\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 267, 6\n",
      "GB fn, tp: 1, 3\n",
      "GB f1 score: 0.240\n",
      "GB cohens kappa score: 0.213\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 272, 40\n",
      "KNN fn, tp: 8, 10\n",
      "KNN f1 score: 0.410\n",
      "KNN cohens kappa score: 0.377\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 262.52, 24.08\n",
      "KNN fn, tp: 3.4, 6.8\n",
      "KNN f1 score: 0.329\n",
      "KNN cohens kappa score: 0.293\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 247, 15\n",
      "KNN fn, tp: 1, 3\n",
      "KNN f1 score: 0.207\n",
      "KNN cohens kappa score: 0.169\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_yeast4\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "painful-liechtenstein",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_yeast5\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 11812 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 274, 14\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.562\n",
      "LR cohens kappa score: 0.543\n",
      "LR average precision score: 0.902\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 285, 3\n",
      "GB fn, tp: 5, 4\n",
      "GB f1 score: 0.500\n",
      "GB cohens kappa score: 0.486\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 282, 6\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.750\n",
      "KNN cohens kappa score: 0.740\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16864 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 273, 15\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.545\n",
      "LR cohens kappa score: 0.524\n",
      "LR average precision score: 0.698\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 285, 3\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 0.857\n",
      "GB cohens kappa score: 0.852\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 274, 14\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.562\n",
      "KNN cohens kappa score: 0.543\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12236 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 277, 11\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.621\n",
      "LR cohens kappa score: 0.604\n",
      "LR average precision score: 0.602\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 284, 4\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.632\n",
      "GB cohens kappa score: 0.619\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 280, 8\n",
      "KNN fn, tp: 1, 8\n",
      "KNN f1 score: 0.640\n",
      "KNN cohens kappa score: 0.625\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 15556 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 280, 8\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.692\n",
      "LR cohens kappa score: 0.680\n",
      "LR average precision score: 0.776\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 288, 0\n",
      "GB fn, tp: 2, 7\n",
      "GB f1 score: 0.875\n",
      "GB cohens kappa score: 0.872\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 286, 2\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.900\n",
      "KNN cohens kappa score: 0.897\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1116 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 15476 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 271, 17\n",
      "LR fn, tp: 0, 8\n",
      "LR f1 score: 0.485\n",
      "LR cohens kappa score: 0.463\n",
      "LR average precision score: 0.688\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 284, 4\n",
      "GB fn, tp: 2, 6\n",
      "GB f1 score: 0.667\n",
      "GB cohens kappa score: 0.656\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 276, 12\n",
      "KNN fn, tp: 0, 8\n",
      "KNN f1 score: 0.571\n",
      "KNN cohens kappa score: 0.554\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16288 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 275, 13\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.581\n",
      "LR cohens kappa score: 0.562\n",
      "LR average precision score: 0.710\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 286, 2\n",
      "GB fn, tp: 1, 8\n",
      "GB f1 score: 0.842\n",
      "GB cohens kappa score: 0.837\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 280, 8\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.692\n",
      "KNN cohens kappa score: 0.680\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12332 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 269, 19\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.486\n",
      "LR cohens kappa score: 0.462\n",
      "LR average precision score: 0.416\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 280, 8\n",
      "GB fn, tp: 4, 5\n",
      "GB f1 score: 0.455\n",
      "GB cohens kappa score: 0.434\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 275, 13\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.581\n",
      "KNN cohens kappa score: 0.562\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16080 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 278, 10\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.643\n",
      "LR cohens kappa score: 0.628\n",
      "LR average precision score: 0.773\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 285, 3\n",
      "GB fn, tp: 1, 8\n",
      "GB f1 score: 0.800\n",
      "GB cohens kappa score: 0.793\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 283, 5\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.783\n",
      "KNN cohens kappa score: 0.774\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16560 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 271, 17\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.514\n",
      "LR cohens kappa score: 0.491\n",
      "LR average precision score: 0.894\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 285, 3\n",
      "GB fn, tp: 1, 8\n",
      "GB f1 score: 0.800\n",
      "GB cohens kappa score: 0.793\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 278, 10\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.643\n",
      "KNN cohens kappa score: 0.628\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1116 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 15400 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 277, 11\n",
      "LR fn, tp: 0, 8\n",
      "LR f1 score: 0.593\n",
      "LR cohens kappa score: 0.576\n",
      "LR average precision score: 0.639\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 286, 2\n",
      "GB fn, tp: 7, 1\n",
      "GB f1 score: 0.182\n",
      "GB cohens kappa score: 0.170\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 282, 6\n",
      "KNN fn, tp: 0, 8\n",
      "KNN f1 score: 0.727\n",
      "KNN cohens kappa score: 0.718\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12564 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 271, 17\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.514\n",
      "LR cohens kappa score: 0.491\n",
      "LR average precision score: 0.671\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 284, 4\n",
      "GB fn, tp: 2, 7\n",
      "GB f1 score: 0.700\n",
      "GB cohens kappa score: 0.690\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 275, 13\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.581\n",
      "KNN cohens kappa score: 0.562\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 15808 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 270, 18\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.500\n",
      "LR cohens kappa score: 0.476\n",
      "LR average precision score: 0.707\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 286, 2\n",
      "GB fn, tp: 2, 7\n",
      "GB f1 score: 0.778\n",
      "GB cohens kappa score: 0.771\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 277, 11\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.621\n",
      "KNN cohens kappa score: 0.604\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16140 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 280, 8\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.692\n",
      "LR cohens kappa score: 0.680\n",
      "LR average precision score: 0.838\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 286, 2\n",
      "GB fn, tp: 2, 7\n",
      "GB f1 score: 0.778\n",
      "GB cohens kappa score: 0.771\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 283, 5\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.783\n",
      "KNN cohens kappa score: 0.774\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16064 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 278, 10\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.643\n",
      "LR cohens kappa score: 0.628\n",
      "LR average precision score: 0.758\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 287, 1\n",
      "GB fn, tp: 4, 5\n",
      "GB f1 score: 0.667\n",
      "GB cohens kappa score: 0.658\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 282, 6\n",
      "KNN fn, tp: 1, 8\n",
      "KNN f1 score: 0.696\n",
      "KNN cohens kappa score: 0.684\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1116 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12148 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 275, 13\n",
      "LR fn, tp: 0, 8\n",
      "LR f1 score: 0.552\n",
      "LR cohens kappa score: 0.533\n",
      "LR average precision score: 0.387\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 283, 5\n",
      "GB fn, tp: 1, 7\n",
      "GB f1 score: 0.700\n",
      "GB cohens kappa score: 0.690\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 277, 11\n",
      "KNN fn, tp: 0, 8\n",
      "KNN f1 score: 0.593\n",
      "KNN cohens kappa score: 0.576\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12332 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 273, 15\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.545\n",
      "LR cohens kappa score: 0.524\n",
      "LR average precision score: 0.744\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 285, 3\n",
      "GB fn, tp: 1, 8\n",
      "GB f1 score: 0.800\n",
      "GB cohens kappa score: 0.793\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 278, 10\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.643\n",
      "KNN cohens kappa score: 0.628\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16108 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 272, 16\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.529\n",
      "LR cohens kappa score: 0.507\n",
      "LR average precision score: 0.598\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 287, 1\n",
      "GB fn, tp: 1, 8\n",
      "GB f1 score: 0.889\n",
      "GB cohens kappa score: 0.885\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 281, 7\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.720\n",
      "KNN cohens kappa score: 0.709\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12364 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 277, 11\n",
      "LR fn, tp: 1, 8\n",
      "LR f1 score: 0.571\n",
      "LR cohens kappa score: 0.553\n",
      "LR average precision score: 0.688\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 283, 5\n",
      "GB fn, tp: 4, 5\n",
      "GB f1 score: 0.526\n",
      "GB cohens kappa score: 0.511\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 279, 9\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.667\n",
      "KNN cohens kappa score: 0.653\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16172 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 279, 9\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.667\n",
      "LR cohens kappa score: 0.653\n",
      "LR average precision score: 0.681\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 287, 1\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.750\n",
      "GB cohens kappa score: 0.743\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 280, 8\n",
      "KNN fn, tp: 1, 8\n",
      "KNN f1 score: 0.640\n",
      "KNN cohens kappa score: 0.625\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1116 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 15376 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 273, 15\n",
      "LR fn, tp: 0, 8\n",
      "LR f1 score: 0.516\n",
      "LR cohens kappa score: 0.496\n",
      "LR average precision score: 0.640\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 285, 3\n",
      "GB fn, tp: 1, 7\n",
      "GB f1 score: 0.778\n",
      "GB cohens kappa score: 0.771\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 275, 13\n",
      "KNN fn, tp: 0, 8\n",
      "KNN f1 score: 0.552\n",
      "KNN cohens kappa score: 0.533\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 15808 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 271, 17\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.514\n",
      "LR cohens kappa score: 0.491\n",
      "LR average precision score: 0.720\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 284, 4\n",
      "GB fn, tp: 0, 9\n",
      "GB f1 score: 0.818\n",
      "GB cohens kappa score: 0.811\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 276, 12\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.600\n",
      "KNN cohens kappa score: 0.582\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16308 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 279, 9\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.667\n",
      "LR cohens kappa score: 0.653\n",
      "LR average precision score: 0.799\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 288, 0\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.800\n",
      "GB cohens kappa score: 0.795\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 283, 5\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.783\n",
      "KNN cohens kappa score: 0.774\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12104 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 277, 11\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.621\n",
      "LR cohens kappa score: 0.604\n",
      "LR average precision score: 0.775\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 286, 2\n",
      "GB fn, tp: 2, 7\n",
      "GB f1 score: 0.778\n",
      "GB cohens kappa score: 0.771\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 282, 6\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.750\n",
      "KNN cohens kappa score: 0.740\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1117 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 15952 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 276, 12\n",
      "LR fn, tp: 0, 9\n",
      "LR f1 score: 0.600\n",
      "LR cohens kappa score: 0.582\n",
      "LR average precision score: 0.582\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 287, 1\n",
      "GB fn, tp: 3, 6\n",
      "GB f1 score: 0.750\n",
      "GB cohens kappa score: 0.743\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 283, 5\n",
      "KNN fn, tp: 0, 9\n",
      "KNN f1 score: 0.783\n",
      "KNN cohens kappa score: 0.774\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1116 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12816 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 271, 17\n",
      "LR fn, tp: 0, 8\n",
      "LR f1 score: 0.485\n",
      "LR cohens kappa score: 0.463\n",
      "LR average precision score: 0.469\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 281, 7\n",
      "GB fn, tp: 2, 6\n",
      "GB f1 score: 0.571\n",
      "GB cohens kappa score: 0.557\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 275, 13\n",
      "KNN fn, tp: 1, 7\n",
      "KNN f1 score: 0.500\n",
      "KNN cohens kappa score: 0.480\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 280, 19\n",
      "LR fn, tp: 1, 9\n",
      "LR f1 score: 0.692\n",
      "LR cohens kappa score: 0.680\n",
      "LR average precision score: 0.902\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 274.68, 13.32\n",
      "LR fn, tp: 0.04, 8.76\n",
      "LR f1 score: 0.574\n",
      "LR cohens kappa score: 0.555\n",
      "LR average precision score: 0.686\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 269, 8\n",
      "LR fn, tp: 0, 8\n",
      "LR f1 score: 0.485\n",
      "LR cohens kappa score: 0.462\n",
      "LR average precision score: 0.387\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 288, 8\n",
      "GB fn, tp: 7, 9\n",
      "GB f1 score: 0.889\n",
      "GB cohens kappa score: 0.885\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 285.08, 2.92\n",
      "GB fn, tp: 2.28, 6.52\n",
      "GB f1 score: 0.708\n",
      "GB cohens kappa score: 0.699\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 280, 0\n",
      "GB fn, tp: 0, 1\n",
      "GB f1 score: 0.182\n",
      "GB cohens kappa score: 0.170\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 286, 14\n",
      "KNN fn, tp: 1, 9\n",
      "KNN f1 score: 0.900\n",
      "KNN cohens kappa score: 0.897\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 279.28, 8.72\n",
      "KNN fn, tp: 0.16, 8.64\n",
      "KNN f1 score: 0.670\n",
      "KNN cohens kappa score: 0.657\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 274, 2\n",
      "KNN fn, tp: 0, 7\n",
      "KNN f1 score: 0.500\n",
      "KNN cohens kappa score: 0.480\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_yeast5\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "dutch-chocolate",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "///////////////////////////////////////////\n",
      "// Running Repeater on folding_yeast6\n",
      "///////////////////////////////////////////\n",
      "\n",
      "-> Shuffling data\n",
      "### Start exercise for synthetic point generator\n",
      "\n",
      "====== Step 1/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 1/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13440 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 252, 38\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.269\n",
      "LR cohens kappa score: 0.238\n",
      "LR average precision score: 0.706\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 283, 7\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.444\n",
      "GB cohens kappa score: 0.428\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 277, 13\n",
      "KNN fn, tp: 1, 6\n",
      "KNN f1 score: 0.462\n",
      "KNN cohens kappa score: 0.442\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13456 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 255, 35\n",
      "LR fn, tp: 2, 5\n",
      "LR f1 score: 0.213\n",
      "LR cohens kappa score: 0.180\n",
      "LR average precision score: 0.426\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 284, 6\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.471\n",
      "GB cohens kappa score: 0.455\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 270, 20\n",
      "KNN fn, tp: 2, 5\n",
      "KNN f1 score: 0.312\n",
      "KNN cohens kappa score: 0.286\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12544 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 245, 45\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.207\n",
      "LR cohens kappa score: 0.173\n",
      "LR average precision score: 0.272\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 284, 6\n",
      "GB fn, tp: 1, 6\n",
      "GB f1 score: 0.632\n",
      "GB cohens kappa score: 0.620\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 279, 11\n",
      "KNN fn, tp: 1, 6\n",
      "KNN f1 score: 0.500\n",
      "KNN cohens kappa score: 0.483\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17760 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 263, 27\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.300\n",
      "LR cohens kappa score: 0.272\n",
      "LR average precision score: 0.623\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 283, 7\n",
      "GB fn, tp: 4, 3\n",
      "GB f1 score: 0.353\n",
      "GB cohens kappa score: 0.334\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 276, 14\n",
      "KNN fn, tp: 1, 6\n",
      "KNN f1 score: 0.444\n",
      "KNN cohens kappa score: 0.424\n",
      "\n",
      "\n",
      "------ Step 1/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1132 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17008 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 235, 54\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.206\n",
      "LR cohens kappa score: 0.171\n",
      "LR average precision score: 0.491\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 281, 8\n",
      "GB fn, tp: 1, 6\n",
      "GB f1 score: 0.571\n",
      "GB cohens kappa score: 0.557\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 268, 21\n",
      "KNN fn, tp: 0, 7\n",
      "KNN f1 score: 0.400\n",
      "KNN cohens kappa score: 0.376\n",
      "\n",
      "\n",
      "====== Step 2/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 2/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17728 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 244, 46\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.233\n",
      "LR cohens kappa score: 0.200\n",
      "LR average precision score: 0.657\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 284, 6\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.471\n",
      "GB cohens kappa score: 0.455\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 275, 15\n",
      "KNN fn, tp: 1, 6\n",
      "KNN f1 score: 0.429\n",
      "KNN cohens kappa score: 0.408\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17052 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 236, 54\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.206\n",
      "LR cohens kappa score: 0.171\n",
      "LR average precision score: 0.197\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 283, 7\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.444\n",
      "GB cohens kappa score: 0.428\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 274, 16\n",
      "KNN fn, tp: 0, 7\n",
      "KNN f1 score: 0.467\n",
      "KNN cohens kappa score: 0.447\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12420 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 251, 39\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.231\n",
      "LR cohens kappa score: 0.198\n",
      "LR average precision score: 0.525\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 283, 7\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.444\n",
      "GB cohens kappa score: 0.428\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 272, 18\n",
      "KNN fn, tp: 1, 6\n",
      "KNN f1 score: 0.387\n",
      "KNN cohens kappa score: 0.364\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12924 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 248, 42\n",
      "LR fn, tp: 2, 5\n",
      "LR f1 score: 0.185\n",
      "LR cohens kappa score: 0.150\n",
      "LR average precision score: 0.485\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 283, 7\n",
      "GB fn, tp: 4, 3\n",
      "GB f1 score: 0.353\n",
      "GB cohens kappa score: 0.334\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 271, 19\n",
      "KNN fn, tp: 2, 5\n",
      "KNN f1 score: 0.323\n",
      "KNN cohens kappa score: 0.297\n",
      "\n",
      "\n",
      "------ Step 2/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1132 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12188 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 259, 30\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.279\n",
      "LR cohens kappa score: 0.249\n",
      "LR average precision score: 0.503\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 287, 2\n",
      "GB fn, tp: 5, 2\n",
      "GB f1 score: 0.364\n",
      "GB cohens kappa score: 0.353\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 275, 14\n",
      "KNN fn, tp: 3, 4\n",
      "KNN f1 score: 0.320\n",
      "KNN cohens kappa score: 0.296\n",
      "\n",
      "\n",
      "====== Step 3/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 3/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13112 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 251, 39\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.231\n",
      "LR cohens kappa score: 0.198\n",
      "LR average precision score: 0.603\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 283, 7\n",
      "GB fn, tp: 2, 5\n",
      "GB f1 score: 0.526\n",
      "GB cohens kappa score: 0.512\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 275, 15\n",
      "KNN fn, tp: 2, 5\n",
      "KNN f1 score: 0.370\n",
      "KNN cohens kappa score: 0.348\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17548 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 238, 52\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.212\n",
      "LR cohens kappa score: 0.177\n",
      "LR average precision score: 0.656\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 285, 5\n",
      "GB fn, tp: 1, 6\n",
      "GB f1 score: 0.667\n",
      "GB cohens kappa score: 0.657\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 269, 21\n",
      "KNN fn, tp: 0, 7\n",
      "KNN f1 score: 0.400\n",
      "KNN cohens kappa score: 0.376\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16948 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 255, 35\n",
      "LR fn, tp: 2, 5\n",
      "LR f1 score: 0.213\n",
      "LR cohens kappa score: 0.180\n",
      "LR average precision score: 0.373\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 284, 6\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.471\n",
      "GB cohens kappa score: 0.455\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 279, 11\n",
      "KNN fn, tp: 2, 5\n",
      "KNN f1 score: 0.435\n",
      "KNN cohens kappa score: 0.416\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13740 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 248, 42\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.250\n",
      "LR cohens kappa score: 0.218\n",
      "LR average precision score: 0.378\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 277, 13\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.333\n",
      "GB cohens kappa score: 0.310\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 266, 24\n",
      "KNN fn, tp: 1, 6\n",
      "KNN f1 score: 0.324\n",
      "KNN cohens kappa score: 0.297\n",
      "\n",
      "\n",
      "------ Step 3/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1132 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13036 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 266, 23\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.333\n",
      "LR cohens kappa score: 0.307\n",
      "LR average precision score: 0.355\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 287, 2\n",
      "GB fn, tp: 5, 2\n",
      "GB f1 score: 0.364\n",
      "GB cohens kappa score: 0.353\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 281, 8\n",
      "KNN fn, tp: 1, 6\n",
      "KNN f1 score: 0.571\n",
      "KNN cohens kappa score: 0.557\n",
      "\n",
      "\n",
      "====== Step 4/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 4/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16656 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 262, 28\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.293\n",
      "LR cohens kappa score: 0.264\n",
      "LR average precision score: 0.552\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 287, 3\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.571\n",
      "GB cohens kappa score: 0.561\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 277, 13\n",
      "KNN fn, tp: 1, 6\n",
      "KNN f1 score: 0.462\n",
      "KNN cohens kappa score: 0.442\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12380 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 249, 41\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.255\n",
      "LR cohens kappa score: 0.223\n",
      "LR average precision score: 0.272\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 284, 6\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.471\n",
      "GB cohens kappa score: 0.455\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 275, 15\n",
      "KNN fn, tp: 1, 6\n",
      "KNN f1 score: 0.429\n",
      "KNN cohens kappa score: 0.408\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17028 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 240, 50\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.190\n",
      "LR cohens kappa score: 0.155\n",
      "LR average precision score: 0.428\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 284, 6\n",
      "GB fn, tp: 1, 6\n",
      "GB f1 score: 0.632\n",
      "GB cohens kappa score: 0.620\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 265, 25\n",
      "KNN fn, tp: 0, 7\n",
      "KNN f1 score: 0.359\n",
      "KNN cohens kappa score: 0.333\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17700 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 258, 32\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.267\n",
      "LR cohens kappa score: 0.236\n",
      "LR average precision score: 0.594\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 287, 3\n",
      "GB fn, tp: 4, 3\n",
      "GB f1 score: 0.462\n",
      "GB cohens kappa score: 0.450\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 276, 14\n",
      "KNN fn, tp: 1, 6\n",
      "KNN f1 score: 0.444\n",
      "KNN cohens kappa score: 0.424\n",
      "\n",
      "\n",
      "------ Step 4/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1132 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13920 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 258, 31\n",
      "LR fn, tp: 1, 6\n",
      "LR f1 score: 0.273\n",
      "LR cohens kappa score: 0.243\n",
      "LR average precision score: 0.625\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 284, 5\n",
      "GB fn, tp: 4, 3\n",
      "GB f1 score: 0.400\n",
      "GB cohens kappa score: 0.384\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 278, 11\n",
      "KNN fn, tp: 2, 5\n",
      "KNN f1 score: 0.435\n",
      "KNN cohens kappa score: 0.416\n",
      "\n",
      "\n",
      "====== Step 5/5 =======\n",
      "-> Shuffling data\n",
      "-> Spliting data to slices\n",
      "\n",
      "------ Step 5/5: Slice 1/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13236 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 241, 49\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.222\n",
      "LR cohens kappa score: 0.188\n",
      "LR average precision score: 0.516\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 283, 7\n",
      "GB fn, tp: 2, 5\n",
      "GB f1 score: 0.526\n",
      "GB cohens kappa score: 0.512\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 269, 21\n",
      "KNN fn, tp: 1, 6\n",
      "KNN f1 score: 0.353\n",
      "KNN cohens kappa score: 0.328\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 2/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17812 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 257, 33\n",
      "LR fn, tp: 2, 5\n",
      "LR f1 score: 0.222\n",
      "LR cohens kappa score: 0.190\n",
      "LR average precision score: 0.225\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 287, 3\n",
      "GB fn, tp: 3, 4\n",
      "GB f1 score: 0.571\n",
      "GB cohens kappa score: 0.561\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 275, 15\n",
      "KNN fn, tp: 3, 4\n",
      "KNN f1 score: 0.308\n",
      "KNN cohens kappa score: 0.283\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 3/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 13528 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 249, 41\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.255\n",
      "LR cohens kappa score: 0.223\n",
      "LR average precision score: 0.711\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 285, 5\n",
      "GB fn, tp: 0, 7\n",
      "GB f1 score: 0.737\n",
      "GB cohens kappa score: 0.729\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 273, 17\n",
      "KNN fn, tp: 0, 7\n",
      "KNN f1 score: 0.452\n",
      "KNN cohens kappa score: 0.431\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 4/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1131 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 12352 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 250, 40\n",
      "LR fn, tp: 0, 7\n",
      "LR f1 score: 0.259\n",
      "LR cohens kappa score: 0.228\n",
      "LR average precision score: 0.267\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 283, 7\n",
      "GB fn, tp: 5, 2\n",
      "GB f1 score: 0.250\n",
      "GB cohens kappa score: 0.230\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 278, 12\n",
      "KNN fn, tp: 1, 6\n",
      "KNN f1 score: 0.480\n",
      "KNN cohens kappa score: 0.462\n",
      "\n",
      "\n",
      "------ Step 5/5: Slice 5/5 -------\n",
      "-> Reset the GAN\n",
      "-> Train generator for synthetic samples\n",
      "-> create 1132 synthetic samples\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 17156 characters]\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> test with 'LR'\n",
      "LR tn, fp: 260, 29\n",
      "LR fn, tp: 2, 5\n",
      "LR f1 score: 0.244\n",
      "LR cohens kappa score: 0.213\n",
      "LR average precision score: 0.403\n",
      "\n",
      "-> test with 'GB'\n",
      "GB tn, fp: 285, 4\n",
      "GB fn, tp: 4, 3\n",
      "GB f1 score: 0.429\n",
      "GB cohens kappa score: 0.415\n",
      "\n",
      "-> test with 'KNN'\n",
      "KNN tn, fp: 273, 16\n",
      "KNN fn, tp: 2, 5\n",
      "KNN f1 score: 0.357\n",
      "KNN cohens kappa score: 0.334\n",
      "\n",
      "### Exercise is done.\n",
      "\n",
      "-----[ LR ]-----\n",
      "maximum:\n",
      "LR tn, fp: 266, 54\n",
      "LR fn, tp: 2, 7\n",
      "LR f1 score: 0.333\n",
      "LR cohens kappa score: 0.307\n",
      "LR average precision score: 0.711\n",
      "\n",
      "\n",
      "average:\n",
      "LR tn, fp: 250.8, 39.0\n",
      "LR fn, tp: 0.8, 6.2\n",
      "LR f1 score: 0.242\n",
      "LR cohens kappa score: 0.210\n",
      "LR average precision score: 0.474\n",
      "\n",
      "\n",
      "minimum:\n",
      "LR tn, fp: 235, 23\n",
      "LR fn, tp: 0, 5\n",
      "LR f1 score: 0.185\n",
      "LR cohens kappa score: 0.150\n",
      "LR average precision score: 0.197\n",
      "\n",
      "\n",
      "-----[ GB ]-----\n",
      "maximum:\n",
      "GB tn, fp: 287, 13\n",
      "GB fn, tp: 5, 7\n",
      "GB f1 score: 0.737\n",
      "GB cohens kappa score: 0.729\n",
      "\n",
      "\n",
      "average:\n",
      "GB tn, fp: 284.0, 5.8\n",
      "GB fn, tp: 2.92, 4.08\n",
      "GB f1 score: 0.478\n",
      "GB cohens kappa score: 0.464\n",
      "\n",
      "\n",
      "minimum:\n",
      "GB tn, fp: 277, 2\n",
      "GB fn, tp: 0, 2\n",
      "GB f1 score: 0.250\n",
      "GB cohens kappa score: 0.230\n",
      "\n",
      "\n",
      "-----[ KNN ]-----\n",
      "maximum:\n",
      "KNN tn, fp: 281, 25\n",
      "KNN fn, tp: 3, 7\n",
      "KNN f1 score: 0.571\n",
      "KNN cohens kappa score: 0.557\n",
      "\n",
      "\n",
      "average:\n",
      "KNN tn, fp: 273.84, 15.96\n",
      "KNN fn, tp: 1.2, 5.8\n",
      "KNN f1 score: 0.409\n",
      "KNN cohens kappa score: 0.387\n",
      "\n",
      "\n",
      "minimum:\n",
      "KNN tn, fp: 265, 8\n",
      "KNN fn, tp: 0, 4\n",
      "KNN f1 score: 0.308\n",
      "KNN cohens kappa score: 0.283\n",
      "\n"
     ]
    }
   ],
   "source": [
    "runExerciseForRepeater(\"folding_yeast6\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
