Created
February 9, 2014 00:45
-
-
Save michaelmalak/8892561 to your computer and use it in GitHub Desktop.
CardinalityAlgorithms
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
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h1>Visualization of cardinality algorithm (naive version)</h1>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"import uuid\n", | |
"import math\n", | |
"%matplotlib inline" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 112 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Create a list of 10 random UUIDs" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"list10 = [str(uuid.uuid4()) for i in xrange(10)]\n", | |
"list10" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 113, | |
"text": [ | |
"['0084d80c-283c-4392-947f-a3975ae4c88a',\n", | |
" '9ee0603d-f5bb-40ee-8e26-88668300cdbe',\n", | |
" '993c2ba5-1821-4fc8-acf6-f2349045aa5f',\n", | |
" '9f15bd5e-f872-4fbd-a0cb-a6b6c1e354d4',\n", | |
" '35467743-f5bb-49f9-8c3f-baad88aed594',\n", | |
" '48285124-11c6-4060-8b93-3aec01ef6fa8',\n", | |
" '11e632f1-665a-4074-a0fe-8a4e3ff1b83b',\n", | |
" '4d1b272f-b269-4716-9418-4d7fcce650fd',\n", | |
" 'a46cbf0d-ca3e-4dbf-8ab2-1240f5d96118',\n", | |
" 'd3e892b8-0548-4e25-98ef-65cf80959dd7']" | |
] | |
} | |
], | |
"prompt_number": 113 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Now lists of 100 and 1000 UUIDs" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"list100 = [str(uuid.uuid4()) for i in xrange(100)]\n", | |
"list1000 = [str(uuid.uuid4()) for i in xrange(1000)]" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 127 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Hash the list of 10 UUIDs with a hash function that maps to floating point numbers in the range [0,1)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"h10 = [hash(x) / pow(2.0,32.0) + 0.5 for x in list10]" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 116 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Find the smallest, and the exponentiate that to get the approximation of the size (cardinality) of the set" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"m10 = min(h10)\n", | |
"m10" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 117, | |
"text": [ | |
"0.07389730727300048" | |
] | |
} | |
], | |
"prompt_number": 117 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"pow(10,-math.log10(m10))" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 118, | |
"text": [ | |
"13.532292811504993" | |
] | |
} | |
], | |
"prompt_number": 118 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Do the same for the sets of 100 and 1000" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"h100 = [hash(x) / pow(2.0,32.0) + 0.5 for x in list100]" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 119 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"m100 = min(h100)\n", | |
"m100" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 120, | |
"text": [ | |
"0.0026511941105127335" | |
] | |
} | |
], | |
"prompt_number": 120 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"pow(10,-math.log10(m100))" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 121, | |
"text": [ | |
"377.1885264963127" | |
] | |
} | |
], | |
"prompt_number": 121 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"h1000 = [hash(x) / pow(2.0,32.0) + 0.5 for x in list1000]" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 122 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"m1000 = min(h1000)\n", | |
"m1000" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 123, | |
"text": [ | |
"0.00014685397036373615" | |
] | |
} | |
], | |
"prompt_number": 123 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"pow(10,-math.log10(m1000))" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 124, | |
"text": [ | |
"6809.485623869372" | |
] | |
} | |
], | |
"prompt_number": 124 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Plot the hashed values. Top set of dots is for the set of 10 hashed UUIDs, middle set is for the set of 100 hashed UUIDs, and the bottom set is for the set of 1000 hashed UUIDs" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"scatter(h10 + h100 + h1000, [3]*10 + [2]*100 + [1]*1000)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 125, | |
"text": [ | |
"<matplotlib.collections.PathCollection at 0xb385860>" | |
] | |
}, | |
{ | |
"metadata": {}, | |
"output_type": "display_data", | |
"png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAEACAYAAACnJV25AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VOXd9/HPTGayTPY9IQkEQlgDSYA2LiggBQVxq7TV\nWymiVVTQ4m2ta5/ic1u09fXc3qit9elTd4UqVsWyqKgBkU0wUpWyBIIkBBACSUjIMpn5PX+ca0JC\nQhJ2OP29X695Meec61znd65zznfOnCTqEBFBKaWUbTjPdAFKKaVOLg12pZSyGQ12pZSyGQ12pZSy\nGQ12pZSyGQ12pZSymQ6Dvb6+noKCAvLy8hgwYAAPPvhgmzaFhYVER0eTn59Pfn4+jz322CkrViml\nVOdcHS0MDQ3l008/xePx0NTUxPDhw1m+fDnDhw9v1W7EiBHMnz//lBaqlFKqazp9FOPxeABobGzE\n5/MRFxfXpo3+jZNSSp09Og12v99PXl4eycnJjBo1igEDBrRa7nA4WLFiBbm5uYwfP54NGzacsmKV\nUkp1rtNgdzqdfPXVV5SVlbFs2TIKCwtbLR8yZAilpaWsX7+eu+66i6uvvvpU1aqUUqoLHMfy34r5\nr//6L8LCwvjVr3511DY9e/Zk3bp1bR7Z9O7dm61btx5/pUop9W8oKyuL4uLiY1qnwzv2ffv2UVlZ\nCUBdXR0fffQR+fn5rdrs2bOn+Rn7mjVrEJF2n8Nv3boVETlnX7/97W/PeA3/jrVr/Wf+pfWf2dfx\n3BB3+Fsxu3btYvLkyfj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7NPQ4Ud60r9s2bNIi8vj8LCQrZu3cqYMWNYv349kZGRp6HCE3e2XrvHoqvX7gkF+0cf\nfXTUZcnJyezevZuUlBR27dpFUlJSu+28Xi/XXnstN954I1dfffWJlHNC0tLSKC0tbZ4uLS1t/sp8\ntDZlZWWkpaWdtho70pX6Af75z39y6623snjx4g6/+p1uXal/3bp1XHfddYD1g7xFixbhdru58sor\nT2ut7elK/RkZGSQkJBAWFkZYWBgXX3wx69evPyuCvSv1r1ixgocffhiArKwsevbsyaZNmxg2bNhp\nrfV4nM3Xblcd07V7Un8C0MJ9993X/Feqjz/+eLs/PPX7/TJp0iSZMWPGqSqjy7xer/Tq1UtKSkqk\noaGh0x+erly58qz6AUxX6v/uu+8kKytLVq5ceYaqPLqu1N/STTfdJG+//fZprLBjXan/X//6l4we\nPVqampqktrZWcnJy5Ntvvz1DFbfWlfrvuecemTlzpoiI7N69W9LS0tr9K/MzpaSkpEs/PD3brt2A\njuo/1mv3lAV7RUWFjB49WrKzs2XMmDFy4MABERHZuXOnjB8/XkREPvvsM3E4HJKbmyt5eXmSl5cn\nixYtOlUldWrhwoXSp08fycrKklmzZomIyJ///Gf585//3Nxm2rRpkpWVJYMHD5Z169adqVLb1Vn9\nt9xyi8TFxTWP9Q9+8IMzWW4bXRn/gLMt2EW6Vv+TTz4pAwYMkJycHJk9e/aZKrVdndW/d+9emTBh\nggwePFhycnLk9ddfP5PltnLddddJamqquN1uSU9Pl7/+9a/n1LXbWf3Heu3qHygppZTN6P8aTyml\nbEaDXSmlbEaDXSmlbEaDXSmlbEaDXSmlbEaDXSmlbEaDXSmlbEaDXSmlbOb/A99rYAoz+bayAAAA\nAElFTkSuQmCC\n", | |
"text": [ | |
"<matplotlib.figure.Figure at 0xb46ea58>" | |
] | |
} | |
], | |
"prompt_number": 125 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Zoom in to the left portion of the above plot." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"fig, ax = plt.subplots()\n", | |
"fig.set_size_inches(12,4)\n", | |
"ax.set_xlim([0, 0.1])\n", | |
"ax.set_ylim([0, 4])\n", | |
"ax.scatter(h10 + h100 + h1000, [3]*10 + [2]*100 + [1]*1000)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 126, | |
"text": [ | |
"<matplotlib.collections.PathCollection at 0xb71e908>" | |
] | |
}, | |
{ | |
"metadata": {}, | |
"output_type": "display_data", | |
"png": "iVBORw0KGgoAAAANSUhEUgAAAskAAAEACAYAAABBOusMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYlXX+//HXQVA4oCCpmIK5puAGZjGjkLjL4pJbaomp\nFemY6Uw1Nf1KK6emyab062Q6lU2bNlkuKVrTQpmGjmnWjNMojRYuUU6RkSnb+/cHyMANAsIBqnk+\nrsvr4j7nc3/u933O59zn5fGNx2VmJgAAAAAlvBq6AAAAAOCHhpAMAAAAOBCSAQAAAAdCMgAAAOBA\nSAYAAAAcCMkAAACAQ7VCckFBgaKiojRy5MgK7587d666dOmi3r17a+/evR4tEAAAAKhv1QrJS5Ys\nUUREhFwuV7n7UlNTlZGRoYMHD2rlypWaNWuWx4sEAAAA6lOVIfnIkSNKTU3Vtddeq4q+d2Tjxo2a\nNm2aJCk6OlrZ2dnKysryfKUAAABAPakyJM+fP18PPvigvLwqHnr06FGFhYWVbIeGhurIkSOeqxAA\nAACoZ5WG5E2bNqlVq1aKioqq8FPks5z3VdSWAQAAAPxYeFd2544dO7Rx40alpqbq9OnTOnnypJKT\nk/X000+XjGnbtq0yMzNLto8cOaK2bduWm6tz58765JNPPFg6AAAAUF6nTp2UkZFRqzlcVtlHxKW8\n/fbbWrx4sV555ZUyt6empmrZsmVKTU1Venq65s2bp/T09PIHcrkq/TQa/5sWLlyohQsXNnQZ+IFh\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dtSd2uTGGu1b2ybqvLw869ixox06dMjOnDlT\nZXP9e++9V9JcX5198eNUm3VRWFhoU6dOtXnz5tV73ag7tVkTpaWlpVlSUlK91Iy6V9t1ERsba//6\n17/MzGzBggV266231l/xqDO1WRd79+617t2726lTp6ywsNCSk5Nt2bJl9X4O8LzzyY0LFiwo84t7\nNcmctQ7JZmapqal28cUXW6dOney+++4zM7PHHnvMHnvssZIxv/jFL6xTp07Wq1cve//99yvdFz8N\nNV0X27ZtM5fLZb1797bIyEiLjIy0LVu2NMg5wLNqc604Ky0tjf/d4iemNuvigw8+sL59+1qvXr3s\niiuu4H+3+Ampzbp44IEHLCIiwnr06GHJycmWm5tb7/WjblS1Lo4fP26hoaHWrFkzCwoKsrCwMPv2\n22/PuW9l+DIRAAAAwIFfEwcAAAAcCMkAAACAAyEZAAAAcCAkAwAAAA6EZAAAAMCBkAwAAAA4EJIB\nAAAAB0IyAAAA4PD/Ac/kleehA2GvAAAAAElFTkSuQmCC\n", | |
"text": [ | |
"<matplotlib.figure.Figure at 0xb70c4e0>" | |
] | |
} | |
], | |
"prompt_number": 126 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h1>Improving the accuracy</h1>\n", | |
"<p>We can improve the accuracy by splitting the original set into m subsets, applying the above naive algorithm over each of the m subsets, and averaging the results together.</p>\n", | |
"<p>Below we do so for the set of 1000 hashed UUIDs, where we split it up into 10 subsets of 100 each, average the resulting min hash values, exponentiate that average, and then multiply that back by 10 to get the cardinality of the whole set.</p>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"betterm1000=mean([min(h1000[x:x+100]) for x in xrange(10)])" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 132 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"10*pow(10,-math.log10(betterm1000))" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 136, | |
"text": [ | |
"358.90695792638485" | |
] | |
} | |
], | |
"prompt_number": 136 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>As you can see, this resulted in a result that is off by a factor of 3, instead of off by a factor of 7 as before.</p><p>There are even more clever and accurate ways to average the mins, such as using a geometric average, or the ultimate, the HyperLogLog algorithm for averaging as described in <a href=\"http://algo.inria.fr/flajolet/Publications/FlFuGaMe07.pdf\">HyperLogLog: the analysis of a near-optimal cardinality estimation algorithm</a>." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [] | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment