{ "cells": [ { "cell_type": "code", "execution_count": 12, "id": "ecf6f699-9799-49dd-b553-2bf87b763ea1", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": 13, "id": "08a7ac73-f032-43f6-985c-ef004b0c123d", "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv(\"insurance_data.csv\")" ] }, { "cell_type": "code", "execution_count": 27, "id": "24ebd375-3904-4c96-bb61-1810dfb24e48", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
agebought_insurance
0220
1250
2471
3520
4461
\n", "
" ], "text/plain": [ " age bought_insurance\n", "0 22 0\n", "1 25 0\n", "2 47 1\n", "3 52 0\n", "4 46 1" ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.head()" ] }, { "cell_type": "code", "execution_count": 15, "id": "260592d2-b720-4168-a5bd-c3f916d7e508", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGdCAYAAADAAnMpAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8WgzjOAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAeL0lEQVR4nO3df3TV9X348VcC5AYqCbRIwo8odtWiU8CC5mTU0zlTmfWwsh/9cqwrlLXu6GgHZD+EVUg7W8N0OuqBmknr7PluHahntnZaHEsLO66sTBirropacXDUBDgrCY2YuNzP9w+/Xk0JmosJbwKPxzn3nPC578+970/eCfd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rnnxqOPPho33HBD/OEf/mF885vfjIgofP+rqqp67TdU12ZI/NXek9nixYvjySef7PUcK2l98IMfjF27dkV7e3s88MADsXDhwti6dWvqaZ3W9u3bF0uWLInNmzdHeXl56unwFldddVXh62nTpkVtbW2cffbZcd9998XIkSMTzuz0ls/nY9asWXHLLbdERMTFF18cTz75ZDQ3N8fChQsTz27gOTPyLnzuc5+Lf/zHf4wf/OAHMXny5ML26urq6O7ujkOHDvUa39bWFtXV1Sd4lqefsrKy+MAHPhAzZ86MpqammD59enz1q1+1Lgnt2LEj9u/fHx/60Idi+PDhMXz48Ni6dWvceeedMXz48KiqqrI2J4kxY8bEeeedF88995zfmYQmTJgQF1xwQa9t559/fuEptDe+/7/4zqahujZi5DhkWRaf+9zn4sEHH4zvf//7cc455/S6fubMmTFixIhoaWkpbNu9e3fs3bs36urqTvR0T3v5fD66urqsS0JXXHFFPPHEE7Fr167CZdasWXHttdcWvrY2J4ef//zn8dOf/jQmTJjgdyah2bNnH/WREc8880ycffbZERFxzjnnRHV1da+16ejoiB/96EdDc21Sv4J2KLrhhhuyysrKbMuWLdnLL79cuLzyyiuFMddff3121llnZd///vezxx9/PKurq8vq6uoSzvr0sHz58mzr1q3Znj17sh//+MfZ8uXLs5KSkuyf/umfsiyzLieTt76bJsusTSp/9Ed/lG3ZsiXbs2dP9q//+q9ZfX19Nm7cuGz//v1ZllmXVLZv354NHz48+8pXvpI9++yz2d/93d9lo0aNyv72b/+2MGb16tXZmDFjsu985zvZj3/84+zjH/94ds4552RHjhxJOPPjI0aOQ0T0efmbv/mbwpgjR45kf/AHf5CNHTs2GzVqVPabv/mb2csvv5xu0qeJ3/u938vOPvvsrKysLDvzzDOzK664ohAiWWZdTia/GCPWJo358+dnEyZMyMrKyrJJkyZl8+fPz5577rnC9dYlne9+97vZhRdemOVyuWzq1KnZ3Xff3ev6fD6frVy5MquqqspyuVx2xRVXZLt3704023enJMuyLOWZGQDg9OY1IwBAUmIEAEhKjAAASYkRACApMQIAJCVGAICkxAgAkJQYAQCSEiMAQFJiBABISowAAEmJEQAgqf8HZg7s3fiT4kQAAAAASUVORK5CYII=", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plt.scatter(df.age, df.bought_insurance, marker='+', c=df.bought_insurance)" ] }, { "cell_type": "code", "execution_count": 22, "id": "02a35555-40b0-458f-8c67-c061ba3ffc94", "metadata": {}, "outputs": [], "source": [ "def sigmoid(z):\n", " return 1/(1+np.exp(-z))" ] }, { "cell_type": "code", "execution_count": 31, "id": "b92661b6-b83c-4255-8aa2-ed5a70ed849b", "metadata": {}, "outputs": [], "source": [ "x = np.arange(-10, 10, 0.001)" ] }, { "cell_type": "code", "execution_count": 32, "id": "7bba53a6-5925-49e7-9509-1713638da989", "metadata": {}, "outputs": [], "source": [ "y = sigmoid(x)" ] }, { "cell_type": "code", "execution_count": 33, "id": "ff24178a-2cb8-48c6-a480-cf9bd530dbb6", "metadata": {}, "outputs": [], "source": [ "dy = derivative_sigmoid(x)" ] }, { "cell_type": "code", "execution_count": 36, "id": "8d966ed9-b435-4440-88cf-07d81d4d2d90", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 36, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGdCAYAAADAAnMpAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8WgzjOAAAACXBIWXMAAA9hAAAPYQGoP6dpAABXPElEQVR4nO3dd3wUdf7H8dduyiYhJCEJpEAgdFF6iwFBlJwIyoGcisoJInbOU1FPUQHRE6yAP8tx54no2VAPEIUDEVGkSEfpHUJJQk+DtN35/bFkIZKEJCSZ3c37+XjsI7sz39n9TDbJvjPf73zHYhiGgYiIiIhJrGYXICIiIjWbwoiIiIiYSmFERERETKUwIiIiIqZSGBERERFTKYyIiIiIqRRGRERExFQKIyIiIm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HUmT55M06ZNXY83bdpE3759CQ4OJioqijvvvJNjx46V6fv11Vdf0aZNGwIDA4mIiCApKYnsbOeU2L/vpsnMzGTIkCHUqlWLmJgYJk+efEEXWHx8PH//+99d70GjRo2YM2cOR48eZcCAAQQHB9O2bVvWrFlTpI7//ve/XHHFFdhsNuLj4y94337fTbNz50569uxJQEAAl19+OQsXLizT/or3yczJZ+j7q5i57hA+VgsvDmzN83+8QkFEajzvOzKSfxomxJrz2s8cBv+yH55/8skn+emnn/j666+pV68ezzzzDOvWraN9+/YA/OUvf2HLli18/vnnxMbGMmvWLK6//no2btxI8+bNATh9+jSvvPIK//73v4mIiKBevXpFXuOWW27h4YcfZvHixfTu3RuAEydOMH/+fObNmwdAVlYW/fr146WXXsJms/HRRx/Rv39/tm/fTsOGDZk5cybt2rXjvvvu49577y12X1q0aEHnzp355JNPePHFF13LP/nkE+644w4ATp06xbXXXss999zD5MmTOXPmDE899RS33norP/zwQ6nfq5SUFG6//XZeffVVbrrpJjIzM/n5559L7JoZNWoUy5YtY86cOURFRTF27Ngi39tCkydPZsKECYwZM4bJkydz55130q1bN+6++25ee+01nnrqKYYOHcrmzZuxWCysXbuWW2+9leeff57BgwezfPlyHnroISIiIrjrrrsuqMPhcDBo0CCioqJYuXIl6enplzwmSDzTyew8hn2wit8OphNs8+WdIR25WmfLiADeGEY8RFZWFu+//z4ff/yxKyR8+OGHNGjQAIDk5GQ++OADkpOTiY11hqsnnniC+fPn88EHHzBhwgQA8vPzeffdd2nXrl2xr1OnTh369u3Lp59+6nqdr776isjISK655hoA2rVrV2T7F198kVmzZjFnzhz+8pe/EB4ejo+PD7Vr1yY6OrrEfRoyZAhvv/22K4zs2LGDtWvX8vHHHwPw9ttv06FDB1ftANOmTSMuLo4dO3bQokWLEp87JSWFgoICBg0aRKNGjQBo06ZNsW0zMzP58MMPi+zzBx984Po+nq9fv37cf//9AIwdO5Z//OMfdOnShVtuuQWAp556isTERNLS0oiOjmbSpEn07t2bMWPGAM4QtmXL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uLg4HnvsMXJycipUsIhIZVqwOY1Dp84QXsufgR3qm12OSI1U7jAyY8YMRo0axbhx41i3bh3t2rWjT58+HDlypNj2n376KU8//TTjxo1j69atvP/++8yYMYNnnnnmkosXEblU05btBeDPCQ0J8PMxuRqRmqncYWTSpEnce++9DB8+nMsvv5ypU6cSFBTEtGnTim2/fPlyunfvzh133EF8fDzXXXcdt99++0WPpoiIVLUNB06xdv9J/Hws/PnKRmaXI1JjlSuM5OXlsXbtWpKSks49gdVKUlISK1asKHabbt26sXbtWlf42LNnD/PmzaNfv36XULaIyKWbttR5VKR/u1jqhQSYXI1IzeVbnsbHjh3DbrcTFRVVZHlUVBTbtm0rdps77riDY8eOcdVVV2EYBgUFBTzwwAOldtPk5uaSm5vrepyRkVGeMkVELupYVi7/25QCwPBujU2uRqRmq/KzaX788UcmTJjAu+++y7p165g5cyZz587lxRdfLHGbiRMnEhoa6rrFxcVVdZkiUsN8ueYg+XaDdnFhtGmgqd9FzFSuIyORkZH4+PiQlpZWZHlaWhrR0dHFbjNmzBjuvPNO7rnnHgDatGlDdnY29913H88++yxW64V5aPTo0YwaNcr1OCMjQ4FERCqNw2Hw2SrnJGdDEhqaXI2IlOvIiL+/P506dWLRokWuZQ6Hg0WLFpGYmFjsNqdPn74gcPj4OEesG4ZR7DY2m42QkJAiNxGRyrJ01zGST5ymdoAv/dvGml2OSI1XriMjAKNGjWLYsGF07tyZrl27MmXKFLKzsxk+fDgAQ4cOpX79+kycOBGA/v37M2nSJDp06EBCQgK7du1izJgx9O/f3xVKRESq0ycr9wPwp44NCPTX3yERs5U7jAwePJijR48yduxYUlNTad++PfPnz3cNak1OTi5yJOS5557DYrHw3HPPcejQIerWrUv//v156aWXKm8vRETKKDU9h++3OudFukNdNCJuwWKU1FfiRjIyMggNDSU9PV1dNiJySd78fieTv99B1/hwvnig+O5lEakcZf381rVpRKTGsDsMZpy9Ou+QK3VURMRdKIyISI2xYvdxDqfnEBLgS58rij8DUESqn8KIiNQYX609AMAf28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Nms5ldSpXx9n3U/nk+b99H7Z/n8/Z9dIf984gBrCIiIuK9avSRERERETGfwoiIiIiYSmFERERETKUwIiIiIqby+jDy0ksv0a1bN4KCgggLCyu2TXJyMjfccANBQUHUq1ePJ598koKCglKf98SJEwwZMoSQkBDCwsIYMWIEWVlZVbAHZffjjz9isViKva1evbrE7Xr16nVB+wceeKAaKy+f+Pj4C+p9+eWXS90mJyeHkSNHEhERQXBwMH/6059IS0urporLbt++fYwYMYLGjRsTGBhI06ZNGTduHHl5eaVu5+7v4TvvvEN8fDwBAQEkJCSwatWqUtt/+eWXXHbZZQQEBNCmTRvmzZtXTZWWz8SJE+nSpQu1a9emXr16DBw4kO3bt5e6zfTp0y94rwICAqqp4vJ7/vnnL6j3sssuK3UbT3n/oPi/JxaLhZEjRxbb3t3fvyVLltC/f39iY2OxWCzMnj27yHrDMBg7diwxMTEEBgaSlJTEzp07L/q85f0dLi+vDyN5eXnccsstPPjgg8Wut9vt3HDDDeTl5bF8+XI+/PBDpk+fztixY0t93iFDhrB582YWLlzIt99+y5IlS7jvvvuqYhfKrFu3bqSkpBS53XPPPTRu3JjOnTuXuu29995bZLtXX321mqqumBdeeKFIvQ8//HCp7R977DG++eYbvvzyS3766ScOHz7MoEGDqqnastu2bRsOh4N//vOfbN68mcmTJzN16lSeeeaZi27rru/hjBkzGDVqFOPGjWPdunW0a9eOPn36cOTIkWLbL1++nNtvv50RI0awfv16Bg4cyMCBA9m0aVM1V35xP/30EyNHjuSXX35h4cKF5Ofnc91115GdnV3qdiEhIUXeq/3791dTxRVzxRVXFKl36dKlJbb1pPcPYPXq1UX2beHChQDccsstJW7jzu9fdnY27dq145133il2/auvvsr//d//MXXqVFauXEmtWrXo06cPOTk5JT5neX+HK8SoIT744AMjNDT0guXz5s0zrFarkZqa6lr2j3/8wwgJCTFyc3OLfa4tW7YYgLF69WrXsv/973+GxWIxDh06VOm1V1ReXp5Rt25d44UXXii13dVXX2088sgj1VNUJWjUqJExefLkMrc/deqU4efnZ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bt260apVK/75z3/y4osvVnWZ5da3b1/X/bZt25KQkECjRo344osvGDFihImVVb7333+fvn37EhsbW2IbT3v/PIVHhpHHH3+81OQK0KRJkzI9V3R09AWjggvPsoiOji5xm98P3CkoKODEiRMlbnMpKrK/H3zwAREREfzxj38s9+slJCQAzv/Kq+uD7FLe04SEBAoKCti3bx8tW7a8YH10dDR5eXmcOnWqyNGRtLS0Knm/ilPe/Tt8+DDXXHMN3bp141//+le5X8+M97A4kZGR+Pj4XHDmUmnf++jo6HK1dwd/+ctfXAPZy/vfsZ+fHx06dGDXrl1VVF3lCgsLo0WLFiXW64nvH8D+/fv5/vvvy3000ZPev8L3IC0tjZiYGNfytLQ02rdvX+w2FfkdrpBKG33i5i42gDUtLc217J///KcREhJi5OTkFPtchQNY16xZ41q2YMECtxnA6nA4jMaNGxuPP/54hbZfunSpARi//vprJVdWNT7++GPDarUaJ06cKHZ94QDWr776yrVs27ZtbjuA9eDBg0bz5s2N2267zSgoKKjQc7jTe9i1a1fjL3/5i+ux3W436tevX+oA1htvvLHIssTERLccAOlwOIyRI0casbGxxo4dOyr0HAUFBUbLli2Nxx57rJKrqxqZmZlGnTp1jDfffLPY9Z70/p1v3LhxRnR0tJGfn1+u7dz5/aOEAayvv/66a1l6enqZBrCW53e4QrVW2jO5qf379xvr1683xo8fbwQHBxvr16831q9fb2RmZhqG4fxBat26tXHdddcZGzZsMObPn2/UrVvXGD16tOs5Vq5cabRs2dI4ePCga9n1119vdOjQwVi5cqWxdOlSo3nz5sbtt99e7ftXnO+//94AjK1bt16w7uDBg0bLli2NlStXGoZhGLt27TJeeOEFY82aNcbevXuNr7/+2mjSpInRs2fP6i67TJYvX25MnjzZ2LBhg7F7927j448/NurWrWsMHTrU1eb3+2gYhvHAAw8YDRs2NH744QdjzZo1RmJiopGYmGjGLpTq4MGDRrNmzYzevXsbBw8eNFJSUly389t40nv4+eefGzabzZg+fbqxZcsW47777jPCwsJcZ7DdeeedxtNPP+1qv2zZMsPX19d4/fXXja1btxrjxo0z/Pz8jI0bN5q1CyV68MEHjdDQUOPHH38s8l6dPn3a1eb3+zd+/HhjwYIFxu7du421a9cat912mxEQEGBs3rzZjF24qMcff9z48ccfjb179xrLli0zkpKSjMjISOPIkSOGYXj2+1fIbrcbDRs2NJ566qkL1nna+5eZmen6nAOMSZMmGevXrzf2799vGIZhvPzyy0ZYWJjx9ddfG7/99psxYMAAo3HjxsaZM2dcz3Httdcab731luvxxX6HK4PXh5Fhw4YZwAW3xYsXu9rs27fP6Nu3rxEYGGhERkYajz/+eJF0vHjxYgMw9u7d61p2/Phx4/bbbzeCg4ONkJAQY/jw4a6AY7bbb7/d6NatW7Hr9u7dW2T/k5OTjZ49exrh4eGGzWYzmjVrZjz55JNGenp6NVZcdmvXrjUSEhKM0NBQIyAgwGjVqpUxYcKEIkexfr+PhmEYZ86cMR566CGjTp06RlBQkHHTTTcV+YB3Fx988EGxP6/nH8T0xPfwrbfeMho2bGj4+/sbXbt2NX755RfXuquvvtoYNmxYkfZffPGF0aJFC8Pf39+44oorjLlz51ZzxWVT0nv1wQcfuNr8fv8effRR1/ciKirK6Nevn7Fu3brqL76MBg8ebMTExBj+/v5G/fr1jcGDBxu7du1yrffk96/QggULDMDYvn37Bes87f0r/Lz6/a1wHxwOhzFmzBgjKirKsNlsRu/evS/Y70aNGhnjxo0rsqy03+HKYDEMw6i8Th8RERGR8qnx84yIiIiIuRRGRERExFQKIyIiImIqhRERERExlcKIiIiImEphREREREylMCIiIiKmUhgRERERUymMiIiIiKkURkRERMRUCiMiIiJiKoURERERMdX/A91+wpO8I6OlAAAAAElFTkSuQmCC", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plt.plot(x, y)\n", "plt.plot(x, dy)\n", "plt.legend([\"sigmoid\", \"derivative_sigmoid\"])" ] }, { "cell_type": "markdown", "id": "880b3325-7406-42fb-a68d-86ea1ae0fb12", "metadata": {}, "source": [ "最小化:\n", "$$loss = -\\frac{1}{n}\\sum_{i=1}^n [y_i \\cdot log(\\hat{y_i}) + (1-y_i) \\cdot log(1 - \\hat{y_i})]$$\n", "$$\\hat{y_i} = sigmoid(z_i)$$" ] }, { "cell_type": "markdown", "id": "9860e2a9-c601-4373-b772-6cf89ea8bb9f", "metadata": {}, "source": [ "根据链式求导法则:" ] }, { "cell_type": "markdown", "id": "44920e6d-9749-4fff-b4fb-6d29350352ff", "metadata": {}, "source": [ "$$\\frac{\\partial loss}{\\partial w} = \\frac{\\partial loss}{\\partial y_i}\\cdot \\frac{\\partial y_i}{\\partial z_i} \\cdot\\frac{\\partial z_i}{\\partial w}$$\n", "$$\\frac{\\partial loss}{\\partial b} = \\frac{\\partial loss}{\\partial y_i}\\cdot \\frac{\\partial y_i}{\\partial z_i}\\cdot \\frac{\\partial z_i}{\\partial b}$$" ] }, { "cell_type": "markdown", "id": "71f01557-4978-410c-b803-9b8935b25b7e", "metadata": {}, "source": [ "$$\\frac{\\partial loss}{\\partial y_i} = -\\frac{y_i}{\\hat{y_i}} + \\frac{1 - y_i}{1 - \\hat{y_i}}$$\n", "$$\\frac{\\partial y_i}{\\partial z} = y_i\\cdot(1 - y_i)$$\n", "$$\\frac{\\partial z_i}{\\partial w} = x_i$$\n", "$$\\frac{\\partial z_i}{\\partial b} = 1$$" ] }, { "cell_type": "markdown", "id": "1b670a1f-1a58-431a-8f4f-7792cf6fdec4", "metadata": {}, "source": [ "$$\\frac{\\partial loss}{\\partial w} = -\\frac{y_i}{\\hat{y_i}} + \\frac{1 - y_i}{1 - \\hat{y_i}} \\cdot y_i \\cdot (1 - y_i) \\cdot x_i = (\\hat{y_i} - y_i) \\cdot x_i$$\n", "$$\\frac{\\partial loss}{\\partial b} = -\\frac{y_i}{\\hat{y_i}} + \\frac{1 - y_i}{1 - \\hat{y_i}} \\cdot y_i \\cdot (1 - y_i) \\cdot x_i = (\\hat{y_i} - y_i) \\cdot 1 = \\hat{y_i} - y_i$$" ] }, { "cell_type": "code", "execution_count": 72, "id": "9a608877-c041-4441-9982-ef1195633a06", "metadata": {}, "outputs": [], "source": [ "def logistic_regression(x, y, iterations, learning_rate):\n", " w, b = 0, 0\n", " for i in range(1, iterations + 1):\n", " y_hat = sigmoid(w * x + b)\n", " loss = np.mean(-((y * np.log(y_hat)) + (1 - y) * np.log(1 - y_hat)))\n", " if i % 1000 == 0:\n", " print(f\"Loss:{round(loss,2)}, Iteration: {i}\")\n", " dw = np.mean((y_hat - y) * x)\n", " db = np.mean(y_hat - y)\n", " w -= learning_rate * dw\n", " b -= learning_rate * db\n", " return w, b" ] }, { "cell_type": "code", "execution_count": 74, "id": "5099121d-ed49-44f0-b706-5512b9cc1955", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Loss:1.62, Iteration: 1000\n", "Loss:0.75, Iteration: 2000\n", "Loss:0.58, Iteration: 3000\n", "Loss:0.49, Iteration: 4000\n", "Loss:0.45, Iteration: 5000\n", "Loss:0.43, Iteration: 6000\n", "Loss:0.42, Iteration: 7000\n", "Loss:0.41, Iteration: 8000\n", "Loss:0.4, Iteration: 9000\n", "Loss:0.4, Iteration: 10000\n", "Loss:0.39, Iteration: 11000\n", "Loss:0.39, Iteration: 12000\n", "Loss:0.39, Iteration: 13000\n", "Loss:0.38, Iteration: 14000\n", "Loss:0.38, Iteration: 15000\n", "Loss:0.38, Iteration: 16000\n", "Loss:0.38, Iteration: 17000\n", "Loss:0.38, Iteration: 18000\n", "Loss:0.38, Iteration: 19000\n", "Loss:0.38, Iteration: 20000\n" ] } ], "source": [ "w, b = logistic_regression(df.age, df.bought_insurance, 20000, 0.01)" ] }, { "cell_type": "code", "execution_count": 45, "id": "cdac8f71-8ea7-4877-b84e-8beba356d0c9", "metadata": {}, "outputs": [], "source": [ "from sklearn.linear_model import LogisticRegression" ] }, { "cell_type": "code", "execution_count": 47, "id": "15cfeb6b-32ba-4ca1-be89-ea3b1438ecdc", "metadata": {}, "outputs": [], "source": [ "lr = LogisticRegression()" ] }, { "cell_type": "code", "execution_count": 48, "id": "82f58946-4773-4516-afd0-f3e92b443435", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
LogisticRegression()
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" ], "text/plain": [ "LogisticRegression()" ] }, "execution_count": 48, "metadata": {}, "output_type": "execute_result" } ], "source": [ "lr.fit(df[[\"age\"]], df.bought_insurance)" ] }, { "cell_type": "code", "execution_count": 50, "id": "152fcad5-e55c-4524-a0a2-c5ee8cf5240a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(array([[0.1354656]]), array([-5.26279696]))" ] }, "execution_count": 50, "metadata": {}, "output_type": "execute_result" } ], "source": [ "lr.coef_, lr.intercept_" ] }, { "cell_type": "code", "execution_count": null, "id": "4a91cddc-de82-4957-8683-9f56c9485705", "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.8.0" } }, "nbformat": 4, "nbformat_minor": 5 }