Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lazy-programmer-courses
/
linear-regression
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e216fde5
authored
Aug 01, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
class 32 is done
parent
e81d2c14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
201 additions
and
0 deletions
11_dummy_variable_trap.ipynb
11_dummy_variable_trap.ipynb
0 → 100644
View file @
e216fde5
{
"cells": [
{
"cell_type": "code",
"execution_count": 99,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from jupyterthemes import jtplot\n",
"jtplot.style(theme='gruvboxd')"
]
},
{
"cell_type": "code",
"execution_count": 100,
"metadata": {},
"outputs": [],
"source": [
"N = 10\n",
"D = 3"
]
},
{
"cell_type": "code",
"execution_count": 101,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[1., 1., 0.],\n",
" [1., 1., 0.],\n",
" [1., 1., 0.],\n",
" [1., 1., 0.],\n",
" [1., 1., 0.],\n",
" [1., 0., 1.],\n",
" [1., 0., 1.],\n",
" [1., 0., 1.],\n",
" [1., 0., 1.],\n",
" [1., 0., 1.]])"
]
},
"execution_count": 101,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"X = np.zeros((N, D))\n",
"X[:,0] = 1\n",
"X[:5,1] = 1\n",
"X[5:,2] = 1\n",
"X"
]
},
{
"cell_type": "code",
"execution_count": 102,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1])"
]
},
"execution_count": 102,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Y = np.array([0]*5 + [1]*5)\n",
"Y"
]
},
{
"cell_type": "code",
"execution_count": 103,
"metadata": {},
"outputs": [],
"source": [
"# w = np.linalg.solve(X.T.dot(X), X.T.dot(Y))"
]
},
{
"cell_type": "code",
"execution_count": 104,
"metadata": {},
"outputs": [],
"source": [
"epochs = 1000\n",
"w = np.random.randn(D) / np.sqrt(D)\n",
"lr = 0.001"
]
},
{
"cell_type": "code",
"execution_count": 105,
"metadata": {},
"outputs": [],
"source": [
"def get_w_der(X, delta):\n",
" return X.T.dot(delta)"
]
},
{
"cell_type": "code",
"execution_count": 106,
"metadata": {},
"outputs": [],
"source": [
"def get_MSE(X, Y, w):\n",
" MSE = []\n",
" for t in range(epochs):\n",
" Yhat = X.dot(w)\n",
" delta = Yhat - Y\n",
" w = w - lr*get_w_der(X, delta)\n",
" mse = delta.dot(delta) / N\n",
" MSE.append(mse)\n",
" return MSE"
]
},
{
"cell_type": "code",
"execution_count": 107,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAFSCAYAAAD7MQibAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3XmcHHWd//F3Vd8zmXtyTC4CSSCEU5BTghcoIIocZuOKurAr0eVQwQNXFlivxd8i7g95+CCwy6KL6A+jIsoPBBb4KXIfIYGEJBByzuSayVzpu6t+f/TMkISZvqZ7qqr79Xw8+jGTOro//ZnKvKe+VV1lzJpzsC0AQM0xnS4AAOAMAgAAahQBAAA1igAAgBpFAABAjSIAAKBG+QtZaGp7s6689FwtnD9LA4Mx/Wz543r8rysrXRsAoIIKCoAbvrpEz61Yp+tvvlfz5nToh//0eb2+brN27Op917LtrY2KxhJlLxQAULy6SEi7e/pHnZc3AA6fP0v1dWH9fPkTsm1b6zZs01duuFP9A9F3Ldve2qh7br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IpFSMHDA+w9m33+ueV70mfPfr5VrNmr1+i37Tc+1DVTb9pFKp7Wzu0+/f+Q5pTMZvbTqLb22dpMk493vc9/tYIx5XvS+ExfqoJlT9Nwr65TOZPTE06v01qbtsm3VzHYwLNfPttR5hXJFAGzp3K2Z09pG/m0ahqZNafHMbl0xTjhmvn7wzc/qZ79+XL/43f+TJG3p2q2ZHe+8/6bGekXCQXXu6Mk5z4tOO3GhPvr+92j5smu1fNm1kqTbvrdUPb2DY24D1bZ9bO3qVv0Bx3BM09TeWFwdU1r2O4g3o6NNW7qyPRhrnhdNbm2U37f/r59MJqP+wWjNbAfDcv1sS51XKFcEwKur31bDpDqduehY+X0+LTnvdHVu79ZWj27cY5nS1qRvXXGRbrnz93r4yZdHpj/94hs64tDZOv6ouQoE/Pq7T31Iz768VvFEMuc8L/rCN27ThZfdpIuWZh+SdMV1y/T0i2vG3Aaqbft45bUNSqUz+txFH5RpGHrv0fO0cP4sPfPiG9qxq1dLzjtdfp9PZy46VpPqwlq5ZqM2d+4ac54XvfLaBi2YN1Onn3SEpOzp0QvmzdTzr6yrme1gWK6fbanzClX2q4GWat6cDl116bma2dGuDZu360fL7lfXzj1Ol1VWSy8+S+d95CQlkqn9pt/wo3sV8Pt02cVnqb21Ua+v3aSbb79f/YNRSdLxR80dc57XPXzPjbrkmlvVtaMn5zZQbdvHzI42Xf75j2n+wdPV2z+o//jlo3r25bXqmNKir/zDJzTv4Onq2tGjW+/6g9Zt6JSknPO86JTjF+hzF31QU9qa1LmjR3fe+4hWrtlYE9vBmYuO1VkfOE7XfPcuSbl/tpXcJlwTAACAieWKISAAwMQjAACgRhEAAFCjCAAAqFEEAADUKAIAAGoUAQAANYoAAIAa9f8BsUhzZ07zimEAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 460.8x403.2 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"last mse 9.20931783766317e-05\n"
]
}
],
"source": [
"MSE = get_MSE(X, Y, w)\n",
"plt.plot(MSE)\n",
"plt.show()\n",
"print('last mse', MSE[len(MSE)-1])"
]
},
{
"cell_type": "code",
"execution_count": 108,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAFQCAYAAACh2zlZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3XmcE+X9B/DP5E5mJtlsdhdYDlHkh9B6Ua+KoNYiVlFUqMW7UBUPxAO12gNrD4+K2opVEWu1RUsFtahUxQMqAl5VAW8QhMW975nJffz+WFxYdney7CY7k+Tzfr3ygmRnk2+eJPvJ88zM8whDh++fAhERUTcsRhdARETmxqAgIiJdDAoiItLFoCAiIl0MCiIi0mUz6oFLir0IhiJGPTwREe3F43aivrG10+2GBEVJsReL77/eiIcmIiIdF8y5t1NYGBIU3/YkLrvxAYTC0V7dhwDA75PR1KKAJ4J0xvbRx/bRx/bRl4/t43Y58Mjds7sc6TFs6AkAQuFor4efBABupxPBUCRvXqhMYvvoY/voY/voK7T24c5sIiLSxaAgIiJdhg496REEAW63u/ufA3C73fBE4wXR9dtXfW2fSCSCRCKR6bKIKAeZskdRVFSEkpIS3W1SAFpUjSHRjb62j8/nQ3l5OaxWaybLIqIcZMoehdPpRE1NTdrtbFYL4olkP1SUm/rSPsFgEABQXl6OysrKTJZFRDnGdD0Km82GSIQn4plFOBxmr4KowJkuKBwOB6LR3p1bQZkXDofhdDqNLoOIDLRPQ0/jjxqDKZOOxg2/+1uXPz/n9ONw1inHwG6z4fW3NuDhxS8jleJeBCKiXNajHoVFEHD2j76PG684GwKELrc5ZuwonHLCWMyZtwiX3LgAo0cOxaTjD89osWYiiW64nPZ+e7zSYm+/PRYR0Z56FBQzp/8Q3//eQXj6hbe63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NXrNxlYmTnsrGqAuNeBDxaLBUI32xea0mIvbNaO368TiQRi8YRBFfWPnOtRbPh0G2TJg4njD4PNasX0KRNQWd2AnVUMCgAoC/hwy+xpuHfRcoZEFy696QFMvexOTJvVdgGA2b9ayJDY5cOPtyIWT+CiaSfCIgg44pADMWbkULz9wRdGl2YKH368FQcdOAQTjv4OgLZD0Q86cAje27DZ4Mqyy7BJAfviwOGDMGfmZAwZVIKtO6pxz8J/o6q2yeiyTGHWBadgyslHIxKNdbj91nue6rCTm9q8vPg3mDH3fp5HsYchgwK46uLTMHL/cjS3qnj0n68yKPbw/e8dhIumnYiygA+VNY1Y9NTKvP9s5WRQEBFR/8m5oSciIupfDAoiItLFoCAiIl0MCiIi0sWgICIiXQwKIiLSxaAgIiJdDAoiItLFoCAiIl3/D9do3uCzL9hxAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 460.8x403.2 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(Y, label='target')\n",
"plt.plot(Yhat, label='prediction')\n",
"plt.legend()\n",
"plt.show()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment