You are on page 1of 10

{

"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Polynomial Regression"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What if your data doesn't look linear at all? Let's look at some more reali
stic-looking page speed / purchase data:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x6e1be10>"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAEACAYAAABWLgY0AAAABHNCSVQICAgI
fAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X18XVWd7/HPL8k5JyePbTU8FpJCKQ
WhNOWCKIwGAR8Y\nR3wGnLn3jhZGhosgoyOl85pbEFFrZbhwX0KpdhTn9iGOji91rmOxY6PD+NBeKDKa
ojhOKkUgURHb\nsbSh/d0/1to5OycnNGkezsnp9/165ZVkn33OWTmU7177t9Ze29wdERGpTjXlboCIiE
wdhbyISBVT\nyIuIVDGFvIhIFVPIi4hUMYW8iEgVG3PIm9lcM/uWmf3YzP7NzK6P22eb2QNm9hMz22Rm
rann3Gxm\nj5vZDjN77VT8ASIiMjob6zx5MzsGOMbdHzGzJuAh4DLg3cCv3f0TZnYTMNvdl5nZ6cA64B
xgLrAZ\nOMU1MV9EZNqMuSfv7k+7+yPx5z3ADkJ4XwbcH3e7H3hz/PlNwEZ3f8Hd+4DHgXMnqd0iIjIG
h1WT\nN7MOYDHwfeBod38GwoEAOCrudjzwROppT8ZtIiIyTcYd8rFU80XghtijLy6/qBwjIlIh6sazs5
nV\nEQL+79z9K3HzM2Z2tLs/E+v2/XH7k8AJqafPjduKX1MHBRGRw+Dudqh9xtuT/1ug193vSm37KvCn
\n8ef/Dnwltf0KM8ua2TxgPrB1lIZW3NeKFSvK3ga1SW06EtulNo3ta6zG3JM3s/OBPwb+zcy2E8oy\n
y4G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RH
c/ifDv6VvlDngza4hnYZhZI/BaChcyloW7PwM8YWYL\n4qaLKO/BudiVVECpJvoFcJ6Z1cfVfS8ijIuV
VBEhb2ZvNrMngPOAfzSzfypHO9z9AHAd8ADwY8JK\nmqN+eNPFzNYD3wUWmNkvzOzdZW7P+cAfA69JTS
97/aGeNw2OBbaY2SOEMYJN7v71MrepEh0NPBjH\nLr5PWI7kgTK3CeB6wpXyjwBnAR8tc3uAcFAk9J7/
odxtAYizxb4IbAd+SOj8rRlt/4qYQikiIlOj\nInryIiIyNRTyIiJVTCEvIlLFFPIiIlVMIS8iUsUU8i
IiVUwhLyJSxRTyIiJV7P8DBk+JdxmN4XIA\nAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x6c3ae10>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%matplotlib inline\n",
"from pylab import *\n",
"\n",
"np.random.seed(2)\n",
"pageSpeeds = np.random.normal(3.0, 1.0, 1000)\n",
"purchaseAmount = np.random.normal(50.0, 10.0, 1000) / pageSpeeds\n",
"\n",

"scatter(pageSpeeds, purchaseAmount)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"numpy has a handy polyfit function we can use, to let us construct an nth-d
egree polynomial model of our data that minimizes squared error. Let's try it wi
th a 4th degree polynomial:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"x = np.array(pageSpeeds)\n",
"y = np.array(purchaseAmount)\n",
"\n",
"p4 = np.poly1d(np.polyfit(x, y, 1))\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We'll visualize our original scatter plot, together with a plot of our pred
icted values using the polynomial for page speed times ranging from 0-7 seconds:
"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAEACAYAAABWLgY0AAAABHNCSVQICAgI
fAhkiAAAAAlwS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aZJYD3AP9eBG0ZQ1BhaACOA6rN7MP9Pf5Qp1AOmLufP1LvdQheACbE/h4fbpNews
PEbwHf\ndPfvFLo9vbn7n8xsFXAhwVTeQnkb8B4zuwjIADVm9g13/98FbBPu/lL4s9PMvk1Qqny0gE3a
Cmxx\n91+Gf38LKIqJD6E/Bx53985CN4SgbPQ7d/8DgJn9B/BW4IF8Dy7Gck0hezprgclm1hCOVl9KcG
JX\nMSimXiDA/wPa3P3OQjckYmZHRusnhYf65wMFHQx293nuPsHdTyT49/TjQge8mVWGR2GYWRVwAdkT
\nGQvC3bcBW8xsSrjpXAq7c+7tMoqgVBN6HphtZulwdd9zCcbF8iqKkDez95rZFmA28N9m9v1CtMPd\n
9wFXAY8AvyZYSbPfL2+kmNkDwC+AKWb2vJl9pMDteRvwV8A7Y9PLLjzQ80bAscAqM1tPMEawwt2/\nV+
A2FaOjgUfDsYvVBMuRPFLgNgFcQ3Cm/HrgdOBLBW4PEOwUCXrP/1HotgCEs8W+BawDniTo/C3u\n7/FF
MYVSRESGR1H05EVEZHgo5EVESphCXkSkhCnkRURKmEJeRKSEKeRFREqYQl5EpIQp5EVEStj/\nBzjhnv
+2ClPlAAAAAElFTkSuQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x6fe3828>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"xp = np.linspace(0, 7, 100)\n",
"plt.scatter(x, y)\n",
"plt.plot(xp, p4(xp), c='r')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Looks pretty good! Let's measure the r-squared error:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.502494130455\n"
]
}
],
"source": [
"from sklearn.metrics import r2_score\n",
"\n",
"r2 = r2_score(y, p4(x))\n",
"\n",
"print r2\n"
]
},

{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Activity"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Try different polynomial orders. Can you get a better fit with higher order
s? Do you start to see overfitting, even though the r-squared score looks good f
or this particular data set?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}