{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Python implementation of the Kneedle algorithm\n", "Finding a “Kneedle” in a Haystack: Detecting Knee Points in System Behavior \n", "Ville Satopa, Jeannie Albrecht, David Irwin, and Barath Raghavan \n", "https://www1.icsi.berkeley.edu/~barath/papers/kneedle-simplex11.pdf" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import numpy as np\n", "import scipy\n", "\n", "import matplotlib.pyplot as plt\n", "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Finding the knee from figure 2 from the paper" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def figure2():\n", " x = np.linspace(0.0, 1, 10)\n", " with np.errstate(divide='ignore'):\n", " return x,np.true_divide(-1, x + 0.1) + 5" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Step 0: Raw input" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "x,y = figure2()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [], "source": [ "invert = False\n", "if invert:\n", " x = [max(x) - x_ for x_ in x]\n", " y = [max(y) - y_ for y_ in y]" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [], "source": [ "if not np.array_equal(np.array(x), np.sort(x)):\n", " raise ValueError('x needs to be sorted')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Step 1: Fit a spline" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": true }, "outputs": [], "source": [ "from scipy.interpolate import interp1d,UnivariateSpline,InterpolatedUnivariateSpline" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [], "source": [ "N = len(x)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Ds = the finite set of x- and y-values that define a smooth curve, \n", "# one that has been fit to a smoothing spline.\n", "uspline = interp1d(x,y)\n", "\n", "Ds_x = np.linspace(np.min(x), np.max(x), N)\n", "Ds_y = uspline(Ds_x)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHPlJREFUeJzt3Xl0VNeB5/HvVWnfd4R2oQ2w2QUIL4ljO/Fu7HTmJOnu\nrJ3DeMaxM6fTJ+skOZPuTKfTPd1Z3EmG6XZnPJ0Zp0+8YBOIg+O2nZhdrGaRECCQhIR2tC9VdecP\nKQ7BAglUqlf16vc5h3Mo1dN9v4tKP56eXr1rrLWIiIh7RDkdQEREAkvFLiLiMip2ERGXUbGLiLiM\nil1ExGVU7CIiLqNiFxFxGRW7iIjLqNhFRFwm2omdZmdn29LSUid2LSISturq6rqstTkzbedIsZeW\nlrJ//34ndi0iEraMMedms51OxYiIuIyKXUTEZVTsIiIuo2IXEXEZFbuIiMuo2EVEXEbFLiLiMgG7\njt0Y4wH2A63W2gcDNa6ISLiwfj9Dg5cY7Oti6FI3owM9jA/2MDHUg3+4FzvSR/Gdn6Fg0U3zmiOQ\nb1D6HHACSA3gmCIiQeX3+Ri41MNgXxfD/V2MTZWzd6h3spxH+4ga6yd6/BIxE/3EewdI9A2QZIdI\ntkMkGx/JVxvbGo6euyU8it0YUwg8AHwL+PNAjCkiMhdjo8P0dbUx0N3GSF8HY4Pd+IZ6scN9MNpH\n1Nglosf7ifVOlbN/kGQ7SLIdJs1Y0q4y7oT1MGCSGDLJjHiSGY1OZSChEG9sKv74dExCOlEJ6UQn\nZRCbnEl8ShaJadkkpWWRkprBCo9n3uceqCP27wJfAFKutoExZhOwCaC4uDhAuxWRSDE8eIm+rnYG\ne9oZ6bvIeH8HvsFO7FAXnpEeYsd6SJjoJdnXR5q/n2QzwgJgwTRjjdoYBk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HXfJnN17gK\nyDDGvG6MqTPGfDxo6ebHbOb8FLAEuAAcBT5nrfUHJ55j5rW/wmrNU5lkjHkfk8V+m9NZguC7wBet\ntf7JAzrXiwbWAHcBCcAuY8xua22Ds7Hm1T3AIeBOoBzYYYz5jbW239lY4StUi70VKLrsceHUx653\nm3Ayq/kYY5YD/wTcZ63tDlK2+TKbOdcAz06VejZwvzHGa619MTgRA2o2820Buq21Q8CQMeZNYAUQ\nrsU+mzl/Cvi2nTz53GiMOQssBvYGJ6Ij5rW/QvVUzD6g0hhTZoyJBT4CvHTFNi8BH5/67XItcMla\n2xbsoAE045yNMcXA88DHXHIEN+OcrbVl1tpSa20p8HPgP4dpqcPsXtdbgNuMMdHGmERgPXAiyDkD\naTZzPs/kTygYYxYA1cCZoKYMvnntr5A8YrfWeo0xnwVeYfK36k9ba48ZYx6bev7HTF4hcT/QCAwz\n+b9+2JrlnL8OZAE/nDqC9dowvoHSLOfsGrOZr7X2hDHml8ARwA/8k7V22kvmwsEsv8Z/CfzEGHOU\nyatEvmitDes7Phpj/h9wB5BtjGkBvgHEQHD6S+88FRFxmVA9FSMiIjdIxS4i4jIqdhERl1Gxi4i4\njIpdRMRlVOwiIi6jYhcRcRkVu4iIy/x/d2MzG2lbu54AAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plt.plot(x,y);\n", "plt.plot(Ds_x,Ds_y);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Step 2: Normalize the spline" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [], "source": [ "def normalize(a):\n", " \"\"\"return the normalized input array\"\"\"\n", " return (a - min(a)) / (max(a) - min(a))" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# x and y normalized to unit square\n", "xsn = normalize(Ds_x)\n", "ysn = normalize(Ds_y)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Step 3: Calculate the difference curve" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# the difference curve\n", "xd = xsn\n", "yd = ysn - xsn" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEICAYAAACktLTqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd8VFX+//HXJ40USCAJRWrovYgBVEC6gmXtDddeFvtW\ndXe/us3d1d+u69pW7F1QkbWtDQgIilSlJ4TQE0oKkEAg/fz+ODcyxJQBJnMzM5/n4zEPZubezHzu\nJLxzcu6554gxBqWUUsElzO0ClFJK+Z6Gu1JKBSENd6WUCkIa7kopFYQ03JVSKghpuCulVBDScA9h\nIvJHEXnTud9ZRA6JSLiP32ObiEz08Wu+KiIPO/dHi8hGX76+L9X3GYtIWxFZKCIHReQxsV4Rkf0i\nsszdylWg03BvRE6w5YpInMdzt4jIAhfLqpUxZocxprkxptLtWo6HMWaRMaZ3Y7y2E7aPiUiBc5t1\nMq9Xy2d8G5APxBtjfgWMAiYBHY0xw0+uehXqNNwbXzhw78m+iBM0+v3yr7OBnwKDgfbAcz5+/S7A\nBnP0SsIuwDZjTPHxvpCIRPi0MpcF2/G4QcOi8f0D+LWItKxto4icKSLLRaTQ+fdMj20LROSvIvIN\ncBjo5jz3sIgsdv7E/1hEkkTkLREpcl4jxeM1nhCRnc62lSIyuo46UkTEiEiEiJzhvHb1rUREtjn7\nhYnIAyKy2WnNvisiiR6vc62IbHe2/b6+D0ZEzhWRDU63RI6I/Np5fqyIZIvI70Qk3/kL6Jo6XmOs\niGR7PN4mIr8WkTXOZ/qOiER7bD9fRFaJyAHnMxxUT4nlwBFgjzGm1Bgzp77jcV6/q4h85RzTHCDZ\nY5vnZ/wqcD1wn/MZ/wx4Eaj+7P/UUL3Osd4vImuAYud124vI+yKSJyJbReQej/3/6H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bn1vDzmoOLNMRtj0kXkc2ANUAW8aIypdUhdIPDy+/wX4FURWYsdQXK/MSZgpwIWkRnA\nWCBZRLKBPwCR4J/80ukHlFIqCDXlbhmllFInSMNdKaWCkIa7UkoFIQ13pZQKQhruSikVhDTclVIq\nCGm4K6VUEPr/YW0T1SM0TXwAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plt.title(\"Normalized spline & difference curve\");\n", "plt.plot(xsn,ysn);\n", "plt.plot(xd,yd);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Step 4: Identify local maxima \n", "of the difference curve" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": true }, "outputs": [], "source": [ "from scipy.signal import argrelextrema" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# local maxima for knees\n", "xmx_idx = argrelextrema(yd, np.greater)[0]\n", "xmx = xd[xmx_idx]\n", "ymx = yd[xmx_idx]\n", "#Dmx = np.stack((xmx,ymx))\n", "\n", "# local minima\n", "xmn_idx = argrelextrema(yd, np.less)[0]\n", "xmn = xd[xmn_idx]\n", "ymn = yd[xmn_idx]" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEICAYAAACktLTqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4VVW6x/Hvm96AJCR0QmgiSO8KKrahjYpt7Ag6Ktbx\nzp3iOI4zdyxXp6kzqAyDXUf0WhhExjJWAiJdEBASaug5KZBG6rp/rA0cQkIOcJJ9yvt5nvNwzt47\nZ787J/mxs/baa4kxBqWUUqElwu0ClFJK+Z+Gu1JKhSANd6WUCkEa7kopFYI03JVSKgRpuCulVAjS\ncA8wIrJVRC5swvcfIyI7mur9T6COGSLym2bYT4aIlIhIpJ/ez4hID+f5Ucc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zQAsRESAJG+7VzVvmyTHGfIWttyEBmSeh\nGO5+m9A7AJ1o3bdgzyiCRaPHJyIdgcuA55qxLn/w5bM7DUgRkS9EZLmITG626k6NL8c2HegN7ALW\nAD8xxtQ2T3lNLiDzpFknyFbNR0TOw4b7aLdr8bOngF8aY2rtSWBIiQKGABcA8cDXIrLYGLPR3bL8\nYiywCjgf6A58IiILjDEH3C0rdIViuIfyhN4+1S0i/YFZwHhjTH4z1eYPvhzfUGC2E+xpwAQRqTbG\nzGmeEk+aL8e2A8g3xpQCpSLyFTAACPRw9+XYpgKPG9tInSMiW4DTgSXNU2KTCsg8CcVmmVCe0LvR\nYxORDOBd4MYgPONr9PiMMV2NMZnGmEzgbeDOIAh28O3n8l/AaBGJEpEEYASwvpnrPBm+HNt27F8k\niEhboBewuVmrbDoBmSchd+ZuQnhCbx+P7SGgNfCsc3ZbbQJ01Lq6fDy+oOTLsRlj1ovIh8BqoBaY\nZYypt/tdIPHxc3sYeElE1mB7lfzSGBMUwwCLyBvAGCBNRHYAvwWiIbDzRIcfUEqpEBSKzTJKKRX2\nNNyVUioEabgrpVQI0nBXSqkQpOGulFIhSMNdKaVCkIa7UkqFoP8HMytuQYkfca8AAAAASUVORK5C\nYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plt.title(\"local maxima in difference curve\");\n", "plt.plot(xsn,ysn);\n", "plt.plot(xd,yd);\n", "plt.hlines(ymx, plt.xlim()[0], plt.xlim()[1]);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Step 5: Calculate thresholds" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Sensitivity parameter S\n", "# smaller values detect knees quicker\n", "S = 1.0" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def threshold(ymx_i):\n", " return ymx_i - (S * np.diff(xsn).mean())" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 0.42528736])" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Tmx = threshold(ymx)\n", "Tmx" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Step 6: knee finding algorithm" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If any difference value (xdj, ydj), where j > i, drops below the threshold y = T|mxi\n", "for (x|mxi, y|mxi) before the\n", "next local maximum in the difference curve is reached,\n", "Kneedle declares a knee at the x-value of the corresponding\n", "local maximum x = x|xi. \n", "**If the difference values reach\n", "a local minimum and starts to increase before y = T|mxi\n", "is reached, we reset the threshold value to 0 and wait for\n", "another local maximum to be reached.**" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [], "source": [ "mxmx_iter = np.arange(xmx_idx[0], len(xsn))\n", "xmx_idx_iter = np.append(xmx_idx, len(xsn))\n", "\n", "knee_, norm_knee_, knee_x = 0.0, 0.0, None \n", "for mxmx_i in range(len(xmx_idx_iter)): \n", "\n", " # stopping criteria for exhasuting array\n", " if mxmx_i == len(xmx_idx_iter) - 1: \n", " break\n", " \n", " # indices between maxima/minima\n", " idxs = ( mxmx_iter > xmx_idx_iter[mxmx_i] ) * ( mxmx_iter < xmx_idx_iter[mxmx_i+1] )\n", " between_local_mx = mxmx_iter[np.where(idxs)]\n", "\n", " for j in between_local_mx:\n", " if j in xmn_idx:\n", "\n", " # reached a minima, x indices are unique\n", " # only need to check if j is a min\n", " if yd[j + 1] > yd[j]:\n", " Tmx[mxmx_i] = 0\n", " elif yd[j + 1] <= yd[j]:\n", " print('If this is a minima, how would you ever get here: {}'.format(j,knee))\n", " \n", " if yd[j] < Tmx[mxmx_i]:\n", " if not knee_x:\n", " knee_x = j\n", " # declare a knee\n", " knee = x[xmx_idx[mxmx_i]]" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANS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Z\n9gBFxpgyoExEPgUGAZuCNN4RV3HqUzL+jnUT8AffFN4WEdmOnQtfFozxfL93N4G94AlsB7adwlgB\nqccRTk/6B/qB/QdrG9CNoxdbTm9wzMUcewFkWTDHq3fsr2neBVV/PlsXYAswsoV+LXty9ILqEOwf\nagn2r6Xv+Oc59Quq/ny2zHqfbRiwK5ifDTttMdd3bAKwDsgJ5q8lkIKdT04M8p+Tp4Ff+77O8P05\nSQvieG3xXbAFbsPOiTfn70I2J76gGrA8CeTD8QKC8qHs1etN2CvqP/e9dgdwh+9rAab53v8KyA3y\neJnYs7JS4KDv6+QgjTUDOID9L/BqYEWQP9uDwHrfWIuBUcEcr8Gxz3OK4e7nZ5vq+2xrsBenm/UP\npj+fDXgA2zGzDvhxC4z3Q2BWc8bx89fyNOBj39+3dcB1QR7vLN/7G4G38HWQneJYM4F92IaIPdjp\nzqDlSaAeeoeqUkq5kF5QVUopF9JwV0opF9JwV0opF9JwV0opF9JwV0opF9JwV0opF9JwV0opF9Jw\nV0opF/r/uvS9Z3wI/0wAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plt.xticks(np.arange(0,1.1,0.1))\n", "plt.plot(xsn,ysn);\n", "plt.plot(xd,yd);\n", "plt.hlines(Tmx[0], plt.xlim()[0], plt.xlim()[1], colors='g', linestyles='dashed');\n", "plt.vlines(xmx, plt.ylim()[0], plt.ylim()[1], colors='r', linestyles='dashed');" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The vertical, red dashed line represents the x value of the knee point. The horizontal greeb dashed line represents the threshold value." ] }, { "cell_type": "code", "execution_count": 22, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.22222222222222221" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "knee" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.55555555555555558" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# normalized x value where the knee was determined\n", "xsn[knee_x]" ] } ], "metadata": { "kernelspec": { "display_name": "py36", "language": "python", "name": "py36" }, "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.0" } }, "nbformat": 4, "nbformat_minor": 2 }