2021-04-06 21:14:45 +01:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib as mpl\n",
2021-04-27 23:46:23 +01:00
"from matplotlib import pyplot as plt\n",
"\n",
"fig_dpi = 200"
2021-04-06 21:14:45 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Different Train/Validation/Test Splits\n",
"\n",
"## Index\n",
"0. train prop\n",
"1. val prop\n",
"2. test prop\n",
"3. top-1 accuracy\n",
"4. top-5 accuracy\n",
"5. last val loss\n",
"6. last val accuracy"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"split_results = np.array([\n",
" [50, 5, 45, 8.14, 20.7, 5.77, 8.29],\n",
" [50, 25, 25, 7.91, 20.9, 5.59, 8.41],\n",
" [70, 15, 15, 15.81, 34.62, 4.92, 16.82],\n",
" [80, 10, 10, 20.94, 44.1, 4.39, 24.45],\n",
" [90, 5, 5, 20.62, 45.19, 4.17, 30.29]\n",
"])"
]
},
2021-04-27 23:46:23 +01:00
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<Figure size 1000x600 with 1 Axes>",
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg height=\"207.754375pt\" version=\"1.1\" viewBox=\"0 0 352.355625 207.754375\" width=\"352.355625pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <metadata>\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <cc:Work>\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n <dc:date>2021-04-27T22:29:53.069840</dc:date>\n <dc:format>image/svg+xml</dc:format>\n <dc:creator>\n <cc:Agent>\n <dc:title>Matplotlib v3.4.1, https://matplotlib.org/</dc:title>\n </cc:Agent>\n </dc:creator>\n </cc:Work>\n </rdf:RDF>\n </metadata>\n <defs>\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"M 0 207.754375 \nL 352.355625 207.754375 \nL 352.355625 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"M 72.790625 170.198125 \nL 345.155625 170.198125 \nL 345.155625 22.318125 \nL 72.790625 22.318125 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"patch_3\">\n <path clip-path=\"url(#pa6e4a1a87d)\" d=\"M 72.790625 163.476307 \nL 119.51506 163.476307 \nL 119.51506 141.070246 \nL 72.790625 141.070246 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_4\">\n <path clip-path=\"url(#pa6e4a1a87d)\" d=\"M 72.790625 135.468731 \nL 118.194837 135.468731 \nL 118.194837 113.06267 \nL 72.790625 113.06267 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_5\">\n <path clip-path=\"url(#pa6e4a1a87d)\" d=\"M 72.790625 107.461155 \nL 163.541648 107.461155 \nL 163.541648 85.055095 \nL 72.790625 85.055095 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_6\">\n <path clip-path=\"url(#pa6e4a1a87d)\" d=\"M 72.790625 79.45358 \nL 192.988374 79.45358 \nL 192.988374 57.047519 \nL 72.790625 57.047519 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_7\">\n <path clip-path=\"url(#pa6e4a1a87d)\" d=\"M 72.790625 51.446004 \nL 191.151541 51.446004 \nL 191.151541 29.039943 \nL 72.790625 29.039943 \nz\n\" style=\"fill:#1f77b4;\"/>\n </g>\n <g id=\"patch_8\">\n <path clip-path=\"url(#pa6e4a1a87d)\" d=\"M 119.51506 163.476307 \nL 191.61075 163.476307 \nL 191.61075 141.070246 \nL 119.51506 141.070246 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_9\">\n <path clip-path=\"url(#pa6e4a1a87d)\" d=\"M 118.194837 135.468731 \nL 192.75877 135.468731 \nL 192.75877 113.06267 \nL 118.194837 113.06267 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_10\">\n <path clip-path=\"url(#pa6e4a1a87d)\" d=\"M 163.541648 107.461155 \nL 271.512978 107.461155 \nL 271.512978 85.055095 \nL 163.541648 85.055095 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_11\">\n <path clip-path=\"url(#pa6e4a1a87d)\" d=\"M 192.988374 79.45358 \nL 325.929151 79.45358 \nL 325.929151 57.047519 \nL 192.988374 57.047519 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"patch_12\">\n <path clip-path=\"url(#pa6e4a1a87d)\" d=\"M 191.151541 51.446004 \nL 332.185863 51.446004 \nL 332.185863 29.039943 \nL 191.151541 29.039943 \nz\n\" style=\"fill:#ff7f0e;\"/>\n </g>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_1\">\n <path clip-path=\"url(#pa6e4a1a87d)\" d=\"M 72.790625 170.198125 \nL 72.790625 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_2\">\n <defs>\n <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m67ec1256db\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"72.790625\" xl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Hjs29nPK7WYmxniv3UV5jvWi8xh+uYvg75XUYlFmpn05JGqdTxoWTmf/bqqKI2B44gbFJV+dSXg9zqvpXBjah/L6bVyhormsLymtrnWpXUhKby6p61wOeQ/m51wV+HREvyswza9Xcy9jr9nWMzcjePHN7ww2dYmrjTsp7wuOqx4dExKnZY7fvcfg05YtAgIspfz9B+Ztp9JDZAjgjInbO4S3ddh7lOV0P2Kfa12oWbih/k6OyatPje1qWKs/ZsZQEtJEIX1bt36raVwoO971re+AwyqoBd1CS7bsof+u7UP7eZgFfj4j5mfntdhVFxKsp/wcaw0vmU9bm/jvlPebZlL8RKJ8LNo6I52bmQ92CjIhDGJtw72rK7//BKs5HmPj7T1cRsTzls8WOtd03Ar8F7qe8Vz6L8vOvA5wUEa/JzBN6qH5F4FeU3/2DVZ3XUX6e3Sj/SwAOonwJ3m5Z0mMpX5A0/J3yP/1Oyu9yTcprZaMeYtJ4TXZG782bt8XrRvkHew9j33K+pOn4h2rHLuyhvm1ZtKX2QuDpbcquTenO+phWKsoH6N/V6nkQeDswvUXZGcBewIktjm1Uq2NOj8/JnNo5G/VQ5hHKh/s3AtFUbrmmx5+iJOArt6k3qp+l3iL5rGE+35QPAI2WzQV0bxV5cu169wMrTfA1eGCtvqO7lJ3B2IfPBG4Bntei3B6UOQAa5f7U6rVTlT2r6Xe5APhIc/nm3+U4fr76a7Dta6pLHW9qquMxrYaURPUwYKsO9axF+WDaqOf0HuPu6W+nOu8I4MXArDbHp1W/8/uruudR1nFuVfbEWgwnAKu2KTezuubX2hxfgZLkNOr6JbBJi3IrV/HXW6dWaVPnnIn8Trs8h8c0/b7PpbTUz5xAnfXf57z
},
"metadata": {
"needs_background": "light"
}
}
],
"source": [
"split_labels = [f\"{int(i[0])}/{int(i[1])}/{int(i[2])}\" for i in split_results]\n",
"\n",
"fig = plt.figure(figsize=(5, 3))\n",
"fig.set_dpi(fig_dpi)\n",
"\n",
"plt.barh(range(len(split_labels)), [i[3] for i in split_results], tick_label=split_labels, label='Top-1')\n",
"plt.barh(range(len(split_labels)), [i[4] - i[3] for i in split_results], tick_label=split_labels, label='Top-5', left=[i[3] for i in split_results])\n",
"\n",
"plt.legend()\n",
"plt.grid(axis='x')\n",
"plt.title('Accuracy for Dataset Split Proportions')\n",
"plt.xlabel('% Test Accuracy')\n",
"plt.ylabel('Dataset Split (Train/Val/Test)')\n",
"\n",
"plt.tight_layout()\n",
"plt.savefig('split-barh.png')\n",
"\n",
"plt.show()"
]
},
2021-04-06 21:14:45 +01:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
2021-04-27 23:46:23 +01:00
"name": "pythonjvsc74a57bd0333605e348ea7c6bf4ca805dbc845da062650cb5bf1d8f33f5f4a9d3bca7d68b",
"display_name": "Python 3.9.3 ('.venv': venv)"
2021-04-06 21:14:45 +01:00
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
2021-04-27 23:46:23 +01:00
"version": "3.9.3"
},
"metadata": {
"interpreter": {
"hash": "333605e348ea7c6bf4ca805dbc845da062650cb5bf1d8f33f5f4a9d3bca7d68b"
}
2021-04-06 21:14:45 +01:00
}
},
"nbformat": 4,
"nbformat_minor": 4
2021-04-27 23:46:23 +01:00
}