{ "cells": [ { "cell_type": "markdown", "id": "11f16ac1", "metadata": {}, "source": [ "### Część podstawowa" ] }, { "cell_type": "code", "execution_count": 3, "id": "38487b50", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Predicted amount of thefts for 50 fires: 82.70999487819813\n", "Predicted amount of thefts for 100 fires: 148.45251499453076\n", "Predicted amount of thefts for 200 fires: 279.93755522719596\n" ] } ], "source": [ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "\n", "data = pd.read_csv('fires_thefts.csv', names = ['fires', 'thefts'])\n", "\n", "x = data[['fires']].to_numpy().flatten()\n", "y = data[['thefts']].to_numpy().flatten()\n", "\n", "def gradient_descent(h, cost_fun, theta, x, y, alpha, eps, max_steps = 1000000):\n", " current_cost = cost_fun(h, theta, x, y)\n", " log = [[current_cost, theta]]\n", " m = len(y)\n", " steps_counter = 0\n", " while True and steps_counter < max_steps:\n", " steps_counter += 1\n", " new_theta = [\n", " theta[0] - alpha/float(m) * sum(h(theta, x[i]) - y[i]\n", " for i in range(m)), \n", " theta[1] - alpha/float(m) * sum((h(theta, x[i]) - y[i]) * x[i]\n", " for i in range(m))]\n", " theta = new_theta\n", " prev_cost = current_cost\n", " current_cost = cost_fun(h, theta, x, y)\n", " if abs(prev_cost - current_cost) <= eps:\n", " break\n", " log.append([current_cost, theta])\n", " return theta, log\n", "\n", "def J(h, theta, x, y):\n", " m = len(y)\n", " return 1.0 / (2 * m) * sum((h(theta, x[i]) - y[i])**2 for i in range(m))\n", "\n", "def h(theta, x):\n", " return theta[0] + theta[1] * x\n", "\n", "def mse(expected, predicted):\n", " m = len(expected)\n", " if len(predicted) != m:\n", " raise Exception('Wektory mają różne długości!')\n", " return 1.0 / (2 * m) * sum((expected[i] - predicted[i])**2 for i in range(m))\n", "\n", "best_theta, log = gradient_descent(h, J, [0.0, 0.0], x, y, alpha=0.001, eps=0.0000001, max_steps = 1000000)\n", "\n", "predicted_50 = h(best_theta, 50)\n", "predicted_100 = h(best_theta, 100)\n", "predicted_200 = h(best_theta, 200)\n", "print(f'Predicted amount of thefts for 50 fires: {predicted_50}')\n", "print(f'Predicted amount of thefts for 100 fires: {predicted_100}')\n", "print(f'Predicted amount of thefts for 200 fires: {predicted_200}')" ] }, { "cell_type": "markdown", "id": "a2126b66", "metadata": {}, "source": [ "### Część zaawansowana" ] }, { "cell_type": "code", "execution_count": 4, "id": "e98cdca2", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/var/folders/lm/cbc3n48n4x94zd3vf6zbbly40000gn/T/ipykernel_46784/756364182.py:32: RuntimeWarning: overflow encountered in scalar power\n", " return 1.0 / (2 * m) * sum((h(theta, x[i]) - y[i])**2 for i in range(m))\n", "/var/folders/lm/cbc3n48n4x94zd3vf6zbbly40000gn/T/ipykernel_46784/756364182.py:25: RuntimeWarning: invalid value encountered in scalar subtract\n", " if abs(prev_cost - current_cost) <= eps:\n", "/var/folders/lm/cbc3n48n4x94zd3vf6zbbly40000gn/T/ipykernel_46784/756364182.py:20: RuntimeWarning: overflow encountered in scalar add\n", " theta[1] - alpha/float(m) * sum((h(theta, x[i]) - y[i]) * x[i]\n", "/var/folders/lm/cbc3n48n4x94zd3vf6zbbly40000gn/T/ipykernel_46784/756364182.py:20: RuntimeWarning: overflow encountered in scalar multiply\n", " theta[1] - alpha/float(m) * sum((h(theta, x[i]) - y[i]) * x[i]\n", "/var/folders/lm/cbc3n48n4x94zd3vf6zbbly40000gn/T/ipykernel_46784/756364182.py:20: RuntimeWarning: invalid value encountered in scalar subtract\n", " theta[1] - alpha/float(m) * sum((h(theta, x[i]) - y[i]) * x[i]\n", "/var/folders/lm/cbc3n48n4x94zd3vf6zbbly40000gn/T/ipykernel_46784/756364182.py:32: RuntimeWarning: overflow encountered in scalar add\n", " return 1.0 / (2 * m) * sum((h(theta, x[i]) - y[i])**2 for i in range(m))\n" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAqoAAAJpCAYAA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DH4zlr9QMAALiBK4PqwYMHVa9ePWVkZKhevXo+zzVu3NjnfosWLSRJHTt2VHFxse677z49+uijqlevniIjI5Wbm+uzfW5uriIjIyVJn376qfLy8tSyZUv7+eLiYj366KN66aWX9N1339XApwMAAKgbXBlU4+PjVVxcrLy8PPXs2bPK+3m9Xh07dkxer1f16tVTQkKCVq5c6TMxasWKFUpISJAk3XHHHeWOYb3jjjt01113nZXPAgAAUFfV2aB68OBBbd++3b6flZWlzMxMNW3aVBdffLGGDx+uESNGaOrUqYqPj9dPP/2klStXqnPnzho8eLDmz5+vBg0aqFOnTgoICND69euVnJys2267TQ0aNJAkjRkzRr169dLUqVM1ePBgLVy4UOvXr1dKSookKTQ09KShBA0aNFBkZKTatWtXe18GAADAOajOBtX169erT58+9v2kpCRJ0siRIzVv3jzNnTtXf/rTn/Too49q165dCgsLU48ePTRkyBBJUv369fXss89q69atsixLMTExGj16tB555BH7Na+44gotWLBATz31lJ544gm1bdtWS5YsUWxsbO1+WAAAgDrIFeuoAgAA4NzjyuWpAAAAYD6CKgAAAIxUp8aoer1e/fjjj2rSpAnrlgIAABjIsiwdOHBA0dHR8vOrvGdap4Lqjz/+aK97CgAAAHPt3LlTzZs3r3SbOhVUmzRpIunXDx4UFORwNQAAADhRQUGBWrRoYee2ytSpoFpyuj8oKIigCgAAYLCqDNNkMhUAAACMZFRQbdWqlTwez0m3UaNGOV0aAAAAaplRp/7T09NVXFxs39+0aZP69eunW265xcGqAAAA4ASjgmp4eLjP/SlTpqhNmzbq1auXQxUBAOAuxcXFOnbsmNNl4BxWr1491a9f/6wsFWpUUC3r6NGj+vvf/66kpKQKP2hRUZGKiors+wUFBbVVHgAAdc7Bgwf1ww8/iKur40w1atRIUVFR8vf3P6PXMTaoLlmyRPv379edd95Z4TaTJ0/WH//4x9orCgCAOqq4uFg//PCDGjVqpPDwcC6cg9NiWZaOHj2qn376SVlZWWrbtu0pF/WvjMcy9J9N/fv3l7+/v957770Ktymvo9qiRQvl5+ezPBU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1askCTdcsst9jZuOWYOHTqkuLg4zZgxo9zn//KXv+j//u//NGvWLK1bt07nnXee+vfvryNHjtjbDB8+XF9//bVWrFih999/X5988onuu+++2voINaay76awsFAbNmzQ//7v/2rDhg365z//qS1btuj6668/adtJkyb5HEsPPfRQbZRfo0513EjSgAEDfD73m2++6fN8XTxuTvW9lP0+du/erTlz5sjj8eimm27y2a4uHjNV+X19qt9LxcXFGjx4sI4ePao1a9botdde07x58zRhwoSaLd7Cabn88sutUaNG2feLi4ut6Ohoa/LkyQ5W5ay8vDxLkrV69Wr7sV69elljxoxxriiHTJw40YqLiyv3uf3791sNGjSwFi1aZD/2zTffWJKstLS0WqrQHGPGjLHatGljeb1ey7Lce8xIshYvXmzf93q9VmRkpPXcc8/Zj+3fv98KCAiw3nzzTcuyLGvz5s2WJCs9Pd3e5sMPP7Q8Ho+1a9euWqu9pp343ZTniy++sCRZ33//vf1YTEyM9eKLL9ZscQ4r77sZOXKkdcMNN1S4jxuOm6ocMzfccIN1zTXX+DzmhmPGsk7+fV2V30sffPCB5efnZ+Xk5NjbzJw50woKCrKKiopqrFY6qqfh6NGjysjIUN++fe3H/Pz81LdvX6WlpTlYmbPy8/MlSU2bNvV5fP78+QoLC1NsbKySk5NVWFjoRHm1btu2bYqOjtaFF16o4cOHKzs7W5KUkZGhY8eO+Rw/7du3V8uWLV13/Bw9elR///vfdffdd8vj8diPu/WYKSsrK0s5OTk+x0lwcLC6d+9uHydpaWkKCQlRt27d7G369u0rPz8/rVu3rtZrdlJ+fr48Ho9CQkJ8Hp8yZYpCQ0MVHx+v5557rsZPU5oiNTVVzZo1U7t27fTggw9q79699nMcN1Jubq6WLl2qe+6556Tn3HDMnPj7uiq/l9LS0tSpUydFRETY2/Tv318FBQX6+uuva6zW+jX2ynXYnj17VFxc7PMfS5IiIiL07bffOlSVs7xer8aOHasrr7xSsbGx9uO//e1vFRMTo+joaP3nP//R+PHjtWXLFv3zn/90sNqa1717d82bN0/t2rXT7t279cc//lE9e/bUpk2blJOTI39//5N+oUZERCgnJ8eZgh2yZMkS7d+/X3feeaf9mFuPmROVHAvl/ZwpeS4nJ0fNmjXzeb5+/fpq2rSpq46lI0eOaPz48Ro2bJiCgoLsxx9++GF16dJFTZs21Zo1a5ScnKzdu3frhRdecLDamjdgwAD95je/UevWrbVjxw498cQTGjhwoNLS0lSvXj2OG0mvvfaamjRpctKQKzccM+X9vq7K76WcnJxyfx6VPFdTCKo4K0aNGqVNmzb5jMOU5DPmqVOnToqKitK1116rHTt2qE2bNrVdZq0ZOHCg/ffOnTure/fuiomJ0dtvv62GDRs6WJlZXn31VQ0cOFDR0dH2Y249ZnB6jh07pltvvVWWZWnmzJk+zyUlJdl/79y5s/z9/XX//fdr8uTJxlwesib8z//8j/33Tp06qXPnzmrTpo1SU1N17bXXOliZOebMmaPhw4crMDDQ53E3HDMV/b42Faf+T0NYWJjq1at30my43NxcRUZGOlSVc0aPHq33339fH3/8sZo3b17ptt27d5ckbd++vTZKM0ZISIguvvhibd++XZGRkTp69Kj279/vs43bjp/vv/9eH330kX73u99Vup1bj5mSY6GynzORkZEnTeD85Zdf9PPPP7viWCoJqd9//71WrFjh000tT/fu3fXLL7/ou+++q50CDXHhhRcqLCzM/n/I7cfNp59+qi1btpzyZ49U946Zin5fV+X3UmRkZLk/j0qeqykE1dPg7++vrl27auXKlfZjXq9XK1euVEJCgoOV1S7LsjR69GgtXrxYq1atUuvWrU+5T2ZmpiQpKiqqhqszy8GDB7Vjxw5FRUWpa9euatCggc/xs2XLFmVnZ7vq+Jk7d66aNWumwYMHV7qdW4+Z1q1bKzIy0uc4KSgo0Lp16+zjJCEhQfv371dGRoa9zapVq+T1eu2AX1eVhNRt27bpo48+Umho6Cn3yczMlJ+f30mnveu6H374QXv37rX/H3LzcSP9eiana9euiouLO+W2deWYOdXv66r8XkpISNBXX33l84+ckn8gduzYsUaLx2lYuHChFRAQYM2bN8/avHmzdd9991khISE+s+HqugcffNAKDg62UlNTrd27d9u3wsJCy7Isa/v27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r1LBhQ4WGhuq+++7TwYMHK3zN9PR0hYeH69lnn62tjwEANYagCgAOWLBggYYNG6b58+dr+PDhkqSVK1dqy5YtWrFihd5//30dOnRI/fv31/nnn6/09HQtWrRIH330kUaPHl3ua65atUr9+vXTM888o/Hjx9fmxwGAGlHf6QIAwG1mzJihJ598Uu+995569eplP37eeefplVdekb+/vyRp9uzZOnLkiF5//XWdd955kqTp06dr6NChevbZZxUREWHvu3jxYo0YMUKvvPKKbrvtttr9QABQQwiqAFCL3nnnHeXl5enzzz/XZZdd5vNcp06d7JAqSd98843i4uLskCpJV155pbxer7Zs2WIH1XXr1un999/XO++8wwoAAOoUTv0DQC2Kj49XeHi45syZI8uyfJ4rG0iro02bNmrfvr3mzJmjY8eOnY0yAcAIBFUAqEVt2rTRxx9/rHfffVcPPfRQpdt26NBBX375pQ4dOmQ/9vnnn8vPz8+ebCVJYWFhWrVqlbZv365bb72VsAqgziCoAkAtu/jii/Xxxx/rH//4R6UXABg+fLgCAwM1cuRIbdq0SR9//LEeeugh3XHHHT7jUyWpWbNmWrVqlb799lsNGzZMv/zySw1/CgCoeQRVAHBAu3bttGrVKr355pt69NFHy92mUaNGWr58uX7++Wdddtlluvnmm3Xttddq+vTp5W4fGRmpVatW6auvvtLw4cNVXFxckx8BAGqcxzpxkBQAAABgADqqAAAAMBJBFQAAAEYiqAIAAMBIBFUAAAAYiaAKAAAAIxFUAQAAYCSCKgAAAIxEUAUAAICRCKoAAAAwEkEVAAAARiKoAgAAwEgEVQAAABjp/wM6Xy7gYkt72wAAAABJRU5ErkJggg==", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "best_theta_01, log_01 = gradient_descent(h, J, [0.0, 0.0], x, y, alpha = 0.1, eps = 0.0000001, max_steps = 1000)\n", "best_theta_001, log_001 = gradient_descent(h, J, [0.0, 0.0], x, y, alpha = 0.01, eps = 0.0000001, max_steps = 1000)\n", "best_theta_0001, log_0001 = gradient_descent(h, J, [0.0, 0.0], x, y, alpha = 0.001, eps = 0.0000001, max_steps = 1000)\n", "\n", "steps_range = np.arange(0, 200, 1)\n", "y_01, y_001, y_0001 = [], [], []\n", "for step in steps_range:\n", " y_01.append(log_01[step][0])\n", " y_001.append(log_001[step][0])\n", " y_0001.append(log_0001[step][0])\n", "\n", "fig = plt.figure(figsize=(8, 7))\n", "ax = fig.add_subplot(111)\n", "ax.plot(steps_range, y_01, label='alpha = 0.1')\n", "ax.plot(steps_range, y_001, label='alpha = 0.01')\n", "ax.plot(steps_range, y_0001, label='alpha = 0.001')\n", "ax.legend(loc='best')\n", "ax.set_xlabel('krok')\n", "ax.set_ylabel(r'$J(\\theta)$')\n", "# plt.ylim([0, 800])\n", "plt.show()" ] } ], "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.10.6" } }, "nbformat": 4, "nbformat_minor": 5 }