{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "e74eea63-24c7-4bba-9cf1-3a0799c1a13f", "metadata": {}, "outputs": [], "source": [ "# Python ≥3.5 is required\n", "import sys\n", "assert sys.version_info >= (3, 5)\n", "\n", "# Scikit-Learn ≥0.20 is required\n", "import sklearn\n", "assert sklearn.__version__ >= \"0.20\"\n", "\n", "# Common imports\n", "import numpy as np\n", "import os\n", "\n", "# to make this notebook's output stable across runs\n", "np.random.seed(42)\n", "\n", "# To plot pretty figures\n", "%matplotlib inline\n", "import matplotlib as mpl\n", "import matplotlib.pyplot as plt\n", "mpl.rc('axes', labelsize=14)\n", "mpl.rc('xtick', labelsize=12)\n", "mpl.rc('ytick', labelsize=12)\n", "\n", "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"training_linear_models\"\n", "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { "cell_type": "markdown", "id": "d0e4cb91-b959-4b4c-a8f8-8c6b91a1407f", "metadata": {}, "source": [ "A linear model makes a prediction by simply computing a weighted sum of the input features, plus a constant called the _bias term_ (also called the _intercept term_)\n", "\n", "$$ \\hat{y} = h_{\\boldsymbol{θ}}(\\boldsymbol{x}) = \\boldsymbol{θ} · \\boldsymbol{x} = θ_0 + θ_1x_1 + θ_2x_2 + \\ldots + θ_nx_n$$" ] }, { "cell_type": "code", "execution_count": 2, "id": "a7a27aef-62d9-46f7-8876-42669ccb1ce8", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Saving figure generated_data_plot\n" ] }, { "data": { "image/png": "iVBOR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AJcg2AEAALgEwQ4AAMAlCHYAAAAuQbADAABwCYIdAACASxDsAAAAXMKWwa62tlYFBQXq0aOHOnbsqJEjR+qtt96yulgAAAC2ZstgN2XKFN1///269NJL9dBDDyk5OVk///nP9eGHH1pdNAAAANvyGGOM1YVo7qOPPtLIkSN177336uabb5Yk1dTUaMCAATrqqKP0t7/9LaifU1VVpYyMDFVWVio9PT2WRQYAAGjBiixiuxa7FStWKDk5WdOnT/ce69Chg/Lz87VmzRqVlpZaWDoAAAD7sl2w27Rpk4477rgWyXbEiBGSpE8++cSCUgEAANhfO6sLcKiKigp17969xfGmY+Xl5X6vq62tVW1trff7yspKSY3NoAAAAPHWlEHiOerNdsFu3759SklJaXG8Q4cO3sf9Wbhwoe66664Wx7Ozs6NbQAAAgBDs3LlTGRkZcfldtgt2HTt29Gl5a1JTU+N93J/Zs2frxhtv9H6/e/du9erVS19//XXcKtPuqqqqlJ2drdLSUiaUiPo4FPXhi/poiTrxRX34oj5aqqysVM+ePZWZmRm332m7YNe9e3dt27atxfGKigpJUo8ePfxel5KS4relLyMjgxvsEOnp6dRJM9SHL+rDF/XREnXii/rwRX20lJQUvykNtps8MWTIEG3evLnF2Lh169Z5HwcAAEBLtgt2F110kerr67Vs2TLvsdraWj355JMaOXIkY+YAAAACsF1X7MiRIzVx4kTNnj1b27dvV9++ffXUU0+ppKRERUVFQf+clJQUFRYW+u2eTVTUiS/qwxf14Yv6aIk68UV9+KI+WrKiTmy384TUOFHijjvu0DPPPKPvv/9egwYN0rx585SXl2d10QAAAGzLlsEOAAAAobPdGDsAAACEh2AHAADgErYOdrW1tSooKFCPHj3UsWNHjRw5Um+99VZQ127btk2TJk1Sly5dlJ6ernPPPVdfffWV33OLior0ox/9SB06dFC/fv30yCOPRPNpRE249fHyyy9r8uTJOvbYY5Wamqrjjz9eN910k3bv3t3i3JycHHk8nhZfV111VQyeUeTCrZM777zT7/Ns2uHkUG6/RwL9v3s8HvXr18/n3EDnLVq0KFZPK2zV1dUqLCzU2LFjlZmZKY/Ho+XLlwd9/e7duzV9+nR17dpVnTp10hlnnKGNGzf6PffVV1/VsGHD1KFDB/Xs2VOFhYWqq6uL0jOJjkjq45133tHUqVN13HHHKTU1Vccee6ymTZvmXWO0udzcXL/3yNixY6P8jCITSX0sX7484Gvhm2++aXG+E+4PKbI6CfT/7vF4dNhhh/mc64TPmvXr1+vaa69V//791alTJ/Xs2VOTJk3S5s2bg7reqvcP282KbW7KlClasWKFrr/+evXr10/Lly/Xz3/+c61atUqnnXZawOuqq6t1xhlnqLKyUr/5zW902GGH6YEHHtDpp5+uTz75REcccYT33N/97ne66qqrdOGFF+rGG2/UBx98oFmzZmnv3r0qKCiIx9MMWrj1MX36dPXo0UOXXXaZevbsqc8++0xLlizR66+/ro0bN7bYzWPIkCG66aabfI4dd9xxMXlOkQq3Tpo8/vjjSktL836fnJzc4pxEuEcefPBBVVdX+xzbunWr5syZo7POOqvF+WeeeaYuv/xyn2NDhw6NzpOIoh07dmju3Lnq2bOnBg8erHfffTfoaxsaGjRu3Dh9+umnuuWWW3TkkUfqscceU25urj7++GOfwPs///M/Ou+885Sbm6tHHnlEn332me6++25t375djz/+eAyeWXgiqY+CggLt2rVLEydOVL9+/fTVV19pyZIleu211/TJJ5+oW7duPudnZWVp4cKFPscCLTBvlUjqo8ncuXPVu3dvn2NdunTx+d4p94cUWZ3cfvvtmjZtms+xPXv26KqrrvL7PmL3z5rFixdr9erVmjhxogYNGqRvvvlGS5Ys0bBhw7R27VoNGDAg4LWWvn8Ym1q3bp2RZO69917vsX379pk+ffqYUaNGtXrt4sWLjSTz0UcfeY8VFxeb5ORkM3v2bO+xvXv3miOOOMKMGzfO5/pLL73UdOrUyezatStKzyZykdTHqlWrWhx76qmnjCTzxBNP+Bzv1atXi/qwq0jqpLCw0Egy3333XavnJco94s+8efOMJLN69Wqf45LMNddcE3F546GmpsZUVFQYY4xZv369kWSefPLJoK594YUXjCTzpz/9yXts+/btpkuXLubiiy/2OffEE080gwcPNgcOHPAeu/32243H4zHFxcWRP5EoiaQ+3nvvPVNfX9/imCRz++23+xw//fTTTf/+/aNS5liKpD6efPJJI8msX7++zXOdcn8YE1md+PP0008bSebZZ5/1Oe6Ez5rVq1eb2tpan2ObN282KSkp5tJLL231WivfP2zbFbtixQolJydr+vTp3mMdOnRQfn6+1qxZo9LS0lavHT58uIYPH+49dsIJJ+inP/2pXnzxRe+xVatWaefOnfr1r3/tc/0111yjPXv2aOXKlVF8RpGJpD5yc3NbHDv//PMlScXFxX6v2b9/v/bs2RNZoWMskjppYoxRVVWVTIDJ4Ylyj/jz3HPPqXfv3ho9erTfx/ft2+fdw9muUlJSWrQkBWvFihU6+uijdcEFF3iPde3aVZMmTdKf//xn757Wn3/+uT7//HNNnz5d7dod7AT59a9/LWOMVqxYEdmTiKJI6mPMmDEttkUaM2aMMjMzA76P1NXVtWgJtpNI6qO5H374QfX19X4fc9L9IUWvTpo899xz6tSpk84991y/j9v5s2b06NFq3769z7F+/fqpf//+Ae/5Jla+f9g22G3atEnHHXdci/3mRowYIUn65JNP/F7X0NCgv//97zr55JNbPDZixAj9+9//1g8//OD9HZJanHvSSScpKSnJ+7gdhFsfgTSNATnyyCNbPPa///u/Sk1NVVpamnJycvTQQw+FV+gYi0adHHvsscrIyFDnzp112WWX6dtvv23xO6TEu0c2bdqk4uJiXXLJJX4fX758uTp16qSOHTvqxBNP1HPPPRd2ue1q06ZNGjZsWIswM2LECO3du9c7zibQPdKjRw9lZWXZ6h6JturqalVXV/t9H9m8ebM6deqkzp07q1u3brrjjjt04MABC0oZW2eccYbS09OVmpqqCRMmaMuWLT6PJ/L98d133+mtt97Seeedp06dOrV43CmfNc0ZY/Ttt9/6veebs/L9w7Zj7CoqKtS9e/cWx5uOlZeX+71u165dqq2tbfPa448/XhUVFUpOTtZRRx3lc1779u11xBFHBPwdVgi3PgJZvHixkpOTddFFF/kcHzRokE477TQdf/zx2rlzp5YvX67rr79e5eXlWrx4cfhPIAYiqZPDDz9c1157rUaNGqWUl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dI9EQ2lpqc466yxlZGTo9ddfV+fOnYO6zo33iD/+3kOkxLk/mjSNuw32D0TJvvdIZWWlzj77bO3evVt//etfg/o/s/L9w7bBbsiQIdq8eXOLZsh169Z5H/cnKSlJAwcO1IYNG1o8tm7dOh177LHeN6Kmn3HouRs2bFBDQ0PA32GFcOujyb///W+NHTtWRx11lF5//XWftdva0rSwc9euXUMrdIxFWieHMsaopKTE53km0j0iNf7V+NJLLyk3NzekNxS73iORGDJkiDZu3KiGhgaf4+vWrVNqaqp3va1A90h5ebnKyspsdY9EaufOnTrrrLNUW1urN954w++4oEDceI/489VXXwX1HuLG+6O55557Tn369Amp292O90hNTY3Gjx+vzZs367XXXtOJJ54Y1HWWvn+EvEBKnKxdu7bFmlw1NTWmb9++ZuTIkd5jW7dubbHOy6JFi1qsL/TFF1+Y5ORkU1BQ4D22d+9ek5mZac455xyf6y+77DKTmppqdu7cGe2nFbZI6qOiosIce+yxpkePHuY///lPwN+xc+dOU1dX53Ns//795tRTTzXt27f3rm1kF5HUyfbt21v8vEcffdRIMvfff7/3WKLcI01efvllI8kUFRX5fdxfvVVVVZk+ffqYI488ssWaT3bS2ppc5eXlpri42Ozfv9977Pnnn2+xDtV3331nunTpYiZPnuxz/QknnGAGDx7s8/qZM2eO8Xg85vPPP4/+k4mCUOujurrajBgxwnTu3Nls2LAh4M+trKw0NTU1PscaGhrM5MmTjSTz8ccfR+05RFOo9eHvtbBy5UojycyaNcvnuBPvD2NCr5MmGzduNJLMHXfc4ffnOuWzpq6uzkyYMMG0a9fOrFy5MuB5dnv/sG2wM8aYiRMnmnbt2plbbrnF/O53vzOjR4827dq1M++99573nNNPP90cmk+bPmiOOuooc88995gHHnjAZGdnmx49erR4MTZ9mF900UXmiSeeMJdffrmRZObPnx+X5xiKcOtj8ODBRpK59dZbzdNPP+3z9eabb3rPe/LJJ02fPn1MQUGBWbp0qVmwYIEZMGCAkWQWLFgQt+cZinDrpGPHjmbKlCnmt7/9rXn00UfNxRdfbDwejxkyZIjZs2ePz7mJcI80ufDCC01KSorZvXu338cLCwvN4MGDzZw5c8yyZcvMXXfdZXr16mU8Ho955plnYvKcIvXII4+YefPmmauvvtpIMhdccIGZN2+emTdvnvd5XnHFFUaSzx8+dXV15pRTTjFpaWnmrrvuMo8++qjp37+/6dy5s/niiy98fsdf/vIX4/F4zE9+8hOzbNkyM2vWLJOUlGR+9atfxfOpBiXc+jj33HONJDN16tQW7yOvvPKK97xVq1aZbt26mRtuuME8+uij5r777jOnnnqqkWSmT58e52fbtnDro2/fvmbixIlm8eLFZunSpWb69OmmXbt2Jjs723zzzTc+v8NJ94cx4ddJk5tuuslIavE6aeKUz5rrrrvOSDLjx49vcc8//fTT3vPs9v5h62C3b98+c/PNN5tu3bqZlJQUM3z4cPPXv/7V55xAH1KlpaXmoosuMunp6SYtLc2cc845ZsuWLX5/z7Jly8zxxx9v2rdvb/r06WMeeOAB09DQEJPnFIlw60NSwK/TTz/de96GDRvM+PHjzTHHHGPat29v0tLSzGmnnWZefPHFeDy9sIRbJ9OmTTMnnnii6dy5sznssMNM3759TUFBgamqqvL7e9x+jxjT2NLSoUMHc8EFFwT8+W+++aY588wzTbdu3cxhhx1munTpYs466yzzzjvvRP25REuvXr0C3v9Nb8SBPqR27dpl8vPzzRFHHGFSU1PN6aefHnCngVdeecUMGTLEpKSkmKysLDNnzhy/rRlWC7c+WruuV69e3vO++uorM3HiRJOTk2M6dOhgUlNTzUknnWSWLl1qy9dMuPVx++23myFDhpiMjAxz2GGHmZ49e5qrr766Rahr4pT7w5jIXjP19fXmmGOOMcOGDQv4853yWdP0Xhnoq4nd3j88xgRYch8AAACOYtvJEwAAAAgNwQ4AAMAlCHYAAAAuQbADAABwCYIdAACASxDsAAAAXIJgBwAA4BIEOwAAAJcg2AEAALgEwQ4AAMAlCHYAAAAuQbADAABwCYIdgISzevVqeTweeTwevfjii37PWbdundLS0uTxeHTLLbfEuYQAEB6PMcZYXQgAiLdzzz1Xr776qk444QT94x//UHJysvexf/3rXzr11FO1c+dOXXHFFXryySfl8XgsLC0ABIcWOwAJaeHChUpOTtYXX3yhZ555xnu8vLxceXl52rlzp8455xz9/ve/J9QBcAxa7AAkrGnTpqmoqEi9e/fWv/71L+3Zs0djxozRZ599ptNOO01vvvmmOnbsaHUxASBoBDsACWvbtm3q16+f9u3bpwceeECvvPKK3n//fQ0cOFDvv/++unTpYnURASAkdMUCSFjHHHOMZs2aJUm64YYb9P777ysnJ0dvvPGG31BXXV2tO++8U+ecc466desmj8ejKVOmxLfQANAKgh2AhDZr1iwlJTW+FWZmZurNN99U9+7d/Z67Y8cO3XXXXdq4caNOPvnkeBYTAILSzuoCAIBV6urqNGPGDDU0NEiS9u7d2+qYuu7du6usrEzHHHOMampqGH8HwHZosQOQkIwxmjZtml577TV17dpVvXv3Vk1NjQoLCwNek5KSomOOOSaOpQSA0BDsACSkW2+9VU899ZTS0tK0cuVKzZ8/X5L01FNP6fPPP7e4dAAQHoIdgIRz33336b777tNhhx2ml19+WcOHD9cvfvELDRo0SPX19Zo9e7bVRQSAsBDsACSUP/zhD7r11lvl8Xi0fPlynXnmmZIkj8ejefPmSZJeffVVrV692spiAkBYCHYAEsbrr7+u/Px8GWN0//3365JLLvF5fMKECRo5cqQkqaCgwIoiAkBECHYAEsKaNWs0ceJE1dXVqaCgQNdff73f85rG2q1evVp//vOf41hCAIgcy50ASAijRo3Snj172jzvpz/9qdiQB4BT0WIHAADgErTYAUAIlixZot27d6uurk6S9Pe//1133323JGnMmDEaM2aMlcUDkOA8hj4HAAhaTk6Otm7d6vexwsJC3XnnnfEtEAA0Q7ADAABwCcbYAQAAuATBDgAAwCUIdgAAAC5BsAMAAHAJgh0AAIBLEOwAAABcgmAHAADgEgQ7AAAAlyDYAQAAuATBDgAAwCUIdgAAAC5BsAMAAHCJ/w8Ju2gta3w5KgAAAABJRU5ErkJggg==", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "X = 2 * np.random.rand(100, 1)\n", "y = 4 + 3 * X + np.random.randn(100, 1)\n", "\n", "plt.plot(X, y, \"b.\")\n", "plt.xlabel(\"$x_1$\", fontsize=18)\n", "plt.ylabel(\"$y$\", rotation=0, fontsize=18)\n", "plt.axis([0, 2, 0, 15])\n", "save_fig(\"generated_data_plot\")\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "id": "c562d2dc-3c69-4707-85de-4a60843abde0", "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.10.7" } }, "nbformat": 4, "nbformat_minor": 5 }