mlpractical/notebooks/Plot_Results.ipynb

216 lines
225 KiB
Plaintext
Raw Normal View History

2024-11-11 10:57:57 +01:00
{
"cells": [
{
"cell_type": "code",
2024-11-19 18:04:58 +01:00
"execution_count": 3,
2024-11-11 10:57:57 +01:00
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import sys\n",
"import matplotlib\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"%matplotlib inline\n",
"plt.style.use('ggplot')\n",
2024-11-18 21:40:20 +01:00
"experiment_dir = '/home/anton/uni/MLP/mlpractical' #Replace this with your path to the mlpractical directory"
2024-11-11 10:57:57 +01:00
]
},
{
"cell_type": "code",
2024-11-19 18:04:58 +01:00
"execution_count": 4,
2024-11-11 10:57:57 +01:00
"metadata": {},
"outputs": [],
"source": [
"def collect_experiment_dicts(target_dir, test_flag=False):\n",
" experiment_dicts = dict()\n",
" for subdir, dir, files in os.walk(target_dir):\n",
" for file in files:\n",
" filepath = None\n",
" if not test_flag:\n",
" if file == 'summary.csv':\n",
" filepath = os.path.join(subdir, file)\n",
" \n",
" elif test_flag:\n",
" if file == 'test_summary.csv':\n",
" filepath = os.path.join(subdir, file)\n",
" \n",
" if filepath is not None:\n",
" \n",
" with open(filepath, 'r') as read_file:\n",
" lines = read_file.readlines()\n",
" \n",
" current_experiment_dict = {key: [] for key in lines[0].replace('\\n', '').split(',')}\n",
" idx_to_key = {idx: key for idx, key in enumerate(lines[0].replace('\\n', '').split(','))}\n",
" \n",
" for line in lines[1:]:\n",
" for idx, value in enumerate(line.replace('\\n', '').split(',')):\n",
" current_experiment_dict[idx_to_key[idx]].append(float(value))\n",
" \n",
" experiment_dicts[subdir.split('/')[-2]] = current_experiment_dict\n",
" \n",
" return experiment_dicts\n",
" \n",
" "
]
},
{
"cell_type": "code",
2024-11-18 21:40:20 +01:00
"execution_count": 8,
2024-11-11 10:57:57 +01:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"VGG_08 ['train_acc', 'train_loss', 'val_acc', 'val_loss']\n",
2024-11-19 18:04:58 +01:00
"VGG_38 ['train_acc', 'train_loss', 'val_acc', 'val_loss']\n",
"VGG38_BN ['train_acc', 'train_loss', 'val_acc', 'val_loss']\n",
"VGG38_BN_RC ['train_acc', 'train_loss', 'val_acc', 'val_loss']\n"
2024-11-11 10:57:57 +01:00
]
}
],
"source": [
"result_dict = collect_experiment_dicts(target_dir=experiment_dir)\n",
2024-11-19 18:04:58 +01:00
"\n",
2024-11-11 10:57:57 +01:00
"for key, value in result_dict.items():\n",
" print(key, list(value.keys()))"
]
},
{
"cell_type": "code",
2024-11-19 18:04:58 +01:00
"execution_count": 10,
2024-11-11 10:57:57 +01:00
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"plt.style.use('ggplot')\n",
"\n",
"def plot_result_graphs(plot_name, stats, keys_to_plot, notebook=True):\n",
" \n",
" fig_1 = plt.figure(figsize=(8, 4))\n",
" ax_1 = fig_1.add_subplot(111)\n",
" for name in keys_to_plot:\n",
" for k in ['train_loss', 'val_loss']:\n",
" item = stats[name][k]\n",
" ax_1.plot(np.arange(0, len(item)), \n",
" item, label='{}_{}'.format(name, k))\n",
" \n",
" ax_1.legend(loc=0)\n",
" ax_1.set_ylabel('Loss')\n",
" ax_1.set_xlabel('Epoch number')\n",
"\n",
" # Plot the change in the validation and training set accuracy over training.\n",
" fig_2 = plt.figure(figsize=(8, 4))\n",
" ax_2 = fig_2.add_subplot(111)\n",
" for name in keys_to_plot:\n",
" for k in ['train_acc', 'val_acc']:\n",
" item = stats[name][k]\n",
" ax_2.plot(np.arange(0, len(item)), \n",
" item, label='{}_{}'.format(name, k))\n",
" \n",
" ax_2.legend(loc=0)\n",
" ax_2.set_ylabel('Accuracy')\n",
" ax_2.set_xlabel('Epoch number')\n",
" \n",
" fig_1.savefig('../data/{}_loss_performance.pdf'.format(plot_name), dpi=None, facecolor='w', edgecolor='w',\n",
2024-11-18 21:40:20 +01:00
" orientation='portrait', format='pdf',\n",
2024-11-11 10:57:57 +01:00
" transparent=False, bbox_inches=None, pad_inches=0.1,\n",
2024-11-18 21:40:20 +01:00
" metadata=None)\n",
2024-11-11 10:57:57 +01:00
" \n",
" fig_2.savefig('../data/{}_accuracy_performance.pdf'.format(plot_name), dpi=None, facecolor='w', edgecolor='w',\n",
2024-11-18 21:40:20 +01:00
" orientation='portrait', format='pdf',\n",
2024-11-11 10:57:57 +01:00
" transparent=False, bbox_inches=None, pad_inches=0.1,\n",
2024-11-18 21:40:20 +01:00
" metadata=None)\n",
2024-11-11 10:57:57 +01:00
" \n",
" "
]
},
{
"cell_type": "code",
2024-11-19 18:04:58 +01:00
"execution_count": 13,
2024-11-11 10:57:57 +01:00
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
2024-11-18 21:40:20 +01:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArQAAAF3CAYAAABUqthdAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAACURUlEQVR4nOzdd3xUVf74/9edmmTSSSOFkIRQEqqCgEhHXFgF4YcIruvqsrZ1Xb/rrhVFxFXEup+1r3xAxUXBglIUUAFBaR+KIIQSSAIkISQhvU29vz+GDIQkMAlJJgPv54N5JHPvnXvPzMmEd868z/soqqqqCCGEEEII4aU0nm6AEEIIIYQQl0ICWiGEEEII4dUkoBVCCCGEEF5NAlohhBBCCOHVJKAVQgghhBBeTQJaIYQQQgjh1SSgFUIIIYQQXk0CWiGEEEII4dUkoBVCCCGEEF5NAlohhBBCCOHVdJ5uwNKlS/n888/rbAsKCuL9999v9DFpaWl8+OGHZGdnExISwoQJExg7dmxrN1UIIYQQQrRDHg9oAeLi4nj66add9zWaxgeO8/PzmTt3LqNHj+bBBx/k0KFDzJ8/n8DAQAYNGtQWzRVCCCGEEO1IuwhoNRoNw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K3SUDbBjIyMjh06BA9e/bEFNARcJbuEkJcfurm2MroV0tSFAXFYETRG7w0ULmyKYqCxs8fxbdc+k+0OJkW3wZKSkpIT0/n6NGjrhHaqioHdru8oYUQQgghLpUEtG0gODgYcE5CM/oo6HSAClUVMkorhBBCCHGp2lXKwbJly/jkk08YP34
2024-11-11 10:57:57 +01:00
"text/plain": [
2024-11-18 21:40:20 +01:00
"<Figure size 800x400 with 1 Axes>"
2024-11-11 10:57:57 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2024-11-18 21:40:20 +01:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArQAAAF0CAYAAADSPqrzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAACcAklEQVR4nOzdd3xUVf74/9ednt5DOmkEQkcCCKh0EURQFhD8qGDd4rp+1t3VZfcjq2JDt/w+61ddP7r2FUGxgEgRBVGR3jskBEhI75lMpt37+2PISEwCCYQ03s/HYyCZe+feM3MymXfOfZ/3UTRN0xBCCCGEEKKT0rV3A4QQQgghhLgUEtAKIYQQQohOTQJaIYQQQgjRqUlAK4QQQgghOjUJaIUQQgghRKcmAa0QQgghhOjUJKAVQgghhBCdmgS0QgghhBCiU5OAVgghhBBCdGoS0AohhBBCiE7N0N4NaE9lZWW4XK42O19ERARFRUVtdj7RuqT/Oj/pw85P+rBzk/7r/NqyDw0GAyEhIc3b9zK3pUNzuVw4nc42OZeiKN5zaprWJucUrUf6r/OTPuz8pA87N+m/zq8j96GkHAghhBBCiE5NAlohhBBCCNGpSUArhBBCCCE6NQlohRBCCCFEpyYBrRBCCCGE6NQkoBVCCCGEEJ2aBLRCCCGEEKJTk4BWCCGEEEJ0ahLQCiGEEEKITu2KXilMCCGEEEI0TlM1nM6zN7uG0wnWygoMZhWTSWnv5tUjAa0QQgghRCemaRrVV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kpddDeDcjkVEGIqKNbbowwZXWh12N9F/n15H7sN1TDqDxF6apFysmJoaYmBjv92l
2024-11-11 10:57:57 +01:00
"text/plain": [
2024-11-18 21:40:20 +01:00
"<Figure size 800x400 with 1 Axes>"
2024-11-11 10:57:57 +01:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plot_result_graphs('problem_model', result_dict, keys_to_plot=['VGG_38', 'VGG_08'])"
]
},
{
"cell_type": "code",
2024-11-19 18:04:58 +01:00
"execution_count": 16,
2024-11-11 10:57:57 +01:00
"metadata": {},
2024-11-18 21:40:20 +01:00
"outputs": [
{
"data": {
2024-11-19 18:04:58 +01:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArQAAAF0CAYAAADSPqrzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAACvA0lEQVR4nOzdd3hUZfbA8e+dkt57QgKEXqWIogKiiFhWdFEXdV3rrl23uGtB7A1R1/W3trWvawW7rLhiAUGUrkgTKSEkIb3Xqff3x517M0lmkklI53yex0cyc2fmztwp5573vOdVVFVVEUIIIYQQoo8y9fQOCCGEEEIIcTgkoBVCCCGEEH2aBLRCCCGEEKJPk4BWCCGEEEL0aRLQCiGEEEKIPk0CWiGEEEII0adJQCuEEEIIIfo0CWiFEEIIIUSfJgGtEEIIIYTo0ySgFUIIIYQQfZqlp3egJ5WXl+N0Orvt8RITEykuLu62xxOdT45h/yDHsX+Q49g/yHHsH7riOFosFmJjYwPbtlMfuY9xOp04HI5ueSxFUYzHVFW1Wx5TdC45hv2DHMf+QY5j/yDHsX/oDcdRSg6EEEIIIUSfJgGtEEIIIYTo0ySgFUIIIYQQfZoEtEIIIYQQok87oieFCSGEEDqbzYbNZuvp3Tji1NfXY7fbe3o3xGHq6HFUFIWIiAhjYllHSUArhBDiiFdbW4uiKERGRh72D6toH6v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FJERESQlJQEaEH0+eefzyeffNJiuyuuuILHH3+cc845h5CQkIDuu7XH+u1vf8t//vMfVq9ezSWXXEJ9fT0333wzs2bN4uWXXzZuM3DgQCZPntxm1jUnJ4ff/OY3AIwZMwaA3/zmNzz55JOcf/75jBw5EqvVynvvvcfIkSN5//33ef7551m6dCnZ2dnExMRw6qmncueddxIeHg5oJy333nsvu3ZpI79///vf+d///sc111zDY489RmVlJSeffDKPPfYYERER7X49KioquPvuu/nyyy+x2Wwcf/zx3H///QwZMgSA3NxcFi5cyMaNG7Hb7WRkZHDvvfcyc+ZMKioquPPOO/nmm2+oq6sjJSWFP/7xj35HFDqLBLTdQFEUlEHDUXdsQT2w1yhBEEII0QvZbbhvnN8jD216eikEtx2UWSwWzj//fJYuXcpf/vIXIwhetmwZDoeDefPm8cQTTxAeHs5ll13m8z68A+ePPvqIE088sUkw629bby6Xi//+97/U1dVx9NFHG5cfc8wxfPHFF1x44YWkpKTw3XffsX//fu6///42n5sv+fn5fPXVV0yaNKnFdX/4wx/44IMP+Pe//821117bofvXqarK999/z549e8jMzARg1apVlJWVcd111/m8TXR0dKv3mZaWxosvvshVV13F6tWriYyMbBJ4v/vuu1x66aV89NFHxmUmk4n777+fjIwMDh48yB133MGDDz7IokWL/D5OdnY2n3/+Oa+99hqVlZVce+21PP3009x+++3teAU0f/nLX8jKyuLVV18lIiKChx9+mEsuuYRVq1ZhtVq54447cDgcvP/++4SFhfHLL78YwfZjjz3GL7/8whtvvEFcXBxZWVk0NDS0ex/aSwLa7jJ4GOzYgpq9F+l2KIQQ4nBdeOGFPPfcc3z33XdMmzYN0DJ3Z5xxBjExMezfv5+BAwdisTT+1D///PM8/vjjxt+bN28mKiqKrKwsI5uq+/3vf8/q1asBrSbVOzu6a9cuzj77bGw2G+Hh4bz00kuMGDHCuP6BBx7glltuYcqUKVgsFkwmE4899hjHHntswM/v4Ycf5tFHH8XtdtPQ0MCkSZO45557WmwXGhrKX/7yFx555BF++9vfEhUVFfBjNH8sh8OBw+EgJCSEK6+8EoCsrCwAhg3rWDLKbDYTExMDQEJCQosAePDgwdx5551NLrvqqquMfw8cOJBbbrmFBQsWtBrQut1u/vGPfxgZ2fPOO49vv/223fu7f/9+VqxYwUcffcQxxxwDwFNPPcUxxxzD//73P+bOncuhQ4c488wzjYlpgwYNMlYKy8vLY9y4cUyYMAGAjIyMdu9DR0hA202UQcNQAfXA3p7eFSGEEK0JCtYypT302IEaNmwYU6ZM4Z133mHatGkcOHCA9evX89ZbbxnbNM+sXnjhhcyZM4cffviBm266qdUVmh5++GHq6up45ZVXWLduXZPrhg4dyooVK6iqqmL58uX8+c9/5v333zeC2ldeeYUtW7bw6quvkp6ezvr167njjjtISkrixBNPDOj5XXvttcyfPx9VVTl06BCPPPIIl156KR988AFms7nJthdddBEvvPACzzzzDAsWLAjo/n09VmlpKYsXL2batGlGMNcZq1i1Rg/8vK1du5annnqKPXv2UF1djcvloqGhgbq6OsLCwnzeT0ZGRpPygqSkJEpLS9u9P3v37sVisTB58mTjsri4OIYOHcrevVoMc+WVV7JgwQK++eYbZsyYwZlnnmk8j0svvZSrrrqKbdu2MXPmTE477TTjtexKMimsmyieiWEcykZ1BFb0LYQQovspioISHNIz/7VzxbKLLrqI5cuXU11dzZIlS0hPT2fGjBmAVv+anZ2Nw2sycnR0NJmZmaSkpDS5n8zMzBaz9ZOTk8nMzDSyi96CgoLIzMxkwoQJLFiwgDFjxvDSSy8BWh3vI488wj333MOcOXMYM2YMV1xxBWeffTbPP/98wM8tLi6OzMxMo6PAfffdx6ZNm1i7dm2LbS0WC7feeisvv/xyk44M7X2sKVOm8OKLL/Liiy8a2Wm9blQP5jpbaGhok79zc3O59NJLGTlyJC+88AKfffYZDz30EECTY9mcdyYetPex2+1u9/74C+C9L//tb3/Ld999x3nnncfPP//MmWeeaRz/WbNmsWHDBv7whz9QWFjIhRde2OFSk/aQgLa7xCZgio4FlwtyD/T03gghhOgH5s6di9l
"text/plain": [
"<Figure size 800x400 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "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9pZde4plnntF+37p1K2FhYRw5ckSLpqr88Y9/ZMOGDYDiSa0fHd27dy8XXnghVquV4OBgXn31Vfr3769tf+yxx7jnnnsYO3YsBoMBnU7HokWLGD9+vM/P74knnuDpp5/G5XJhsVgYNWoUDz30UJP9AgMDueOOO3jqqae44oorCAvz/45SvZbdbsdut2M2mzW7wZEjRwDo27ev3+cF0Ov1REREABATE9NEAPfp04cHHnigwWN/+tOftP+npqZyzz33sGDBgmYFrcvl4tlnn9Uisr///e/54YcffBrj7373uwa//9///R/Dhw/nwIEDDBw4kE8++YTi4mK++OILIiMjATTBD/Df//6X2bNnc/fdd2uPDRkyxKdrCwQCQXdCdtiRv/0SeeVyqKmCiGikiWchTZqOFJ/UcN/aGuTtm5G3boTd28Ber5V6v8FIp52JNHA4ZB1DPrwX+eAeOH5YsQeoFoHGGE0wcDjSsLFIw8ciRcc1vGZlOZw4gnziCBiMSJOnIZmDPJ5KMhqRpsxEnnw2ZB1VxLGhe0jF7jHKzsYUoERKT5JWtU01+d7fvm/fvowdO5b//e9/TJ48maNHj/Lzzz+zdOlSbZ/GkdV58+Zxzjnn8Ouvv3Lrrbc2SXyqzxNPPEFNTQ2vv/46mzZtarAtIyODNWvWUFFRwZdffslf//pXPvroI03Uvv7662zbto033niD5ORkfv75Z+6//37i4uKYMmWKT8/vpptu4tJLL0WWZXJycnjqqae4+uqr+fjjj9HrG94NX37
2024-11-18 21:40:20 +01:00
"text/plain": [
2024-11-19 18:04:58 +01:00
"<Figure size 800x400 with 1 Axes>"
2024-11-18 21:40:20 +01:00
]
},
"metadata": {},
2024-11-19 18:04:58 +01:00
"output_type": "display_data"
2024-11-18 21:40:20 +01:00
}
],
"source": [
2024-11-19 18:04:58 +01:00
"plot_result_graphs('VGG38_BN_RC', result_dict, keys_to_plot=['VGG38_BN_RC'])\n",
"plt.savefig('../report/figures/VGG38_BN_RC_loss_and_acc.pdf')"
2024-11-18 21:40:20 +01:00
]
2024-11-11 10:57:57 +01:00
}
],
"metadata": {
"kernelspec": {
2024-11-18 21:40:20 +01:00
"display_name": "Python 3 (ipykernel)",
2024-11-11 10:57:57 +01:00
"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",
2024-11-18 21:40:20 +01:00
"version": "3.11.10"
2024-11-11 10:57:57 +01:00
}
},
"nbformat": 4,
2024-11-18 21:40:20 +01:00
"nbformat_minor": 4
2024-11-11 10:57:57 +01:00
}