Symulowanie-wizualne/sw_lab6.ipynb

694 lines
563 KiB
Plaintext
Raw Normal View History

2022-11-29 08:36:03 +01:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Zadanie 1 (6pkt):\n",
"\n",
"Zadanie polega na wykonaniu rozsądnej ilości testów dotyczących różnej ilości warstw ukrytych i różnej ilości neuronów w tych warstwach. Posługujemy się profesjonalną implementacją sieci MLP, np. z sklearn. Ponadto należy przetestować różne ilości iteracji, regularyzacje oraz wykonać wizualizacje dokładności i błędu funkcji kosztu dla kolejnych iteracji."
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [],
"source": [
"from sklearn.preprocessing import LabelEncoder\n",
"from sklearn.neural_network import MLPClassifier\n",
"import matplotlib.pyplot as plt\n",
"\n",
"import sys\n",
"import subprocess\n",
"import pkg_resources\n",
"import numpy as np\n",
"\n",
"from tqdm import tqdm\n",
"\n",
"\n",
"required = {'scikit-image'}\n",
"installed = {pkg.key for pkg in pkg_resources.working_set}\n",
"missing = required - installed\n",
"\n",
"if missing: \n",
" python = sys.executable\n",
" subprocess.check_call([python, '-m', 'pip', 'install', *missing], stdout=subprocess.DEVNULL)\n",
"\n",
"def load_train_data(input_dir, newSize=(64,64)):\n",
" import numpy as np\n",
" import pandas as pd\n",
" import os\n",
" from skimage.io import imread\n",
" import cv2 as cv\n",
" from pathlib import Path\n",
" import random\n",
" from shutil import copyfile, rmtree\n",
" import json\n",
"\n",
" import seaborn as sns\n",
" import matplotlib.pyplot as plt\n",
"\n",
" import matplotlib\n",
" \n",
" image_dir = Path(input_dir)\n",
" categories_name = []\n",
" for file in os.listdir(image_dir):\n",
" d = os.path.join(image_dir, file)\n",
" if os.path.isdir(d):\n",
" categories_name.append(file)\n",
"\n",
" folders = [directory for directory in image_dir.iterdir() if directory.is_dir()]\n",
"\n",
" train_img = []\n",
" categories_count=[]\n",
" labels=[]\n",
" for i, direc in enumerate(folders):\n",
" count = 0\n",
" for obj in direc.iterdir():\n",
" if os.path.isfile(obj) and os.path.basename(os.path.normpath(obj)) != 'desktop.ini':\n",
" labels.append(os.path.basename(os.path.normpath(direc)))\n",
" count += 1\n",
" img = imread(obj)#zwraca ndarry postaci xSize x ySize x colorDepth\n",
" img = cv.resize(img, newSize, interpolation=cv.INTER_AREA)# zwraca ndarray\n",
" img = img / 255#normalizacja\n",
" train_img.append(img)\n",
" categories_count.append(count)\n",
" X={}\n",
" X[\"values\"] = np.array(train_img)\n",
" X[\"categories_name\"] = categories_name\n",
" X[\"categories_count\"] = categories_count\n",
" X[\"labels\"]=labels\n",
" return X\n",
"\n",
"def load_test_data(input_dir, newSize=(64,64)):\n",
" import numpy as np\n",
" import pandas as pd\n",
" import os\n",
" from skimage.io import imread\n",
" import cv2 as cv\n",
" from pathlib import Path\n",
" import random\n",
" from shutil import copyfile, rmtree\n",
" import json\n",
"\n",
" import seaborn as sns\n",
" import matplotlib.pyplot as plt\n",
"\n",
" import matplotlib\n",
"\n",
" image_path = Path(input_dir)\n",
"\n",
" labels_path = image_path.parents[0] / 'test_labels.json'\n",
"\n",
" jsonString = labels_path.read_text()\n",
" objects = json.loads(jsonString)\n",
"\n",
" categories_name = []\n",
" categories_count=[]\n",
" count = 0\n",
" c = objects[0]['value']\n",
" for e in objects:\n",
" if e['value'] != c:\n",
" categories_count.append(count)\n",
" c = e['value']\n",
" count = 1\n",
" else:\n",
" count += 1\n",
" if not e['value'] in categories_name:\n",
" categories_name.append(e['value'])\n",
"\n",
" categories_count.append(count)\n",
" \n",
" test_img = []\n",
"\n",
" labels=[]\n",
" for e in objects:\n",
" p = image_path / e['filename']\n",
" img = imread(p)#zwraca ndarry postaci xSize x ySize x colorDepth\n",
" img = cv.resize(img, newSize, interpolation=cv.INTER_AREA)# zwraca ndarray\n",
" img = img / 255#normalizacja\n",
" test_img.append(img)\n",
" labels.append(e['value'])\n",
"\n",
" X={}\n",
" X[\"values\"] = np.array(test_img)\n",
" X[\"categories_name\"] = categories_name\n",
" X[\"categories_count\"] = categories_count\n",
" X[\"labels\"]=labels\n",
" return X\n",
"\n",
"def get_dataset(new_size=64):\n",
" data_train = load_train_data(\"train_test_sw/train_sw\", newSize=(new_size,new_size))\n",
" X_train = data_train['values']\n",
" y_train = data_train['labels']\n",
"\n",
" data_test = load_test_data(\"train_test_sw/test_sw\", newSize=(new_size,new_size))\n",
" X_test = data_test['values']\n",
" y_test = data_test['labels']\n",
"\n",
" class_le = LabelEncoder()\n",
" y_train_enc = class_le.fit_transform(y_train)\n",
" y_test_enc = class_le.fit_transform(y_test)\n",
"\n",
" X_train = X_train.flatten().reshape(X_train.shape[0], int(np.prod(X_train.shape) / X_train.shape[0]))\n",
" X_test = X_test.flatten().reshape(X_test.shape[0], int(np.prod(X_test.shape) / X_test.shape[0]))\n",
"\n",
" return X_train, y_train_enc, X_test, y_test_enc\n",
"\n",
"def test_mlp(X_train, y_train, X_val, y_val, X_test, y_test, hidden_layer_sizes, alpha, max_iter):\n",
" mlp = MLPClassifier(hidden_layer_sizes=hidden_layer_sizes, alpha=alpha, max_iter=max_iter)\n",
" accuracy = []\n",
"\n",
" result = {\n",
" 'num_layers': len(hidden_layer_sizes),\n",
" 'layer_sizes': hidden_layer_sizes,\n",
" 'regularization': alpha,\n",
" 'max_iter': max_iter\n",
" }\n",
"\n",
" for i in tqdm(range(max_iter)):\n",
" mlp.partial_fit(X_train, y_train, np.unique(y_train))\n",
" accuracy.append(mlp.score(X_train, y_train))\n",
" if i == 50:\n",
" result['checkpoint_train_accuracy'] = np.mean(accuracy)\n",
" result['checkpoint_val_accuracy'] = mlp.score(X_val, y_val)\n",
" result['checkpoint_test_accuracy'] = mlp.score(X_test, y_test)\n",
"\n",
" result['full_train_accuracy'] = np.mean(accuracy)\n",
" result['full_val_accuracy'] = mlp.score(X_val, y_val)\n",
" result['full_test_accuracy'] = mlp.score(X_test, y_test)\n",
" result['accuracy_curve'] = accuracy\n",
" result['loss_curve'] = mlp.loss_curve_\n",
"\n",
" return result\n",
"\n",
"def print_result(result):\n",
" print(f\"NUMBER OF HIDDEN LAYERS = {result['num_layers']}\")\n",
" print(f\"HIDDEN LAYER SIZES = {result['layer_sizes']}\")\n",
" print(f\"REGULARIZATION = {result['regularization']}\")\n",
" print(\"\\n50 EPOCHS\")\n",
" print(f\"train_accuracy = {round(result['checkpoint_train_accuracy'] * 100, 2)}%\")\n",
" print(f\"val_accuracy = {round(result['checkpoint_val_accuracy'] * 100, 2)}%\")\n",
" print(f\"test_accuracy = {round(result['checkpoint_test_accuracy'] * 100, 2)}%\")\n",
" print(f\"\\n{result['max_iter']} EPOCHS\")\n",
" print(f\"train_accuracy = {round(result['full_train_accuracy'] * 100, 2)}%\")\n",
" print(f\"val_accuracy = {round(result['checkpoint_val_accuracy'] * 100, 2)}%\")\n",
" print(f\"test_accuracy = {round(result['full_test_accuracy'] * 100, 2)}%\")\n",
"\n",
"def get_plot(result):\n",
" f = plt.figure(figsize=(12,6))\n",
" plt.plot(result['loss_curve'], label='loss')\n",
" plt.plot(result['accuracy_curve'], label='accuracy')\n",
" plt.legend(loc='best')\n",
" plt.xlabel('number of iterations')\n",
" plt.grid()\n",
" plt.show()\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"from sklearn.model_selection import train_test_split\n",
"\n",
"NEW_SIZE = 64\n",
"\n",
"ONE_LAYER = (286,)\n",
"TWO_LAYERS = (437, 46)\n",
"THREE_LAYERS = (2166, 286, 38)\n",
"\n",
"\n",
"X_train, y_train, X_test, y_test = get_dataset(new_size=NEW_SIZE)\n",
"\n",
"X_train, X_val, y_train, y_val = train_test_split(X_train, y_train, test_size=0.05, random_state=42)\n",
"\n",
"all_results = []"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 200/200 [03:46<00:00, 1.13s/it]\n",
"100%|██████████| 200/200 [04:01<00:00, 1.21s/it]\n"
]
}
],
"source": [
"all_results.append(test_mlp(X_train, y_train, X_val, y_val, X_test, y_test, hidden_layer_sizes=ONE_LAYER, alpha=0.1, max_iter=200))\n",
"all_results.append(test_mlp(X_train, y_train, X_val, y_val, X_test, y_test, hidden_layer_sizes=ONE_LAYER, alpha=0.001, max_iter=200))"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 200/200 [05:31<00:00, 1.66s/it]\n",
"100%|██████████| 200/200 [05:19<00:00, 1.60s/it]\n"
]
}
],
"source": [
"all_results.append(test_mlp(X_train, y_train, X_val, y_val, X_test, y_test, hidden_layer_sizes=TWO_LAYERS, alpha=0.1, max_iter=200))\n",
"all_results.append(test_mlp(X_train, y_train, X_val, y_val, X_test, y_test, hidden_layer_sizes=TWO_LAYERS, alpha=0.001, max_iter=200))"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 200/200 [42:29<00:00, 12.75s/it]\n",
"100%|██████████| 200/200 [44:00<00:00, 13.20s/it]\n"
]
}
],
"source": [
"all_results.append(test_mlp(X_train, y_train, X_val, y_val, X_test, y_test, hidden_layer_sizes=THREE_LAYERS, alpha=0.01, max_iter=200))\n",
"all_results.append(test_mlp(X_train, y_train, X_val, y_val, X_test, y_test, hidden_layer_sizes=THREE_LAYERS, alpha=0.001, max_iter=200))"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 200/200 [46:41<00:00, 14.01s/it]\n"
]
}
],
"source": [
"# TODO błąd przy regularyzacji\n",
"all_results[4] = test_mlp(X_train, y_train, X_val, y_val, X_test, y_test, hidden_layer_sizes=THREE_LAYERS, alpha=0.1, max_iter=200)"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"NUMBER OF HIDDEN LAYERS = 1\n",
"HIDDEN LAYER SIZES = (286,)\n",
"REGULARIZATION = 0.1\n",
"\n",
"50 EPOCHS\n",
"train_accuracy = 70.72%\n",
"val_accuracy = 61.54%\n",
"test_accuracy = 71.81%\n",
"\n",
"200 EPOCHS\n",
"train_accuracy = 87.68%\n",
"val_accuracy = 61.54%\n",
"test_accuracy = 70.27%\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAr8AAAFzCAYAAAA322G8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAABNo0lEQVR4nO3deXhdVaH+8e86Y4aTOWnadC4tnecyFSipgAwqg6KAioADcr3idJ2Hq165PxUEvQ73alUUVCjKoIgyQykIBdpS6DzQgc7N0GZOzrR+f6yTNG2TtidJkzT7/TxPnpycYe91VvY5+91rr7W2sdYiIiIiIuIFvr4ugIiIiIhIb1H4FRERERHPUPgVEREREc9Q+BURERERz1D4FRERERHPUPgVEREREc8I9ObKiouL7ahRo3pzlQA0NDSQnZ3d6+s9manO0qP6Sp/qLD2qr/SpztKj+kqf6iw9vVlfy5Ytq7TWlnT0WK+G31GjRrF06dLeXCUAixYtory8vNfXezJTnaVH9ZU+1Vl6VF/pU52lR/WVPtVZenqzvowx2zp7TN0eRERERMQzFH5FRERExDMUfkVERETEM3q1z6+IiIiIHBSLxdixYwfNzc19XZQTLi8vj7Vr1/boMjMyMhg2bBjBYPC4X6PwKyIiItJHduzYQU5ODqNGjcIY09fFOaHq6urIycnpseVZa6mqqmLHjh2MHj36uF+nbg8iIiIifaS5uZmioqIBH3xPBGMMRUVFabeaK/yKiIiI9CEF367rSt0p/IqIiIh4WCQS6esi9CqFXxERERHxDIVfEREREcFay5e+9CWmTJnC1KlTuf/++wHYvXs38+bNY8aMGUyZMoUXXniBRCLBDTfc0PbcH//4x31c+uOn2R5ERERE+oHv/n01a3bV9ugyJ5Xl8u33TD6u5z700EOsWLGCN954g8rKSk477TTmzZvHvffey0UXXcQ3vvENEokEjY2NrFixgp07d7Jq1SoADhw40KPlPpEGfMvv1soG3qiI93UxRERERPq1F198kWuvvRa/309paSnnnXcer732Gqeddhq/+93v+M53vsPKlSvJyclhzJgxbN68mVtuuYXHH3+c3Nzcvi7+cRvwLb9/W7GLHy9r4dPvs/h9Gk0pIiIi/dPxttD2tnnz5rF48WL+8Y9/cMMNN/CFL3yBj3zkI7zxxhs88cQT/PKXv+TPf/4zd911V18X9bgM+JbfgN8F3lgi2cclEREREem/zj33XO6//34SiQQVFRUsXryY008/nW3btlFaWsonPvEJPv7xj7N8+XIqKytJJpO8733v49Zbb2X58uV9XfzjNuBbfoOp8BtP2j4uiYiIiEj/deWVV/Lyyy8zffp0jDHcdtttDB48mLvvvpvbb7+dYDBIJBLhnnvuYefOndx4440kk65x8fvf/34fl/74Dfjw6/e5xu1EQuFXRERE5HD19fWAu2DE7bffzu23337I49dffz3XX3/9Ea87mVp72xvw3R5aW35jSXV7EBEREfG6AR9+A6mW37hafkVEREQ8b+CHXw14ExEREZGUAR9+NeBNRERERFoN+PB7sNuDWn5FREREvG7Ah9+2AW/q8ysiIiLieQM+/LZNdaZuDyIiIiKeN+DDb0BTnYmIiIj0uXg83tdFADwQfoOa6kxERETkqK644gpmz57N5MmTWbBgAQCPP/44s2bNYvr06Zx//vmAuyDGjTfeyNSpU5k2bRoPPvggAJFIpG1ZDzzwADfccAMAN9xwAzfffDNnnHEG3/rWt3j11Vc566yzmDlzJnPnzmX9+vUAJBIJvvjFLzJlyhSmTZvGz372M5599lmuuOKKtuU+9dRTXHnlld1+rwP+Cm+tLb8a8CYiIiL92mNfhT0re3aZg6fCJT845tPuuusuCgsLaWpq4rTTTuPyyy/nE5/4BIsXL2b06NFUV1cD8L3vfY+8vDxWrnTl3L9//zGXvWPHDl566SUaGxux1vLCCy8QCAR4+umn+frXv86DDz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5xwy/xpi7jDH7jDGr2t1XaIx5yhizMfW74MQWs3v8Poip5VdERETE846n5ff3wMWH3fdV4Blr7TjgmdTf/ZbPaKozERERETmO8GutXQxUH3b35cDdqdt3A1f0bLF6lt8YdXsQEREREczxTKpsjBkFPGqtnZL6+4C1Nj912wD7W//u4LU3ATcBlJaWzl64cGGPFDwdn3u2nqklQT42Ndzr6z5Z1dfXE4lE+roYJw3VV/pUZ+lRfaVPdZYe1Vf6VGfp6c36mj9//jJr7ZyOHuv2PL/WWmuM6TRBW2sXAAsA5syZY8vLy7u7yrQFn/8nxYNKKS+f0evrPlktWrSIvvhfnaxUX+lTnaVH9ZU+1Vl6VF/pU52lp7/UV1dne9hrjBkCkPq9r+eK1PP8RgPeRERERKTr4fcR4PrU7euBv/VMcU4Mv08D3kRERETk+KY6uw94GRhvjNlhjPkY8APgQmPMRuCC1N/9lhvwppZfEREREa87Zp9fa+21nTx0fg+X5YRx3R7U8isiIiLidd64wpsPEprqTERERMTzvBF+NeBNRERERPBK+PWhi1yIiIiIiEfCrzHE1fIrIiIi4nkeCb8a8CYiIiIiXgm/PjTVmYiIiIh4JPwaXeRCRERERLwUfjXgTURERMTzvBF+fRrwJiIiIiJeCb8GYmr5FREREfE8b4RfH2r5FRERERGPhF8NeBMRERERPBN+DTFNdSYiIiLieR4Jv2r5FRERERGvhF+fm+rMWgVgERERES/zRvg17ndCMz6IiIiIeJo3wm/qXepCFyIiIiLe5o3wa1zTb0zTnYmIiIh4mifCbyDV7UGD3kRERES8zRPht7Xbg6Y7ExEREfE2T4Rfn1p+RURERASPhF/N9iAiIiIi4JXw69OANxERERHxSPhtG/Cmll8RERERT/NE+G0b8KaWXxERERFP80b41YA3ERE
"text/plain": [
"<Figure size 864x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"NUMBER OF HIDDEN LAYERS = 1\n",
"HIDDEN LAYER SIZES = (286,)\n",
"REGULARIZATION = 0.001\n",
"\n",
"50 EPOCHS\n",
"train_accuracy = 63.91%\n",
"val_accuracy = 59.62%\n",
"test_accuracy = 68.34%\n",
"\n",
"200 EPOCHS\n",
"train_accuracy = 86.05%\n",
"val_accuracy = 59.62%\n",
"test_accuracy = 77.99%\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAr8AAAFzCAYAAAA322G8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAABMlElEQVR4nO3deXzcVb3/8deZPZnJnjRtmq600H2hgbKTCsgiCKiIoGwq6PXK9brvP/XKVa9c94sXq6KgYkGWK4KyUxbZW1paukP3PWuzZ5bz++NM0rRN2k6aJmm+7+fjkccks3y/Z85MZt5z5vM9x1hrERERERHxAt9AN0BEREREpL8o/IqIiIiIZyj8ioiIiIhnKPyKiIiIiGco/IqIiIiIZyj8ioiIiIhnBPpzZ8XFxXbs2LH9uUsAmpqaiEaj/b7fY5n6LDPqr8ypzzKj/sqc+iwz6q/Mqc8y05/9tWjRoiprbUl3l/Vr+B07diyvv/56f+4SgIULF1JZWdnv+z2Wqc8yo/7KnPosM+qvzKnPMqP+ypz6LDP92V/GmI09XaayBxERERHxjEOGX2PMHcaYXcaY5V3OKzTGPGGMWZs+LTi6zRQREREROXKHM/L7e+CC/c77CvCUtXYi8FT6bxERERGRQe2QNb/W2ueMMWP3O/tSoDL9+53AQuDLfdkwERERkaEuHo+zZcsWWltbB7opR11eXh4rV67s021GIhHKy8sJBoOHfRtjrT30lVz4fdhaOy39d521Nj/9uwFqO/7u5rY3ATcBlJaWzlmwYMFhN66vNDY2EovF+n2/xzL1WWbUX5lTn2VG/ZU59Vlm1F+Z64s+i8VilJaWkpeXh4tUQ1cymcTv9/fZ9qy11NfXs3PnThobG/e5bN68eYustRXd3e6IZ3uw1lpjTI8J2lo7H5gPUFFRYQfiqEgdjZk59Vlm1F+ZU59lRv2VOfVZZtRfmeuLPlu5ciXl5eVDPvgCNDQ0kJOT06fbzMnJobGxkYqKbnNut3o728NOY8wIgPTprl5uR0RERMTTvBB8j5be9F1vw+9DwHXp368D/trL7YiIiIjIAPJaucvhTHX2Z+Al4ARjzBZjzMeAHwDnGWPWAuem/xYRERERGdQOGX6ttVdZa0dYa4PW2nJr7W+ttdXW2nOstROttedaa2v6o7EiIiIicnRYa/niF7/ItGnTmD59Ovfccw8A27dv56yzzmLWrFlMmzaN559/nmQyyfXXX9953Z/85CcD3PrD16/LG4uIiIhI977zt7dYsW1Pn25zSlku37pk6mFd94EHHmDJkiUsXbqUqqoqTjrpJM466yzuvvtuzj//fL7+9a+TTCZpbm5myZIlbN26leXL3RpodXV1fdruo2nIL2+8oaqJpbsTHM6UbiIiIiJe9cILL3DVVVfh9/spLS3l7LPP5rXXXuOkk07id7/7Hd/+9rdZtmwZOTk5jB8/nnfeeYebb76ZRx99lNzc3IFu/mEb8iO/f12yjZ8sauPT7we/DqYUERGRQepwR2j721lnncVzzz3HI488wvXXX8/nPvc5rr32WpYuXcpjjz3G7bffzr333ssdd9wx0E09LEN+5DeQTrzJlEZ+RURERHpy5plncs8995BMJtm9ezfPPfccJ598Mhs3bqS0tJQbb7yRj3/84yxevJiqqipSqRTvf//7ueWWW1i8ePFAN/+wDfmRX79P4VdERETkUC6//HJeeuklZs6ciTGGH/7whwwfPpw777yTW2+9lWAwSCwW46677mLr1q3ccMMNpFIpAL7//e8PcOsP35APv4F0+E2kUkDfLaknIiIiMhR0LA1sjOHWW2/l1ltv3efy6667juuuu+6A2x1Lo71dDfmyB438ioiIiEgHz4TfhMKviIiIiOd5JvymFH5FREREPG/Ih9+ARn5FREREJG3Ih1+/z91F1fyKiIiIyJAPvxr5FREREZEOQz78+jpne0gNcEtEREREZKAN+fAb6Ay/A9wQEREREQ9LJBID3QTAA+HXv88iFyIiIiKyv8suu4w5c+YwdepU5s+fD8Cjjz7KiSeeyMyZMznnnHMAtyDGDTfcwPTp05kxYwb3338/ALFYrHNb9913H9dffz0A119/PZ/85CeZO3cu3/zmN3n11Vc59dRTmT17NqeddhqrV68GIJlM8oUvfIFp06YxY8YMfvGLX/D0009z2WWXdW73iSee4PLLLz/i++qZFd50wJuIiIgMav/4CuxY1rfbHD4dLvzBIa92xx13UFhYSEtLCyeddBKXXnopN954I8899xzjxo2jpqYGgO9+97vk5eWxbJlrZ21t7SG3vWXLFl588UWam5ux1vL8888TCAR48skn+drXvsb999/P/Pnz2bBhA0uWLCEQCFBTU0NBQQGf+tSn2L17NyUlJfzud7/jox/96JH1Bx4Ivz4d8CYiIiJyUD//+c958MEHAdi8eTPz58/nrLPOYty4cQAUFhYC8OSTT7JgwYLO2xUUFBxy21dccQV+vx+A+vp6rrvuOtauXYsxhng83rndT37ykwQCgX32d8011/DHP/6RG264gZdeeom77rrriO/rkA+/GvkVERGRY8JhjNAeDQsXLuTJJ5/kpZdeIjs7m8rKSmbNmsWqVasOexvGmM7fW1tb97ksGo12/v7Nb36TefPm8eCDD7JhwwYqKysPut0bbriBSy65hEgkwhVXXNEZjo+EZ2p+FX5FREREDlRfX09BQQHZ2dmsWrWKl19+mdbWVp577jnWr18P0Fn2cN5553Hbbbd13raj7KG0tJSVK1eSSqU6R5B72tfIkSMB+P3vf995/nnnncevfvWrzoPiOvZXVlZGWVkZt9xyCzfccEOf3N8hH34DWuRCREREpEcXXHABiUSCyZMn85WvfIVTTjmFkpIS5s+fz/ve9z5mzpzJlVdeCcA3vvENamtrmTZtGjNnzuSZZ54B4Ac/+AEXX3wxp512GiNGjOhxX1/60pf46le/yuzZs/eZ/eHjH/84o0ePZsaMGcycOZO7776787IPf/jDjBo1ismTJ/fJ/R3yZQ9+1fyKiIiI9CgcDvOPf/yj28suvPDCff6OxWLceeedB1zvAx/4AB/4wAcOOL/r6C7Aqaeeypo1azr/vuWWWwAIBAL8+Mc/5sc//vEB23jhhRe48cYbD3k/Dpdnwq8WuRARERE5tsyZM4doNMqPfvSjPtvmkA+/ncsbJzXyKyIiInIsWbRoUZ9vc8jX/HaM/Kaswq+IiIiI1w358BtQza+IiIgMYlYDdL3Wm74b8uFXU52JiIjIYBWJRKiurlYA7gVrLdXV1UQikYxuN+Rrfv2q+RUREZFBqry8nC1btrB79+6BbspR19ramnFQPZRIJEJ5eXlGt/FM+NXIr4iIiAw2wWCwcwnhoW7hwoXMnj17oJsx9MseOhe50NcJIiIiIp435MOvFrkQERERkQ5DPvx2zPaQTGqRCxERERGvG/Lh16eRXxERERFJG/LhN6AD3kREREQkbciH387ZHnTAm4iIiIjnDfnwu7fmV+FXRERExOuGfPjVbA8iIiIi0mHIh19jDAbV/IqIiIiIB8IvgN9o5FdEREREPBJ+fT5I6YA3EREREc/zRPj1G0jogDcRERERz/NE+PUZSKa0wpuIiIiI13km/KrmV0REREQ8EX79xmi2BxERERHxRvh1ZQ8KvyIiIiJe54nw61f4FRERERE8En5V8ysiIiIi4KHwq5FfEREREfFE+HUrvGmqMxERERGv80T49RlDUtlXRERExPM8EX79WuRCRERERPBI+NUBbyIiIiICHgq/OuBNRERERDwTfjXyKyIiIiJHFH6NMZ81xrxljFlujPmzMSbSVw3rS34fpBR+RURERDyv1+HXGDMS+Degwlo7DfADH+qrhvUlnzEa+RURERGRIy57CABZxpgAkA1sO/Im9T0tbywiIiIiAMba3odCY8xngP8EWoDHrbUf7uY6NwE3AZSWls5ZsGBBr/fXWz96tZG6uJ/vnp7V7/s+VjU2NhKLxQa6GccM9Vfm1GeZUX9lTn2WGfVX5tRnmenP/po3b94ia21Fd5c
"text/plain": [
"<Figure size 864x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"NUMBER OF HIDDEN LAYERS = 2\n",
"HIDDEN LAYER SIZES = (437, 46)\n",
"REGULARIZATION = 0.1\n",
"\n",
"50 EPOCHS\n",
"train_accuracy = 66.85%\n",
"val_accuracy = 67.31%\n",
"test_accuracy = 68.34%\n",
"\n",
"200 EPOCHS\n",
"train_accuracy = 84.63%\n",
"val_accuracy = 67.31%\n",
"test_accuracy = 75.29%\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArkAAAFzCAYAAAA6xRH7AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAABpHElEQVR4nO3dd3iUVd7G8e+ZTHolCQQChN577xgQ7A3L2kUs2Mu6rq/u6q5r2bV3XWUVxYoVxY4oRaT33mtCryEJqfO8f5wJJJBABkISZu7PdXGRTGaeOXMymbnnPL9zjnEcBxERERERf+Kq6gaIiIiIiFQ0hVwRERER8TsKuSIiIiLidxRyRURERMTvKOSKiIiIiN9RyBURERERv+Muz5WMMeuB/UAhUOA4TtejXT8xMdFp2LDhCTfOV1lZWURGRlb6/Z6q1F++U5/5Rv3lO/WZb9RfvlOf+Ub95bvK7LM5c+bsdBynZmk/K1fI9RrgOM7O8lyxYcOGzJ4924dDV4yJEyeSmppa6fd7qlJ/+U595hv1l+/UZ75Rf/lOfeYb9ZfvKrPPjDEbyvqZyhVERERExO+UN+Q6wDhjzBxjzPCT2SARERERkRNlyrOtrzGmruM46caYWsAvwF2O40w+7DrDgeEASUlJXUaPHn0y2ntUmZmZREVFVfr9nqrUX75Tn/lG/eU79Zlv1F++U5/5Rv3lu8rsswEDBswpa65YuUJuiRsY8yiQ6TjOc2Vdp2vXro5qcqs/9Zfv1Ge+UX/5Tn3mG/WX79Rnvqmo/srPzyctLY2cnJwTb1Q1l5OTQ1hYWIUeMywsjHr16hEcHFzicmNMmSH3mBPPjDGRgMtxnP3er88AHquIBouIiIgEgrS0NKKjo2nYsCHGmKpuzkm1f/9+oqOjK+x4juOwa9cu0tLSaNSoUblvV56a3CRgijFmATAT+N5xnJ+Os50iIiIiAScnJ4eEhAS/D7gngzGGhIQEn0fBjzmS6zjOWqDD8TZMRERERFDAPQHH03daQkxEREQkAATaBDqFXBERERHxOwq5IiIiIgHEcRz++te/0rZtW9q1a8enn34KwJYtW+jfvz8dO3akbdu2/P777xQWFnL99dcfvO6LL75Yxa0vP1+29RURERGRE/Svb5ewdHNGhR6zdXIM/zy/Tbmu+9VXXzF//nwWLFjAzp076datG/379+fjjz/mzDPP5O9//zuFhYVkZ2czf/580tPTWbx4MQB79+6t0HafTH4zkjt/015W7y2s6maIiIiIVGtTpkzhyiuvJCgoiKSkJE477TRmzZpFt27dePfdd3n00UdZtGgR0dHRNG7cmLVr13LXXXfx008/ERMTU9XNLze/Gcl95qfl7Nydx01V3RARERGRoyjviGtl69+/P5MnT+b777/n+uuv57777uO6665jwYIF/Pzzz7z55pt89tlnjBw5sqqbWi5+M5IbHOSiwFPVrRARERGp3vr168enn35KYWEhO3bsYPLkyXTv3p0NGzaQlJTEzTffzE033cTcuXPZuXMnHo+HSy65hCeeeIK5c+dWdfPLzW9GcoODXBT6tkOxiIiISMAZMmQI06ZNo0OHDhhjeOaZZ6hduzajRo3i2WefJTg4mKioKN5//33S09MZNmwYHo8dSfzPf/5Txa0vPz8KuYYCj1KuiIiISGkyMzMBu7HCs88+y7PPPlvi50OHDmXo0KFH3O5UGr0tTuUKIiIiIuJ3FHJFRERExO/4TcgNcRvV5IqIiIgI4EchNzjIRaFqckVEREQEPwu5Bcq4IiIiIoIfhVx3kFFNroiIiIgAfhRyQzTxTERERES8/CbkBge5cEB1uSIiIiJVqKCgoKqbAPhZyAXIL9RwroiIiEhpLrroIrp06UKbNm0YMWIEAD/99BOdO3emQ4cOnH766YDdOGLYsGG0a9eO9u3b8+WXXwIQFRV18FhffPEF119/PQDXX389t956Kz169OCRRx5h5syZ9OrVi06dOtG7d29WrFgBQGFhIffffz9t27alffv2vPrqq/z2229cdNFFB4/7yy+/MGTIkBN+rH614xnYkBsWHFTFrREREREpw48PwtZFFXvM2u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5OT4H0mMJCwujXr16Pt3Gb0KutvUVERGR6io4OPjg1rn+buLEiXTq1Kmqm+FP5Qr2oRR4NJIrIiIiEuj8KORqW18RERERsfwm5GoJMREREREp4jchV0uIiYiIiEgRvwm52vFMRERERIr4Uci1D0Xr5IqIiIiI34Xc/ALV5IqIiIgEOr8JuUEug8toCTERERER8aOQC+A2KlcQERERET8LuUEulSuIiIiIiJ+FXLfR6goiIiIi4mchN8hlFHJFRERExL9CrtulmlwRERER8beQa6BA2/qKiIiIBDz/Crku1eSKiIiIiJ+FXNXkioiIiAj4W8g1kKdyBREREZGA51ch1+2C/AKN5IqIiIgEOv8LuSpXEBEREQl4/hVyjWpyRURERMTPQm6QC/JVkysiIiIS8Pwq5KpcQURERETAz0JukFHIFRERERE/C7lul1G5goiIiIiUP+QaY4KMMfOMMd+dzAadCLeBPI3kioiIiAQ8X0Zy7wGWnayGVIQg1eSKiIiICOUMucaYesC5wNsntzknRptBiIiIiAiUfyT3JeABoFonSLcx5HtUkysiIiIS6IzjHD0UGmPOA85xHOd2Y0wqcL/jOOeVcr3hwHCApKSkLqNHj6741h7D6CWZ/LzJMPLMCIwxlX7/p5rMzEyioqKquhmnFPWZb9RfvlOf+Ub95Tv1mW/UX76rzD4bMGDAHMdxupb2M3c5bt8HuMAYcw4QBsQYYz50HOea4ldyHGcEMAKga9euTmpq6om1+jiMXTMOh3z69T8Nd5BfLRxxUkycOJGq+D2dytRnvlF/+U595hv1l+/UZ75Rf/muuvTZMZOg4zgPOY5Tz3GchsAVwG+HB9zqwu0dvNU
"text/plain": [
"<Figure size 864x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"NUMBER OF HIDDEN LAYERS = 2\n",
"HIDDEN LAYER SIZES = (437, 46)\n",
"REGULARIZATION = 0.001\n",
"\n",
"50 EPOCHS\n",
"train_accuracy = 64.22%\n",
"val_accuracy = 61.54%\n",
"test_accuracy = 72.59%\n",
"\n",
"200 EPOCHS\n",
"train_accuracy = 86.25%\n",
"val_accuracy = 61.54%\n",
"test_accuracy = 78.76%\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsMAAAFzCAYAAADbrgSqAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAABq3UlEQVR4nO3dd3iT1/3+8fex5L1tsBm22XvvEUJM9iaD7AXZXWnT3W93fmmTNm3apEmz9yK7TUN2gAQSIIwwA4QNZhkweG+d3x9HBtvY2AKDDLpf16UL6dGjR0cH2b519HnOMdZaRERERERCUViwGyAiIiIiEiwKwyIiIiISshSGRURERCRkKQyLiIiISMhSGBYRERGRkKUwLCIiIiIhyxusJ27Tpo3t3LlzUJ67uLiY2NjYoDz38Uj9FTj1WWDUX4FTnwVG/RUY9Vfg1GeBOdb9tXDhwt3W2rYN3Re0MNy5c2cWLFgQlOeeOXMm2dnZQXnu45H6K3Dqs8CovwKnPguM+isw6q/Aqc8Cc6z7yxizqbH7VCYhIiIiIiFLYVhEREREQpbCsIiIiIiErCZrho0xUcDnQKR//zestb+vt89k4D5gq3/TQ9baJ1u2qSIiIiIntsrKSnJycigrKwt2U46qxMREVq5c2eLHjYqKIiMjg/Dw8GY/pjkn0JUDp1pri4wx4cBsY8z71tq59fZ71Vr7/QDaKyIiIiK15OTkEB8fT+fOnTHGBLs5R01hYSHx8fEtekxrLXv27CEnJ4cuXbo0+3FNlklYp8h/M9x/sYfXTBERERFpTFlZGampqSd0ED5ajDGkpqYGPKrerJphY4zHGLMYyAU+ttbOa2C3S40xS40xbxhjMgNqhYiIiIgAKAgfgcPpO2Nt8wd5jTFJwNvAD6y1y2ttTwWKrLXlxpjbgCustac28PhbgVsB0tPTh02dOjXgBreEoqIi4uLigvLcxyP1V+DUZ4FRfwVOfRYY9Vdg1F+Ba6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w7ab9KkSUyaNOmg7bVHfwHGjBnDt99+u//23XffDYDX6+X+++/n/vvvP+gYs2fP5pZbbmnydQQi5MJwvEaGRURERI47w4YNIzY2lr///e8tetyQC8OxqhkWEREROe4sXLjwqBw35GqGYyI8GDQyLCIiIiIhGIaNMUR5FYZFRESkdbLWBrsJx63D6buQC8MA0V6jMgkRERFpdaKiotizZ48C8WGw1rJnzx6ioqICelzI1QwDGhkWERGRVikjI4OcnBx27doV7KYcVWVlZQGH1uaIiooiIyMjoMeEZBiO9hiFYREREWl1wsPD9y97fCKbOXMmQ4YMCXYzgBAtk9DIsIiIiIhAiIZh1QyLiIiICIRyGNbIsIiIiEjIC8kwrDIJEREREYGQDcNuZFjTloiIiIiEtpAMw9FesBZKKqqD3RQRERERCaKQDMNRHgNAsUolREREREJaSIbhaK8Lw4UKwyIiIiIhLUTDsPtX06uJiIiIhLYmw7AxJsoY85UxZokxZoUx5o8N7BNpjHnVGLPWGDPPGNP5qLS2hdSMDGtGCREREZHQ1pyR4XLgVGvtIGAwcLYxZnS9fW4C9lpruwP/AP7Soq1sYVE1I8MKwyIiIiIhrckwbJ0i/81w/6X+nGQTgef8198ATjPGmBZrZQvbPzKsMgkRERGRkNasmmFjjMcYsxjIBT621s6rt0tHYAuAtbYKyAdSW7CdLSpKZRIiIiIiAphAFp4wxiQBbwM/sNYur7V9OXC2tTbHf3sdMMpau7ve428FbgVIT08fNnXq1CN+AYdjb0ERd35pmNQjnPO7RQSlDceToqIi4uLigt2M44r6LDDqr8CpzwKj/gqM+it
"text/plain": [
"<Figure size 864x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"NUMBER OF HIDDEN LAYERS = 3\n",
"HIDDEN LAYER SIZES = (2166, 286, 38)\n",
"REGULARIZATION = 0.1\n",
"\n",
"50 EPOCHS\n",
"train_accuracy = 56.48%\n",
"val_accuracy = 59.62%\n",
"test_accuracy = 64.48%\n",
"\n",
"200 EPOCHS\n",
"train_accuracy = 76.48%\n",
"val_accuracy = 59.62%\n",
"test_accuracy = 77.61%\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAr8AAAFzCAYAAAA322G8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAABaDElEQVR4nO3dd3xUVf7/8deZkt4ghNB7l04QBMGg2Puqu7quit11dV1dt7j78+sWt7pNV3eVVVdddbGsvaGoUVSUJghI7x1CSW8zc35/nAk1gQwJSch9Px8PHiSTmXtPztzMvOfczznXWGsREREREfECX1M3QERERESksSj8ioiIiIhnKPyKiIiIiGco/IqIiIiIZyj8ioiIiIhnKPyKiIiIiGcEGnNnbdq0sd26dWvMXQJQUlJCcnJyo+/3WKY+i436K3bqs9iov2KnPouN+it26rPYNHZ/zZkzJ99am3Xg7Y0afrt168bs2bMbc5cA5OXlkZub2+j7PZapz2Kj/oqd+iw26q/Yqc9io/6KnfosNo3dX8aYtTXdrrIHEREREfEMhV8RERER8QyFXxERERHxjEat+RURERGRvaqqqtiwYQPl5eVN3ZSjLj09ncWLFzf4dhMSEujUqRPBYLBO91f4FREREWkiGzZsIDU1lW7dumGMaermHFVFRUWkpqY26DattezYsYMNGzbQvXv3Oj1GZQ8iIiIiTaS8vJzMzMwWH3yPFmMMmZmZMY2cK/yKiIiINCEF3/qJtf8UfkVEREQ8LCUlpamb0KgUfkVERETEMxR+RURERARrLT/60Y8YOHAggwYN4rnnngNg8+bNjB8/nqFDhzJw4ECmT59OOBxm0qRJe+7717/+tYlbX3da7UFERESkGfjl64v4elNhg25zQIc07jn3uDrd96WXXmLevHnMnz+f/Px8Ro4cyfjx43n22Wc5/fTT+fnPf044HKa0tJR58+axceNGFi5cCMDu3bsbtN1HU4sf+d1SUM68bSHKq8JN3RQRERGRZuuTTz7hsssuw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ickwZMWIEycnJ/PnPf26wbXoi/Mb7jcoeRERERI4xc+bMafBteqbmtzIcIRSONHVTRERERKQJeSL8xvnd8hulGv0VERGRZsZa29RNOKbF2n+eCL/xbl1lrfUrIiIizUpCQgI7duxQAD5C1lp27NhBQkJCnR/jkZpf97/Cr4iIiDQnnTp1YsOGDWzfvr2pm3LUlZeXxxRS6yohIYFOnTrV+f4eCb/RsgeFXxEREWlGgsHgnksIt3R5eXkMGzasqZvhjbKHuOqR3yotdyYiIiLiZZ4Iv9Ujv2WVWu1BRERExMs8En7d/7rQhYiIiIi3eSL8Vi91VqalzkREREQ8zRPhV6s9iIiIiAh4JvxqtQcRERER8Uj43bvag8KviIiIiJd5IvwGfeAzKnsQERER8TpPhF9jDElxAZU9iIiIiHicJ8IvQELQr4tciIiIiHicZ8JvUpxfI78iIiIiHuep8KuaXxERERFv80z4TYzza7UHEREREY/zTvgNquxBRERExOs8E35V9iAiIiIingm/iXEBlT2IiIiIeJx3wm/QR2mlljoTERER8TLPhN+kuIDKHkREREQ8zjPhV6s9iIiIiIh3wm/QT1XYUhWONHVTRERERKSJeCb8JsX5AbTcmYiIiIiHeSb8JkbDb7lKH0REREQ8yzvhN6iRXxERERGv80z43Vv2oOXORERERLzKM+E3MS4AqOxBRERExMs8E3414U1EREREPBN+VfMrIiIiIocNv8aYx40x24wxC/e5rbUx5j1jzPLo/62ObjPrT6s9iIiIiEhdRn6fAM444LafAu9ba3s
"text/plain": [
"<Figure size 864x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"NUMBER OF HIDDEN LAYERS = 3\n",
"HIDDEN LAYER SIZES = (2166, 286, 38)\n",
"REGULARIZATION = 0.001\n",
"\n",
"50 EPOCHS\n",
"train_accuracy = 56.51%\n",
"val_accuracy = 57.69%\n",
"test_accuracy = 67.57%\n",
"\n",
"200 EPOCHS\n",
"train_accuracy = 83.33%\n",
"val_accuracy = 57.69%\n",
"test_accuracy = 76.83%\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAr8AAAFzCAYAAAA322G8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAABSUklEQVR4nO3dd3hc1Z3/8feZpi5ZxZZlyxXb4I6xbDrIhF5CT0IIARJg2SSksJtC2PxSYJNsSEjfJE4ggRBiEkqWDqYY00xxN+692yq2ujTt/P44I1m2JVsjyZLs+3k9jx5Jd+7cOXPmSvOZ7z33XGOtRURERETEC3y93QARERERkZ6i8CsiIiIinqHwKyIiIiKeofArIiIiIp6h8CsiIiIinqHwKyIiIiKeEejJBysoKLDDhw/vyYcEoK6ujoyMjB5/3KOZ+iw56q/kqc+So/5KnvosOeqv5KnPktPT/TV//vxya23/A5f3aPgdPnw4H374YU8+JABz5syhtLS0xx/3aKY+S476K3nqs+Sov5KnPkuO+it56rPk9HR/GWM2tbVcwx5ERERExDMUfkVERETEMxR+RURERMQzenTMr4iIiIjsE4lE2Lp1K42Njb3dlCMuJyeHFStWdPt2U1NTKS4uJhgMdmh9hV8RERGRXrJ161aysrIYPnw4xpjebs4RVVNTQ1ZWVrdu01pLRUUFW7duZcSIER26j4Y9iIiIiPSSxsZG8vPzj/nge6QYY8jPz0+qcq7wKyIiItKLFHy7Jtn+U/gVERER8bDMzMzebkKPUvgVEREREc9Q+BURERERrLV8/etfZ8KECUycOJHHHnsMgB07dnDWWWdx4oknMmHCBN58801isRg33XRTy7o///nPe7n1HafZHkRERET6gO8/8xHLt1d36zbHDcrmu5eN79C6Tz75JIsWLWLx4sWUl5czbdo0zjrrLB599FEuuOAC7r77bmKxGPX19SxatIht27axbNkyAPbu3dut7T6SjvnK786qRhbtjtIYifV2U0RERET6rLfeeovrrrsOv99PYWEhZ599Nh988AHTpk3jz3/+M9/73vdYunQpWVlZjBw5kvXr13PHHXfw4osvkp2d3dvN77BjvvL79tpyfrGgiSvOaWR4QUZvN0dERESkTR2t0Pa0s846i7lz5/Lcc89x0003ceedd/LZz36WxYsX89JLL/H73/+ef/zjHzz44IO93dQOOeYrv+khPwANqvyKiIiItOvMM8/kscceIxaLUVZWxty5c5k+fTqbNm2isLCQW2+9lVtuuYUFCxZQXl5OPB7n6quv5t5772XBggW93fwOO+Yrv2mJ8FsfVvgVERERac+VV17Ju+++y+TJkzHG8JOf/ISBAwfy0EMPcd999xEMBsnMzOThhx9m27Zt3HzzzcTjcQB+9KMf9XLrO+7YD7/BROVX4VdERETkILW1tYC7WMR9993Hfffdt9/tN954IzfeeONB9zuaqr2teWDYg8v3GvYgIiIiIsd8+N037CHayy0RERERkd7mmfCrYQ8iIiIictjwa4x50Biz2xizrNWy+4wxK40xS4wxTxlj+h3RVnZBelCzPYiIiIiI05HK71+ACw9YNhuYYK2dBKwG7urmdnUbzfYgIiIiIs0OG36ttXOBygOWvWytbR5EOw8oPgJt6xYpAR8GDXsQERERETDW2sOvZMxw4Flr7YQ2bnsGeMxa+0g7970NuA2gsLBw6qxZs7rU4M74t9m1lBYHuW5sSo8/9tGqtraWzMzM3m7GUUP9lTz1WXLUX8lTnyVH/ZW87uiznJwcRo0a1U0t6ttisRh+v/+IbHvt2rVUVVXtt2zGjBnzrbUlB67bpXl+jTF3A1Hgb+2tY62dCcwEKCkpsaWlpV15yE5Jee158goHUVo6sccf+2g1Z84ceuO1Olqpv5KnPkuO+it56rPkqL+S1x19tmLFCrKysrqnQX3cnj17jthzTU1NZcqUKR1at9OzPRhjbgIuBa63HSkf96IUPzRoqjMRERGRNl1xxRVMnTqV8ePHM3PmTABefPFFTjrpJCZPnszHPvYxwFW7b775ZiZOnMikSZN44oknAPargD/++OPcdNNNANx0003cfvvtnHzyyXznO9/h/fff59RTT2XKlCmcdtpprFq1CnBV4f/8z/9kwoQJTJo0iV//+te89tprXHHFFS3bnT17NldeeWWXn2unKr/GmAuB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kSfCb8jvpt+oV/VXRERE+pg+fqHcPi/Z/vNE+E1x8yrTqOnOREREpA9JTU2loqJCAbiTrLVUVFSQmpra4ft4ZMyv+665fkVERKQvKS4uZuvWrZSVlfV2U464xsbGpEJqR6WmplJcXNzh9T0RfluGPSj8ioiISB8SDAZbLiF8rJszZw5Tpkzp7WZ4a9hDg8b8ioiIiHiaR8Kvq/w2qPIrIiIi4mkeCb/uuy50ISIiIuJtngi/zWN+NexBRERExNs8EX5bxvxq2IOIiIiIp3kk/Gq2BxERERHxSPgNabYHEREREcEj4TfoA5/RsAcRERERr/NE+DXGkB4KaNiDiIiIiMd5IvwCpAb9NEQ01ZmIiIiIl3km/KaH/Br2ICIiIuJxngq/GvYgIiIi4m2eCb9u2IPCr4iIiIiXeSb8atiDiIiIiHgq/GrYg4iIiIi3eSb8atiDiIiIiHgm/GrYg4iIiIh4KPwGqA9rnl8RERERL/NM+E0LadiDiIiIiNd5J/wG/URilkgs3ttNEREREZFe4pnwmx7yA6j6KyIiIuJhngm/ac3hVye9iYiIiHiWd8Jv0IVfzfUrIiIi4l2eCb/pqvyKiIiIeJ5nwm9aKABAQ0TTnYmIiIh4lXfCr4Y9iIiIiHieZ8Kvhj2IiIiIiGfCb5qmOhMRERHxPO+EXw17EBEREfG8w4ZfY8yDxpjdxphlrZblGWNmG2PWJL7nHtlmdp2GPYiIiIhIRyq/fwE
"text/plain": [
"<Figure size 864x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"for result in all_results:\n",
" print_result(result)\n",
" get_plot(result)"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABIEAAAJcCAYAAABuRrQKAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmp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5bOVhgYKAaExNzvnbfrdTW1uLh4XG+hyE5D8hjf3Ejj//Fizz2Fzfy+F+8yGN/cSOP/8WLPPYXL7/XY79///4SVVWDLM07byJQTEwM+/btO1+771Y2bdrEpEmTzvcwJOcBeewvbuTxv3iRx/7iRh7/ixd57C9u5PG/eJHH/uLl93rsFUXJtDZPloNJJBKJRCKRSCQSiUQikVwESBFIIpFIJBKJRCKRSCQSieQiQIpAEolEIpFIJBKJRCKRSCQXAectE8gSTU1N5OTkUF9ff76HYhc+Pj6kpKSc72FcELi6uhIREYGTk9P5HopEIpFIJBKJRCKRSCSSVlxQIlBOTg5eXl7ExMSgKMr5Ho7NVFdX4+Xldb6Hcd5RVZXS0lJycnLo2bPn+R6ORCKRSCQSiUQikUgkklZcUOVg9fX1BAQE/K4EIEkLiqIQEBDwu3NySSQSiUQikUgkEolEcjFwQYlAgBSAfufI4yeRSCQSiUQikUgkEsmFyQUnAkkkEolEIpFIJBKJRCKRSLofKQK14dZbbyU4OJgBAwZYXeaWW27hu+++azc9Ly+Pq666yuI6kyZNYt++fe2mf/zxx9x3331dH3ArYmJiKCkp6ZZtSSQSiUQikUgkEolEIvljIUWgNtxyyy2sWbOmS+uGhYVZFIf+KOh
"text/plain": [
"<Figure size 1440x720 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"f = plt.figure()\n",
"f.set_figwidth(20)\n",
"f.set_figheight(10)\n",
"\n",
"for result in all_results:\n",
" if result['regularization'] == 0.1:\n",
" plt.plot(result['accuracy_curve'], label=f\"{result['num_layers']} hidden layers\")\n",
"\n",
"plt.legend(loc='best')\n",
"plt.xlabel('number of iterations')\n",
"plt.title('accuracy for regularization = 0.1')\n",
"plt.grid()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABIEAAAJcCAYAAABuRrQKAAAAOXRFWHRTb2Z0d2FyZQ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Lch3Ke+J6lKyoT1ACTR0CMH8WfW+nWSjv2WKUxt1NPZmQlNnalrVa5WZggH7sW8Bs/TaQZXkr8A7K/UpDKW17qdW6X6Bkft2C0lOpmrY9pQRBEARBMECS5QvJthYEQRAEQehIUqZgzwNCZVk+d7WP50LpZzWLBowvo7eSIAiCIAjCP4rIBBIEQRAE4XI8CBz7JwSAJEmaIUmSsSRJtsDbwCYRABIEQRAE4VpiqKGkIAiCIAjCeUmSlILSuHj61T2SC3Y/Sl+ZRpSytoeu6tEIgiAIgiD8xUQ5mCAIgiAIgiAIgiAIwjVAlIMJgiAIgiAIgiAIgiBcA65aOZiDg4Ps4+NztXZ/RVVWVmJubn61D0O4CsS9v7aJ+3/tEvf+2ibu/7VL3Ptrm7j/1y5x769d/9R7HxkZWSDLsqOhZVctCOTj40NERMTV2v0VtXv3bsLDw6/2YQhXgbj31zZx/69d4t5f28T9v3aJe39tE/f/2iXu/bXrn3rvJUlK7WyZKAcTBEEQBEEQBEEQBEG4BoggkCAIgiAIgiAIgiAIwjVABIEEQRAEQRAEQRAEQRCuAVetJ5Ah9fX1ZGRkUFNTc7UP5aJYW1sTGxt7tQ/jb8HExAQPDw+0Wu3VPhRBEARBEARBEARBEFr5WwWBMjIysLS0xMfHB0mSrvbhXLDy8nIsLS2v9mFcdbIsU1hYSEZGBr6+vlf7cARBEARBEARBEARBaOVvVQ5WU1ODvb39PyoAJLSQJAl7e/t/XCaXIAiCIAi
"text/plain": [
"<Figure size 1440x720 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"f = plt.figure(figsize=(20,10))\n",
"f.set_figwidth(20)\n",
"f.set_figheight(10)\n",
"\n",
"for result in all_results:\n",
" if result['regularization'] == 0.001:\n",
" plt.plot(result['accuracy_curve'], label=f\"{result['num_layers']} hidden layers\")\n",
"\n",
"plt.legend(loc='best')\n",
"plt.xlabel('number of iterations')\n",
"plt.title('accuracy for regularization = 0.001')\n",
"plt.grid()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"No artists with labels found to put in legend. Note that artists whose label start with an underscore are ignored when legend() is called with no argument.\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA3MAAAHgCAYAAAAPJDS+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAA9kElEQVR4nO3de7TdZX3v+/cHkpZoFBAopVwaUQQsVCSIsL00WLeXYo9ixbrBoUiPDIrKtsXdoy1D0e5qavV4abfaygb16FYsCm2xIpzWdazKNdxvUUrTbagVLyBNkRTi9/wxnyWT5VxZK4uVzPWsvF9jzDF/8/k9v9/v+WbqDJ88v0uqCkmSJElSX3YY9wAkSZIkSVvOMCdJkiRJHTLMSZIkSVKHDHOSJEmS1CHDnCRJkiR1yDAnSZIkSR1aMu4BbM922WWXeuITnzjuYcyrf//3f+fRj370uIcxr6ypD9bUj8VYlzX1wZr6YE19WIw1wcKsa82aNd+rqj1GrTPMjdGee+7J1VdfPe5hzKuJiQlWrVo17mHMK2vqgzX1YzHWZU19sKY+WFMfFmNNsDDrSvLP063zNEtJkiRJ6pBhTpIkSZI6ZJiTJEmSpA55zZwkSZIkbQMPPPAA69ev5/777/+pdTvttBP77LMPS5cunfX+DHOSJEmStA2sX7+exzzmMaxYsYIkP2mvKr7//e+zfv16Hv/4x896f55mKUmSJEnbwP33389uu+32sCAHkITddttt5Izd5hjmJEmSJGkbmRrkZmrfHMOcJEmSJHXIMCdJkiRJHTLMSZIkSdI2UlVb1L45hjlJkiRJ2gZ22mknvv/97/9UcJu8m+VOO+20Rfvz0QSSJEmStA3ss88+rF+/nu9+97s/tW7yOXNbwjAnSZIkSdvA0qVLt+g5cjPxNEtJkiRJ6pBhTpIkSZI6ZJiT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s_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"data = {\n",
" '1 hidden layer,\\nalpha=0.1' : 226,\n",
" '1 hidden layer,\\nalpha=0.001' : 241,\n",
" '3 hidden layers,\\nalpha=0.1' : 331,\n",
" '3 hidden layers,\\nalpha=0.001' : 319,\n",
" '5 hidden layers,\\nalpha=0.1' : 2801,\n",
" '5 hidden layers,\\nalpha=0.001' : 2640\n",
"}\n",
"\n",
"f = plt.figure(figsize=(14,8))\n",
"\n",
"plt.barh(list(data.keys()), list(data.values()))\n",
"\n",
"plt.legend(loc='best')\n",
"plt.xlabel('time [s]')\n",
"plt.xticks(np.arange(0, 2900, step=200))\n",
"plt.grid()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 53,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAzIAAAHtCAYAAADCwkv+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAxXklEQVR4nO3dfbhdZX0n/O+PEAgYBExqFAImowyamilIBvCxtUmtNUyfgq3vqMWno2mvilodvRqfOghMW5l22lpH7bRPS7UvNEVsLRUs2JYM7YiVgLSRN42INaEKpECNFhR7P3/sFTgczsnZOznnJOucz+e6zpW91rrXuu9zfnvv7O9eb9VaCwAAQJ8ctL8HAAAAMCpBBgAA6B1BBgAA6B1BBgAA6B1BBgAA6B1BBgAA6B1BBgAA6B1BBoChVNXmqrqvqg7d32MBAEEGgClV1Yok35ekJTlzFvs9eLb6AqBfBBkAhvHjST6d5ENJztk9s6qOq6o/qap7qmpnVb1/zLI3VNWtVfX1qrqlqp7TzW9V9Ywx7T5UVT/fPV5bVdur6mer6qtJfreqjq6qj3d93Nc9Xj5m/SdV1e9W1V3d8o918z9XVT8ypt3Cqrq3qk6eqT8SALNHkAFgGD+e5A+7nxdV1bK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nljHl+W5LJpGREAAHBAesITnvDI482bN+cv//Ivc9111+Xwww/P2rVrJ7wXzKGHHvrI4wULFuRf//Vfp2UsQ90QEwAAmH+OOOKIfP3rX59w2QMPPJCjjz46hx9+eG677bZ8+tOfntWxTddVywAAgBl250U/PKv9LVmyJM973vPy7Gc/O4cddliWLVv2yLL169fnf/2v/5VnPetZOfHEE3P66afP6tgEGQAAYFKXXHLJhPMPPfTQfOITn5hw2e7zYJYuXZrPfe5zj8x/+9vfPm3jcmgZAADQO4IMAADQOw4t66zYeMWM9zHbxzQCAMBcZY8MAADQO4IMAADQO4IMAADQO86RAQCAvjj/yGne3gPTurnFixdn165d07rNydgjAwAA9I49MgAAwIQ2btyY4447Lm984xuTJOeff34OPvjgXHPNNbnvvvvy7W9/Oz//8z+fs846a9bHJsgAMK+43D7A8F7xilfkZ37mZx4JMpdeemmuuuqqvPnNb84Tn/jE3HvvvTn99NNz5plnpqpmdWyCDPPabHygSXyoAQD66eSTT87dd9+du+66K/fcc0+OPvroPOUpT8lb3/rWXHvttTnooIOyY8eOfO1rX8tTnvKUWR2bIAMAAEzqZS97WS677LJ89atfzSte8Yr84R/+Ye65557ccMMNWbhwYVasWJEHH3xw1sclyAAAAJN6xStekTe84Q25995787//9//OpZdemic/+clZuHBhrrnmmnz5y1/eL+MSZAAAoC+m+XLJw/ju7/7ufP3rX8+xxx6bpz71qXn1q1+dH/mRH8nq1auzZs2aPPOZz5z1MSWCDAAAMIWtW7c+8njp0qW57rrrJmw3W/eQSdxHBgAA6CF7ZIB5yRXrAKDf7JEBAAB6R5ABAAB6R5ABAAB6R5ABAAB6x8n+AADQE6s/vHpat7f1nK17XH7//ffnkksuyU//9E+PvO33vve92bBhQw4//PC9Hd4e2SMDAABM6P77788HP/jBvVr3ve99b775zW9O84geZY8MAABz2mxccn+uXm5/48aN+eIXv5iTTjopL3zhC/PkJz85l156aR566KH86I/+aC644IJ84xvfyMtf/vJs37493/nOd/Jf/+t/zde+9rXcddddWbduXZYuXZprrrlm2scmyAAAABO66KKL8rnPfS433XRTrr766lx22WX5zGc+k9ZazjzzzFx77bW55557cswxx+SKKwaB8YEHHsiRRx6ZX/3VX80111y
"text/plain": [
"<Figure size 1008x576 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"f = plt.figure(figsize=(14,8))\n",
"\n",
"X_axis = np.arange(len(list(data.keys())))\n",
"\n",
"Ytrain = [result['full_train_accuracy'] for result in all_results]\n",
"Yval = [result['full_val_accuracy'] for result in all_results]\n",
"Ytest = [result['full_test_accuracy'] for result in all_results]\n",
"\n",
"plt.bar(X_axis - 0.2, Ytrain, 0.2, label='train')\n",
"plt.bar(X_axis, Yval, 0.2, label='val')\n",
"plt.bar(X_axis + 0.2, Ytest, 0.2, label='test')\n",
"\n",
"plt.xticks(X_axis, list(data.keys()))\n",
"plt.yticks(np.arange(0, 1, step=0.1))\n",
"plt.legend(loc='best')\n",
"plt.title('Accuracy')\n",
"plt.grid()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.5 64-bit",
"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.10.5"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "7e1998ff7f8aa20ada591c520b972326324e5ea05489af9e422744c7c09f6dad"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}