Created
May 25, 2016 13:34
-
-
Save sharow/c95b09fe8bc53c9c8ac684a658674510 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"{'divide': 'warn', 'invalid': 'warn', 'over': 'warn', 'under': 'ignore'}" | |
] | |
}, | |
"execution_count": 1, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"%matplotlib inline\n", | |
"\n", | |
"# Machine Learning by Andrew Ng\n", | |
"# https://class.coursera.org/ml-005/lecture\n", | |
"# Logistic Regression with One Variable (Week 1)\n", | |
"# https://d396qusza40orc.cloudfront.net/ml/docs/slides/Lecture6.pdf\n", | |
"\n", | |
"import random\n", | |
"import math\n", | |
"import numpy as np\n", | |
"from functools import partial\n", | |
"\n", | |
"import matplotlib\n", | |
"import matplotlib.pyplot as plt\n", | |
"\n", | |
"np.seterr('ignore')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"def sigmoid(z):\n", | |
" return 1. / (1 + np.exp(-z))\n", | |
"\n", | |
"def make_h(theta):\n", | |
" def h(x):\n", | |
" return sigmoid(np.dot(theta.T, x))\n", | |
" return h\n", | |
"\n", | |
"\n", | |
"def gradient_descent(data, alpha=0.001, max_iteration=300):\n", | |
" epsilon = 0.0005\n", | |
" theta = np.zeros(data.shape[1] - 1)\n", | |
" temp = theta.copy()\n", | |
" m = data.shape[0]\n", | |
" print(data.shape)\n", | |
" #samples = list(zip(data_x, data_y))\n", | |
" r = []\n", | |
" y = data[:,-1].T\n", | |
" samples = data[:,:-1].T\n", | |
" for i in range(max_iteration):\n", | |
" h = make_h(theta.copy())\n", | |
" hx = h(samples)\n", | |
" #cost = np.array([-np.log(x) if np.isclose(yy, 1) else -np.log(1 - x) for x, yy in zip(hx, y)])\n", | |
" for j,_ in enumerate(theta):\n", | |
" temp[j] = theta[j] - alpha * np.sum((hx - y) * samples[j]) / m\n", | |
" r.append(temp.copy())\n", | |
" #print(temp)\n", | |
" if all(np.isclose(temp, theta, rtol=epsilon)):\n", | |
" print('local minimum found. iteration:', i)\n", | |
" break\n", | |
" theta = temp.copy()\n", | |
" else:\n", | |
" print('giveup! local minimum not found.')\n", | |
" return r" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"def gen_feature(x, y):\n", | |
" return np.vstack([np.ones(x.shape), x, y, x**2, y**2, x*y, x**3, y**3, x**4, y**4])\n", | |
"\n", | |
"def gen_datasets(N=4, dist=4):\n", | |
" x = np.array([random.random() * dist for _ in range(N)])\n", | |
" y = np.array([random.random() * dist for _ in range(N)])\n", | |
" dx = 2\n", | |
" dy = 2\n", | |
" z = [1 if (np.sqrt((x-dx)*(x-dx)+(y-dy)*(y-dy))) > 1 else 0 for x,y in zip(x, y)]\n", | |
" #z = [1 if x*y > 1.5 else 0 for x,y in zip(x, y)]\n", | |
" datasets = np.vstack([gen_feature(x, y), z])\n", | |
" return datasets.T" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"(240, 11)\n", | |
"local minimum found. iteration: 2213\n", | |
"[ 3.65195462 1.97034109 1.52421939 0.25664173 -0.09306913 -3.33140552\n", | |
" -1.63056589 -1.35911616 0.61435219 0.61223779]\n" | |
] | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAegAAAFwCAYAAABzZegiAAAABHNCSVQICAgI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efXWpRSb/luOKXUCgBDLLNQBsMTr2VKqR+HHGL1+WvUP9vPn49SaheAlQAmVr1l89jZS63+WTx2\njgdwtoj8BsD3AJwmIg9UHRP73OkQ6N7CJiJyALw10dUZbX5hE6BOYRNDadg/ETkk8PQcABtzbF8W\n1JoBAl5fLwB6q8x1K6V25NWwjKjZv2A8VkQ+BG8p4ht5NSwDvgNgo1LqmzXet/381e2fzedPRN4n\nIu+uPH4ngL8F8Kuqw6wdO6P0z9axUyk1Syn1AaXU4fA04Wml1AVVh8U+d1EqicVCOV7YJGL/rhCR\nswHsBfAGgKmFNTgmIvJdABMAvFdEfgegHcAB8Mq73qOUWi4ik0Xk1wB2A/hCca2NT6P+AfiUiEyD\nd+7+CC/b0gpEZDyA8wG8VInzKQCz4K04sP78RekfLD5/AIYDuF+8LX4HAfhB5Xw5MXYiWv+sHTvD\nSHvuWKiEEEIIMRAthUoIIYQQkg4KNCGEEGIgFGhCCCHEQCjQhBBCiIFQoAkhhBADoUATQgghBkKB\nJoQQQgyEAk0IIYQYyP8HhLpua040qSAAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x7f1af3aee470>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"dist = 4\n", | |
"N = 240\n", | |
"datasets = gen_datasets(N, dist)\n", | |
"plt.figure(figsize=(8, 6), dpi=50)\n", | |
"alpha = 0.05\n", | |
"gda_spotting = gradient_descent(datasets, alpha=alpha, max_iteration=6000)\n", | |
"theta = gda_spotting[-1]\n", | |
"print(theta)\n", | |
"for d in datasets:\n", | |
" x = d[1]\n", | |
" y = d[2]\n", | |
" z = d[-1]\n", | |
" if np.isclose(z, 1.0):\n", | |
" plt.plot(x, y, 'rx')\n", | |
" else:\n", | |
" plt.plot(x, y, 'bo')\n", | |
"\n", | |
"def prob(X, Y):\n", | |
" samples = datasets[:,1:-1]\n", | |
" h = make_h(theta)\n", | |
" for ax, ay in zip(X, Y):\n", | |
" yield h(gen_feature(ax, ay))\n", | |
"delta = 0.02\n", | |
"X, Y = np.meshgrid(np.arange(0.0, dist+0.01, delta), np.arange(0.0, dist+0.01, delta))\n", | |
"Z = np.array(list(prob(X, Y)))\n", | |
"plt.contourf(X, Y, Z, 3, alpha=0.2)\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.5.1" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment