Popular recipes tagged "median" but not "python"http://code.activestate.com/recipes/tags/median-python/2010-03-03T11:06:29-08:00ActiveState Code RecipesEfficient Running Median using an Indexable Skiplist (Python) 2010-02-07T14:40:03-08:00Raymond Hettingerhttp://code.activestate.com/recipes/users/178123/http://code.activestate.com/recipes/576930-efficient-running-median-using-an-indexable-skipli/ <p style="color: grey"> Python recipe 576930 by <a href="/recipes/users/178123/">Raymond Hettinger</a> (<a href="/recipes/tags/advanced_data_structure/">advanced_data_structure</a>, <a href="/recipes/tags/container/">container</a>, <a href="/recipes/tags/median/">median</a>, <a href="/recipes/tags/new_algorithm/">new_algorithm</a>, <a href="/recipes/tags/skiplist/">skiplist</a>, <a href="/recipes/tags/sliding_window/">sliding_window</a>). Revision 10. </p> <p>Maintains sorted data as new elements are added and old one removed as a sliding window advances over a stream of data. Also gives fast indexed access to value. Running time per median update is proportional to the log of the window size.</p> Fast Running Median using an Indexable Skiplist (Fast version) (Python) 2010-03-03T11:06:29-08:00Raymond Hettingerhttp://code.activestate.com/recipes/users/178123/http://code.activestate.com/recipes/577073-fast-running-median-using-an-indexable-skiplist-fa/ <p style="color: grey"> Python recipe 577073 by <a href="/recipes/users/178123/">Raymond Hettinger</a> (<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/indexable/">indexable</a>, <a href="/recipes/tags/median/">median</a>, <a href="/recipes/tags/running/">running</a>, <a href="/recipes/tags/skiplist/">skiplist</a>, <a href="/recipes/tags/statistics/">statistics</a>). Revision 5. </p> <p>Fast version of r576930 reimplemented using a list of lists instead of a node class. </p> Running Median (Python) 2010-02-20T08:22:00-08:00Raymond Hettingerhttp://code.activestate.com/recipes/users/178123/http://code.activestate.com/recipes/577059-running-median/ <p style="color: grey"> Python recipe 577059 by <a href="/recipes/users/178123/">Raymond Hettinger</a> (<a href="/recipes/tags/median/">median</a>). </p> <p>Maintains sorted data as new elements are added and old one removed as a sliding window advances over a stream of data. Running time per median calculation is proportional to the square-root of the window size.</p>