Created
July 3, 2016 14:02
-
-
Save ksomemo/cb24c8e070231a6b06b9960ba4163b38 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": 41, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T14:49:21.980985", | |
"start_time": "2016-07-03T14:49:21.967200" | |
}, | |
"collapsed": false, | |
"scrolled": false | |
}, | |
"outputs": [], | |
"source": [ | |
"%matplotlib inline\n", | |
"\n", | |
"import matplotlib.pyplot as plt\n", | |
"import numpy as np\n", | |
"from matplotlib import animation as ani\n", | |
"import seaborn as sns\n", | |
"import pandas as pd" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T13:22:46.369927", | |
"start_time": "2016-07-03T13:22:46.024886" | |
}, | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# k-means\n", | |
"from sklearn import cluster\n", | |
"from sklearn import preprocessing" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T13:22:47.357366", | |
"start_time": "2016-07-03T13:22:47.335787" | |
}, | |
"collapsed": false, | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n", | |
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n", | |
" 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n", | |
" 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n", | |
" 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n", | |
" 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n", | |
" 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2])" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"iris = sns.load_dataset(\"iris\")\n", | |
"le = preprocessing.LabelEncoder()\n", | |
"le.fit_transform(iris.species)\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T13:22:53.376723", | |
"start_time": "2016-07-03T13:22:53.231269" | |
}, | |
"collapsed": false, | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Initialization complete\n", | |
"Iteration 0, inertia 67.390\n", | |
"Iteration 1, inertia 46.036\n", | |
"Iteration 2, inertia 43.245\n", | |
"Iteration 3, inertia 39.989\n", | |
"Iteration 4, inertia 37.769\n", | |
"Iteration 5, inertia 37.200\n", | |
"Iteration 6, inertia 37.147\n", | |
"Iteration 7, inertia 37.100\n", | |
"Iteration 8, inertia 37.086\n", | |
"Converged at iteration 8\n", | |
"Initialization complete\n", | |
"Iteration 0, inertia 51.920\n", | |
"Iteration 1, inertia 37.765\n", | |
"Iteration 2, inertia 37.063\n", | |
"Iteration 3, inertia 37.051\n", | |
"Converged at iteration 3\n", | |
"Initialization complete\n", | |
"Iteration 0, inertia 62.230\n", | |
"Iteration 1, inertia 46.873\n", | |
"Iteration 2, inertia 40.701\n", | |
"Iteration 3, inertia 38.881\n", | |
"Iteration 4, inertia 38.221\n", | |
"Iteration 5, inertia 37.817\n", | |
"Iteration 6, inertia 37.351\n", | |
"Iteration 7, inertia 37.063\n", | |
"Iteration 8, inertia 37.051\n", | |
"Converged at iteration 8\n", | |
"Initialization complete\n", | |
"Iteration 0, inertia 54.320\n", | |
"Iteration 1, inertia 47.605\n", | |
"Iteration 2, inertia 43.791\n", | |
"Iteration 3, inertia 40.970\n", | |
"Iteration 4, inertia 38.957\n", | |
"Iteration 5, inertia 38.221\n", | |
"Iteration 6, inertia 37.817\n", | |
"Iteration 7, inertia 37.351\n", | |
"Iteration 8, inertia 37.063\n", | |
"Iteration 9, inertia 37.051\n", | |
"Converged at iteration 9\n", | |
"Initialization complete\n", | |
"Iteration 0, inertia 51.670\n", | |
"Iteration 1, inertia 38.183\n", | |
"Iteration 2, inertia 37.476\n", | |
"Iteration 3, inertia 37.101\n", | |
"Iteration 4, inertia 37.063\n", | |
"Iteration 5, inertia 37.051\n", | |
"Converged at iteration 5\n", | |
"Initialization complete\n", | |
"Iteration 0, inertia 73.500\n", | |
"Iteration 1, inertia 52.003\n", | |
"Iteration 2, inertia 49.497\n", | |
"Iteration 3, inertia 47.448\n", | |
"Iteration 4, inertia 45.700\n", | |
"Iteration 5, inertia 44.161\n", | |
"Iteration 6, inertia 43.045\n", | |
"Iteration 7, inertia 40.095\n", | |
"Iteration 8, inertia 38.468\n", | |
"Iteration 9, inertia 37.935\n", | |
"Iteration 10, inertia 37.430\n", | |
"Iteration 11, inertia 37.193\n", | |
"Iteration 12, inertia 37.063\n", | |
"Iteration 13, inertia 37.051\n", | |
"Converged at iteration 13\n", | |
"Initialization complete\n", | |
"Iteration 0, inertia 53.330\n", | |
"Iteration 1, inertia 41.359\n", | |
"Iteration 2, inertia 39.876\n", | |
"Iteration 3, inertia 38.468\n", | |
"Iteration 4, inertia 38.251\n", | |
"Iteration 5, inertia 38.074\n", | |
"Iteration 6, inertia 37.999\n", | |
"Iteration 7, inertia 37.878\n", | |
"Iteration 8, inertia 37.802\n", | |
"Iteration 9, inertia 37.714\n", | |
"Iteration 10, inertia 37.654\n", | |
"Iteration 11, inertia 37.439\n", | |
"Iteration 12, inertia 37.328\n", | |
"Iteration 13, inertia 37.260\n", | |
"Iteration 14, inertia 37.147\n", | |
"Iteration 15, inertia 37.100\n", | |
"Iteration 16, inertia 37.086\n", | |
"Converged at iteration 16\n", | |
"Initialization complete\n", | |
"Iteration 0, inertia 70.220\n", | |
"Iteration 1, inertia 49.673\n", | |
"Iteration 2, inertia 47.651\n", | |
"Iteration 3, inertia 45.908\n", | |
"Iteration 4, inertia 44.658\n", | |
"Iteration 5, inertia 44.004\n", | |
"Iteration 6, inertia 42.193\n", | |
"Iteration 7, inertia 39.743\n", | |
"Iteration 8, inertia 38.221\n", | |
"Iteration 9, inertia 37.817\n", | |
"Iteration 10, inertia 37.351\n", | |
"Iteration 11, inertia 37.063\n", | |
"Iteration 12, inertia 37.051\n", | |
"Converged at iteration 12\n", | |
"Initialization complete\n", | |
"Iteration 0, inertia 54.410\n", | |
"Iteration 1, inertia 43.316\n", | |
"Iteration 2, inertia 39.994\n", | |
"Iteration 3, inertia 38.334\n", | |
"Iteration 4, inertia 38.171\n", | |
"Iteration 5, inertia 37.999\n", | |
"Iteration 6, inertia 37.878\n", | |
"Iteration 7, inertia 37.802\n", | |
"Iteration 8, inertia 37.714\n", | |
"Iteration 9, inertia 37.654\n", | |
"Iteration 10, inertia 37.439\n", | |
"Iteration 11, inertia 37.328\n", | |
"Iteration 12, inertia 37.260\n", | |
"Iteration 13, inertia 37.147\n", | |
"Iteration 14, inertia 37.100\n", | |
"Iteration 15, inertia 37.086\n", | |
"Converged at iteration 15\n", | |
"Initialization complete\n", | |
"Iteration 0, inertia 51.720\n", | |
"Iteration 1, inertia 41.585\n", | |
"Iteration 2, inertia 39.876\n", | |
"Iteration 3, inertia 38.468\n", | |
"Iteration 4, inertia 38.251\n", | |
"Iteration 5, inertia 38.074\n", | |
"Iteration 6, inertia 37.999\n", | |
"Iteration 7, inertia 37.878\n", | |
"Iteration 8, inertia 37.802\n", | |
"Iteration 9, inertia 37.714\n", | |
"Iteration 10, inertia 37.654\n", | |
"Iteration 11, inertia 37.439\n", | |
"Iteration 12, inertia 37.328\n", | |
"Iteration 13, inertia 37.260\n", | |
"Iteration 14, inertia 37.147\n", | |
"Iteration 15, inertia 37.100\n", | |
"Iteration 16, inertia 37.086\n", | |
"Converged at iteration 16\n" | |
] | |
}, | |
{ | |
"data": { | |
"text/plain": [ | |
"KMeans(copy_x=True, init='k-means++', max_iter=300, n_clusters=3, n_init=10,\n", | |
" n_jobs=1, precompute_distances='auto', random_state=None, tol=0.0001,\n", | |
" verbose=1)" | |
] | |
}, | |
"execution_count": 4, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"clf = cluster.KMeans(n_clusters=3, verbose=1)\n", | |
"clf.fit(iris[[\"sepal_length\", \"sepal_width\"]], iris.species)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T13:23:01.685259", | |
"start_time": "2016-07-03T13:23:01.677936" | |
}, | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"['cluster_centers_', 'inertia_', 'labels_', 'n_iter_']" | |
] | |
}, | |
"execution_count": 5, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"[a for a in dir(clf) if not a.startswith(\"_\") and a.endswith(\"_\")]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T13:23:02.652686", | |
"start_time": "2016-07-03T13:23:02.647449" | |
}, | |
"collapsed": false, | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(37.050702127659569, 4)" | |
] | |
}, | |
"execution_count": 6, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"clf.inertia_, clf.n_iter_" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T13:23:03.742553", | |
"start_time": "2016-07-03T13:23:03.736204" | |
}, | |
"collapsed": false, | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"array([[ 5.006 , 3.428 ],\n", | |
" [ 6.81276596, 3.07446809],\n", | |
" [ 5.77358491, 2.69245283]])" | |
] | |
}, | |
"execution_count": 7, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"clf.cluster_centers_" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T13:24:55.526142", | |
"start_time": "2016-07-03T13:24:54.408520" | |
}, | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<seaborn.axisgrid.FacetGrid at 0x117f5aa58>" | |
] | |
}, | |
"execution_count": 11, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAFdCAYAAAD2cpGEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3WtgE2W+BvAnaXqBhmtpuUqBKiK64IK4IALl4gpYkVuQ\nAgWWKiuCN7xAEWFBROBUjwcBt8i6WGBRcMvCAl5PFQQX6Hq6qIXCbuViL9JSC23aQJtmzgdMbKAz\nSSYzk0n7/D4xmczMk6HtP5k3/3kNgiAIICIiqocx0AGIiEi/WCSIiEgUiwQREYlikSAiIlEsEkRE\nJIpFgoiIRJnUPsD48eNhNpsBAJ06dcLKlStd6zIzM7FhwwaYTCZMmDABFotF7ThEROQDVYtEdXU1\nACA9Pf2GdXa7HatWrUJGRgbCw8ORmJiI4cOHo3Xr1mpGIiIiH6h6uSk3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7NixeOmll5Cbm4vLly/jn//8J4Brl6OeffZZ1/P37dsH4NqsaOXl5ejevTu++uorPPnkkxg2\nbBiOHTsGAF7/MXY+r3///nj//fdht9tRWVmJKVOm3DAbX10DBgzAwYMHUVlZierqanzyySeuAmIy\nmVBbW+v7ySDSCX6SIN1ISkrCs88+i127diEkJAQvv/wy2rVrhxUrVqC6uhpmsxmrV692PT8/Px/j\nx48HALzxxhswGo144oknkJiY6BpA7tSpE/Lz8706vvMP++TJk3Hu3DmMGzcOtbW1mDhxIvr16+cq\nOte75ZZbMG3aNEyePBlNmzZFq1atEBERAQCIj4/Ho48+ik2bNvHbTRSUeKtwCkpJSUl48skn0a9f\nv0BHwdmzZ/HFF19g5syZAIDHH38ckyZNQnx8fEBzESmBnyQoKMl9Vz59+nS3OY4FQYDBYMDkyZPx\n8MMPy9pnhw4d8O233+LBBx+EwWDAvffeywJBDQY/SRARkSgOXBMRkSgWCSIiEsUiQUREolgkiIhI\nFIsEERGJYpEgIiJR/w8FiwDE6UE8WgAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x117f4c5f8>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAakAAAFdCAYAAAC5L5JUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtAFPXaB/DvLstFWVRA8JqXKCUr9aR2NEJI7aRGZiom\nKlJSlkk37byIqR2pfNWIOl7DUx3zkqWFaV7SjOO1o5KvmqFokTdABRGFhVVYdt4/aDdW2WFZZoZZ\n+H7+0ZnZmXl2dvXZuTy/RyMIggAiIiIV0tZ3AERERPYwSRERkWoxSRERkWoxSRERkWoxSRERkWox\nSRERkWrp5N7BiBEjoNfrAQDt27fH3LlzrcvS0tKwdOlS6HQ6jBw5EpGRkXKHQ0RELkTWJFVWVgYA\nWLly5W3LTCYT5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//nPf7Bt2zasX78eHTp0wIYNGwBU/md/5coV6+vd\n3NysfzebzXBzc8Orr76KFi1a4JFHHsHQoUOxdevWWsdhNpvx97//HYMGDQJQ2UPK29sbR48ehYeH\nh/V1lqSm1WqtI1/XxBKzRqMBh8skchwfnKB699577+Gbb77B8OHDMWvWLGRmZuL69ev46aefAFRe\nDpw2bZr19Vu2bAFQ2R22qKgIXbp0wY8//ohXXnkFAwYMwKFDhwDA4WRgeV3fvn3x5ZdfwmQyoaSk\nBGPHjr2tE3FV/fr1w549e1BSUoKysjLs2LHDmsB0Oh0qKipqfzCIyAbPpKjeRUdHY9q0adiwYQPc\n3Nzw9ttvo3Xr1njnnXdQVlYGvV6P+fPnW1+fnZ2NESNGAAA+/PBDaLVavPzyy4iKirI+wNC+fXtk\nZ2c7tH9LYhkzZgzOnTuHp556ChUVFRg1ahT69OljTXq3uvvuuzF+/HiMGTMGTZs2ha+vL7y8vAAA\n4eHheP755/Hxxx/z6T6iOmCrDnIp0dHReOWVV9CnT5/6DgVnz57Frl278MwzzwAAXnrpJYwePRrh\n4eH1GhdRQ8IzKXIpzp6VTJgwAcXFxdZpQRCg0WgwZswYPP30005ts23btjh+/DieeOIJaDQaPPzw\nw0xQRBLjmRQREakWH5wgIiLVYpIiIiLVYpIiIiLVYpIiIiLVYpIiIiLVYpIiIiLV+n89e8RuRGiC\nAgAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x117cd56d8>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"iris_kmeans = iris.copy()\n", | |
"iris_kmeans[\"species\"] = clf.labels_\n", | |
"sns.lmplot(data=iris_kmeans, x=\"sepal_length\", y=\"sepal_width\", hue=\"species\", fit_reg=False)\n", | |
"sns.lmplot(data=iris, x=\"sepal_length\", y=\"sepal_width\", hue=\"species\", fit_reg=False)\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 21, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"from scipy.spatial import distance" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 30, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"1.4142135623730951" | |
] | |
}, | |
"execution_count": 30, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"distance.euclidean([0, 0], [1, 1])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 32, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"1.4142135623730951" | |
] | |
}, | |
"execution_count": 32, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# http://stackoverflow.com/questions/1401712/how-can-the-euclidean-distance-be-calculated-with-numpy\n", | |
"np.linalg.norm(np.array([0, 0]) - np.array([1, 1]))\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 65, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(2, 1)" | |
] | |
}, | |
"execution_count": 65, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# http://docs.scipy.org/doc/numpy/reference/generated/numpy.argmin.html\n", | |
"np.argmin([2,3,1]), np.argmax([2,3,1])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 69, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"array([[4, 5, 6],\n", | |
" [1, 2, 3]])" | |
] | |
}, | |
"execution_count": 69, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"reshaped = np.array([4,5,6,1,2,3]).reshape(2, 3)\n", | |
"reshaped" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 78, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(3, 2)" | |
] | |
}, | |
"execution_count": 78, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"np.argmin(reshaped), np.argmax(reshaped)\n", | |
"# flattenしたときのIndex" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 279, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[False False False False False]\n", | |
"[False False False True True]\n" | |
] | |
}, | |
{ | |
"data": { | |
"text/plain": [ | |
"array(['a', 1, 'b', nan, None], dtype=object)" | |
] | |
}, | |
"execution_count": 279, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"import pandas as pd\n", | |
"print(pd.isnull(np.array(['a', 1, 'b', np.nan, np.nan])))\n", | |
"print(pd.isnull(np.array(['a', 1, 'b', np.nan, None])))\n", | |
"np.array(['a', 1, 'b', np.nan, None])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# ランダムにクラスタとなるデータをK個選ぶ\n", | |
"# 各データは、K個のデータうち、一番近いクラスタに属させる\n", | |
"# クラスタ内の重心を変更する" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 60, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T20:43:11.967182", | |
"start_time": "2016-07-03T20:43:11.950633" | |
}, | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"import collections\n", | |
"\n", | |
"def kmeans(data, n_cluster=3, max_iter=300, random_state=None, verbose=None):\n", | |
" # 初期化\n", | |
" centroids = init_centroids(data, random_state)\n", | |
" \n", | |
" # 所属クラスタ\n", | |
" old_centroids = centroids\n", | |
" old_clusters = np.zeros(len(data))\n", | |
" \n", | |
" for i in range(max_iter):\n", | |
" new_clusters = clusters(data, centroids)\n", | |
" if verbose:\n", | |
" print(i, collections.Counter(new_clusters), centroids)\n", | |
"\n", | |
" centroids = move_centroids(data, n_cluster, new_clusters)\n", | |
" if old_centroids == centroids:\n", | |
" print(\"old_centroids == centroids\")\n", | |
" print(old_centroids)\n", | |
" print(centroids)\n", | |
" break\n", | |
" old_centroids = centroids\n", | |
" return new_clusters" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T14:18:56.525975", | |
"start_time": "2016-07-03T14:18:56.519868" | |
}, | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"def init_centroids(data, random_state):\n", | |
" np.random.seed(random_state)\n", | |
" centroids_idx = np.random.choice(data.index, n_cluster)\n", | |
" centroids = [(data.loc[idx, \"sepal_length\"], data.loc[idx, \"sepal_width\"]) for idx in centroids_idx]\n", | |
" return centroids" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 19, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T14:18:57.342515", | |
"start_time": "2016-07-03T14:18:57.330858" | |
}, | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"def clusters(data, centroids):\n", | |
" d_centroids = []\n", | |
" for length, width in centroids:\n", | |
" d_centroids.append(np.linalg.norm(\n", | |
" np.c_[data.sepal_length - length, data.sepal_width - width], axis=1))\n", | |
"\n", | |
" d_centroids = np.array(d_centroids).T\n", | |
" clusters = np.argmin(d_centroids, axis=1)\n", | |
" return clusters\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 26, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T14:20:21.529068", | |
"start_time": "2016-07-03T14:20:21.521946" | |
}, | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"def move_centroids(data, n_cluster, clusters):\n", | |
" new_centroids = []\n", | |
" for c in range(n_cluster):\n", | |
" c_data = data[clusters == c]\n", | |
" center = c_data.sepal_length.mean(), c_data.sepal_width.mean()\n", | |
" new_centroids.append(center)\n", | |
" return new_centroids\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 62, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T20:43:31.598189", | |
"start_time": "2016-07-03T20:43:30.930219" | |
}, | |
"collapsed": false, | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"0 Counter({2: 85, 0: 47, 1: 18}) [(4.5999999999999996, 3.2000000000000002), (7.7000000000000002, 3.7999999999999998), (5.7999999999999998, 2.7000000000000002)]\n", | |
"1 Counter({2: 67, 0: 56, 1: 27}) [(4.9425531914893615, 3.3659574468085105), (7.283333333333336, 3.1333333333333337), (6.036470588235295, 2.870588235294118)]\n", | |
"2 Counter({2: 63, 0: 56, 1: 31}) [(5.014285714285713, 3.3357142857142863), (7.096296296296296, 3.1148148148148134), (6.031343283582089, 2.8014925373134334)]\n", | |
"3 Counter({2: 60, 0: 56, 1: 34}) [(5.014285714285713, 3.3357142857142863), (7.032258064516128, 3.0870967741935478), (5.995238095238095, 2.795238095238096)]\n", | |
"4 Counter({2: 58, 0: 56, 1: 36}) [(5.014285714285713, 3.3357142857142863), (6.985294117647057, 3.079411764705882), (5.97, 2.785000000000001)]\n", | |
"5 Counter({0: 56, 2: 56, 1: 38}) [(5.014285714285713, 3.3357142857142863), (6.952777777777776, 3.0861111111111104), (5.955172413793104, 2.770689655172414)]\n", | |
"6 Counter({0: 56, 2: 55, 1: 39}) [(5.014285714285713, 3.3357142857142863), (6.926315789473683, 3.0789473684210518), (5.9375, 2.7642857142857147)]\n", | |
"7 Counter({0: 55, 2: 54, 1: 41}) [(5.014285714285713, 3.3357142857142863), (6.910256410256409, 3.0871794871794864), (5.930909090909091, 2.752727272727273)]\n", | |
"8 Counter({0: 54, 2: 54, 1: 42}) [(5.014545454545454, 3.354545454545455), (6.8804878048780465, 3.0975609756097553), (5.9, 2.724074074074074)]\n", | |
"9 Counter({2: 54, 0: 53, 1: 43}) [(5.012962962962962, 3.3703703703703707), (6.869047619047618, 3.0928571428571425), (5.875925925925925, 2.7166666666666663)]\n", | |
"10 Counter({2: 53, 0: 52, 1: 45}) [(5.00943396226415, 3.383018867924529), (6.853488372093022, 3.0999999999999996), (5.857407407407408, 2.7037037037037037)]\n", | |
"11 Counter({2: 54, 0: 51, 1: 45}) [(5.0019230769230765, 3.390384615384616), (6.83333333333333, 3.086666666666666), (5.828301886792453, 2.70566037735849)]\n", | |
"12 Counter({2: 53, 0: 51, 1: 46}) [(5.003921568627451, 3.409803921568628), (6.83333333333333, 3.086666666666666), (5.811111111111113, 2.6999999999999997)]\n", | |
"13 Counter({2: 53, 0: 51, 1: 46}) [(5.003921568627451, 3.409803921568628), (6.823913043478258, 3.0782608695652165), (5.800000000000001, 2.6999999999999997)]\n", | |
"old_centroids == centroids\n", | |
"[(5.003921568627451, 3.409803921568628), (6.823913043478258, 3.0782608695652165), (5.800000000000001, 2.6999999999999997)]\n", | |
"[(5.003921568627451, 3.409803921568628), (6.823913043478258, 3.0782608695652165), (5.800000000000001, 2.6999999999999997)]\n" | |
] | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAFhCAYAAACBP4ZvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X+cHXV97/HXOTkkyhIghA0kBvxR2g+xV5EGiwIGoXit\nCGLBglBSUKJI/VEq/WFswSv3IRcvaGuhoiUIkSIFL0gag6DyQyBWRRpBLHyClho3CeyyBPKTJJs9\n94+Zs5zd7M7MmZ2ZnXP2/Xw8eLBzvjszn50k+zkz3/P5fir1eh0REZEo1YkOQEREyk/JQkREYilZ\niIhILCULERGJpWQhIiKxlCxERCRWLe8TmNkjwIvh5tPufl7T2MnA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3b70>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"import ipywidgets\n", | |
"\n", | |
"@ipywidgets.interact(\n", | |
" n_cluster=(2, 6, 1),\n", | |
" max_iter=(1, 100, 1),\n", | |
" verbose=False\n", | |
")\n", | |
"def run_my_kmeans(n_cluster=3, max_iter=30, verbose=False):\n", | |
" iris_my_kmeans = iris.copy()\n", | |
" iris_my_kmeans[\"species\"] = kmeans(iris_my_kmeans,\n", | |
" n_cluster=n_cluster,\n", | |
" max_iter=max_iter,\n", | |
" random_state=0,\n", | |
" verbose=verbose)\n", | |
" sns.lmplot(data=iris_my_kmeans, x=\"sepal_length\", y=\"sepal_width\", hue=\"species\", fit_reg=False)\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 58, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2016-07-03T20:17:51.062685", | |
"start_time": "2016-07-03T20:17:51.042077" | |
}, | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(148, 150)" | |
] | |
}, | |
"execution_count": 58, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"labels = pd.DataFrame({\n", | |
" \"sk\": iris_kmeans.species,\n", | |
" \"my\": iris_my_kmeans.species\n", | |
" })\n", | |
"labels[\"same\"] = labels.sk == labels.my\n", | |
"labels.same.sum(), labels.shape[0]" | |
] | |
} | |
], | |
"metadata": { | |
"hide_input": false, | |
"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" | |
}, | |
"toc": { | |
"toc_cell": false, | |
"toc_number_sections": true, | |
"toc_threshold": 6, | |
"toc_window_display": false | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment