{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "43c43807", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import sklearn.datasets as dt\n", "import sklearn.model_selection as ms\n", "import sklearn.svm as sv" ] }, { "cell_type": "code", "execution_count": 8, "id": "da715b7e", "metadata": {}, "outputs": [], "source": [ "IRIS = dt.load_iris()\n", "x = IRIS.data\n", "y = IRIS.target\n", "xtr, xte, ytr, yte, = ms.train_test_split(x, y, train_size = 0.75, random_state = 55)" ] }, { "cell_type": "code", "execution_count": 9, "id": "f39f2761", "metadata": {}, "outputs": [], "source": [ "#Different Kernels:\n", "trACC = []\n", "teACC = []\n", "kernel = []\n", "for i in [\"linear\", \"poly\", \"rbf\", \"sigmoid\"]:\n", " clsfr = sv.SVC(kernel = i, degree = 2)\n", " clsfr.fit(xtr, ytr)\n", " trACC.append(clsfr.score(xtr, ytr))\n", " teACC.append(clsfr.score(xte, yte))\n", " kernel.append(i)" ] }, { "cell_type": "code", "execution_count": 10, "id": "010e416c", "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEGCAYAAABhMDI9AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAoQUlEQVR4nO3deXhU5d3G8e9NIICCRRA3UMBXUbHVqFGr1hVtwQ21LlAUFNBSa1t9r1ZbW5fubtXW17YWwypUxAXFfUesK8GigKhQXIhrRASRnfzeP2awQwgwQE7OJLk/1zVX5px5zpl7GGZ+c7bnUURgZma2WpO0A5iZWWFxYTAzszW4MJiZ2RpcGMzMbA0uDGZmtoamaQfYWNtss0107tw57RhmZvXKlClTPo2I9vm0rXeFoXPnzpSXl6cdw8ysXpH0br5tvSvJzMzW4MJgZmZrSKwwSBom6RNJ09fxuCTdJGm2pNck7ZdUFjMzy1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r+5ffvnlHHXUUYwfP5533nmHI488ssZlmjf/787GoqIiVq5cWeu5Gk9hOOQQGD8+7RRmBWkZsCh7W7BqFW0vuICqsjJiv/0azfn/aVuwYAEdOmSu8R0xYkSqWRpPYSguztzMbC2rTwBol51+qn9/jr7uOqb861/sf9hhKSZrPC655BL69+/PDTfcwNFHH51qFmVODqo/SktLwwP1mCVrxapVvDdgACHRZejQr/aD11czZ85kzz33TDtGnanp9UqaEhF5nffq8RjMbC3Nior4ZMAAdn33XZ57/PG041gdc2Ewsxp98/DDmdm1K11GjGDx8uVpx7E65MJgZjWSxMpBg9jp44/51wMPpB3H6pALg5mt0zdKS5lWUkLJ6NFULlmSdhyrIy4MZrZuEq0HDWLb+fN5sYarcK1hcmEws/XqvNdevHrIIRw2dixzFi5MO47VARcGM9ugDgMHstXixbw2dmzaUeqlefPmUVJSQklJCdtvvz0dOnT4anp5Hgf2J06cyPPPP18HSTMazwVuZrbJttllF17r3p1v33MPr3z3u+zXrt2GF7KvbKjb7Q2ZOHEirVq14pBDDkko4Zq8xWBmednlnHNotnIl744atVEDLFnNpkyZwhFHHMH+++/Pd77zHT78MDNO2U033US3bt3Ye++96d27N++88w633HILN954IyUlJTz77LOJZ/MWg5nlpVWHDsw4/nhOePBBnjzjDI7J9utT79x8M8yeXbvr3HVXuPDCvJtHBD/60Y+47777aN++PXfccQe//OUvGTZsGFdffTVvv/02zZs35/PPP6dNmzYMHjx4o7cyNoe3GMwsb1379WNl06YsHjGC2u/Ts/FYtmwZ06dP59hjj6WkpITf/e53VFRUALD33nvTt29fRo8evc5R3ZLmLQYzy1uzdu14+9RTOWHsWO7u04fTd9kl7UgbbyN+2SclIthrr7144YUX1nrswQcfZNKkSUyYMIHf/va3zJgxo87zeYvBzDbKbr178+UWW9B66FAWpR2mnmrevDmVlZVfFYYVK1YwY8YMqqqqmDt3LkcddRTXXnstn3/+OYsWLaJ169Z88cUXdZbPhcHMNoq22or5vXvT4/nnGZfCr9mGoEmTJtx1111ceuml7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uro9ZhtlEbRJYbZRloBPA8M5L9jcXQH9gcmKzNkR0vgk+xjq4C7c5ZfDjyQvT+FTHfKAMcA3bLLA2yV7bvGrKC4MJitrQo4A3hC0mUR8Qcy/dCMjIhf1NB+aUSsypleEf+9cnR1D7+Q2UI/OCKW5C6cUyjMCoJ3JZnVICIWkxm0qa+kgcCTwGmStgWQ1FZSp/WtowaPAReunpBUUktxzWqVC4PZOkTEZ2RG3/oVsFv272OSXgMeB3bYyFX+GChVZpjT14HBtZnXrLa4ryQzM1uDtxjMzGwNLgxmZrYGFwYzM1uDC4OZma3BhcHMzNbgwmBmZmtwYTAzszX8P1gL8GKfAJV9AAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "plt.plot(trACC, label = \"Train\", c = \"#00FFFF\")\n", "plt.plot(teACC, label = \"Test\", c = \"#FF4040\")\n", "plt.xticks([0, 1, 2, 3], kernel)\n", "plt.xlabel(\"Kernel\")\n", "plt.ylabel(\"Accuracy\")\n", "plt.legend()\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": 11, "id": "9df0787c", "metadata": {}, "outputs": [], "source": [ "#Different degrees:\n", "trACC = []\n", "teACC = []\n", "degree = []\n", "for i in range (1, 11):\n", " clsfr = sv.SVC(kernel = \"poly\", degree = i)\n", " clsfr.fit(xtr, ytr)\n", " trACC.append(clsfr.score(xtr, ytr))\n", " teACC.append(clsfr.score(xte, yte))\n", " degree.append(i)" ] }, { "cell_type": "code", "execution_count": 12, "id": "55b42755", "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEGCAYAAAB/+QKOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAArP0lEQVR4nO3de3xU1dX/8c8iIYAgghgFCRisgCBF1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mdqeZzTKz+Wb2QwAza2Bmv0/sF/C8mU0ys3MTx941s5vN7DXgPDM7zczeMLM5ZvZUYi0szOwoM/s/M5ttZpPNrE1sL1xykhKESC25+zLCv539gcsIK3l+A/gGcIWZdQAGAsXA14HLgeqb62x29+OBqcDPgG+5+5FAKXBtYk2se4Fz3f0o4GHgl1G/NpGq1MUksnsqVwI+Dehe2TogdD11BI4HnkqMU6wxs1erPf5vif8eTdis6vWwpA8FwBtAZ6AbMCVxfx5hWWmROqMEIVJLZnYwsA34kJAohrn75Grn9K3hMp9WngpMcfcLqz3+68BCd8/pbT0lXupiEqkFMysExgD3eVjIbDJwZaJLCDPrlNhI5zXgnMRYxAHAyTu55JvAcWZ2SOLxe5lZJ2AJUFi577OZNTSzw6J8bSLVqQUhUrMmidVtK8tc/wxULof+IGGsYU5i2edy4GzCnhq9gbeBfxF25ltf/cLuXm5mlwJ/NbNGibt/5u7/SnRb3WNm+xD+rd4N5PJqw1LHtJqrSETMrJm7bzKzVsBM4LjEvgoi9YJaECLRed7MWhAGnm9TcpD6Ri0IERFJSoPUIiKSlBKEiIgkpQQhIiJJKUGIiEhSShAiIpLU/wdlo88cDv3H3AAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "plt.plot(trACC, label = \"Train\", c = \"#00FFFF\")\n", "plt.plot(teACC, label = \"Test\", c = \"#FF4040\")\n", "plt.xlabel(\"Degree\")\n", "plt.ylabel(\"Accuracy\")\n", "plt.legend()\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "id": "44a8b4c7", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.9.12" } }, "nbformat": 4, "nbformat_minor": 5 }