log regression formula update

This commit is contained in:
vik 2017-11-15 13:26:45 +01:00
parent c21a0681d0
commit 8e6f17f036

View File

@ -13,6 +13,10 @@
"\n",
"$$ w^T x = w_0 + w_1x_1 + w_2x_2 + w_3x_3 $$\n",
"\n",
"$$ w^Tx = \\sum^n_{i=1}{w_i \\cdot x_i} $$\n",
"\n",
"$$ \\sigma = \\frac{1}{1 + e^{-w^T}} $$\n",
"\n",
"$$ P(y|x) = σ(w^Tx) $$\n",
"\n",
"## Given data:\n",
@ -133,7 +137,7 @@
"plt.show()\n",
"\n",
"plt.plot(x, np.log(fn(x)))\n",
"plt.show()\n"
"plt.show()"
]
},
{
@ -213,7 +217,7 @@
"labels = np.hstack((np.zeros(num_observations), np.ones(num_observations)))\n",
"plt.figure(figsize=(12, 8))\n",
"plt.scatter(features[:,0], features[:,1], alpha=.4, c=labels)\n",
"plt.show()\n"
"plt.show()"
]
},
{
@ -375,8 +379,15 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
},
"latex_envs": {
"bibliofile": "biblio.bib",
"cite_by": "apalike",
"current_citInitial": 1,
"eqLabelWithNumbers": true,
"eqNumInitial": 0
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 1
}