I've made some progress on this, building the tools for a faster
median(). I was able to fairly easily make both nth_element() and
partial_sort() types of functions by modifying numpy's quicksort,
however I wasn't that happy with their API from a python/numpy point
of view.
My current plan of
Chad Netzer skrev:
My current plan of attack is to deliver a partition() function that
basically returns an array such that elements less than the pivot(s)
come first, then the pivot(s), then the elements greater than the
pivot(s).
I'm actually trying to write a fast median replacement
The good news is that it was trivial to adapt
numpy/core/src/_sortmodule.c.src:quicksort() to do a quickselect().
When I'm back home I'll follow up with discussion on how (if it all)
to expose this to numpy.median() or numpy in general.
-Chad
___
I presented this during a lightning talk at the scipy conference
yesterday, so again, at the risk of painting myself as a flaming
idiot:
-
Wanted: A Better/Faster median() Function
numpy implementation uses simple sorting algorithm:
Sort all the data using the .sort() method
, 8/21/09, Mike Ressler mike.ress...@alum.mit.edu wrote:
From: Mike Ressler mike.ress...@alum.mit.edu
Subject: [Numpy-discussion] A better median function?
To: Discussion of Numerical Python numpy-discussion@scipy.org
Date: Friday, August 21, 2009, 8:47 AM
I presented this during a lightning
Ouch, didn't check my to address first, sorry!!!
DG
--- On Fri, 8/21/09, David Goldsmith d_l_goldsm...@yahoo.com wrote:
From: David Goldsmith d_l_goldsm...@yahoo.com
Subject: Re: [Numpy-discussion] A better median function?
To: Discussion of Numerical Python numpy-discussion@scipy.org
Date
On Fri, Aug 21, 2009 at 8:47 AM, Mike Resslermike.ress...@alum.mit.edu wrote:
I presented this during a lightning talk at the scipy conference
yesterday, so again, at the risk of painting myself as a flaming
idiot:
-
Wanted: A Better/Faster median() Function
numpy
Hi,
Nicolas Devillard discusses several algorithms at
http://ndevilla.free.fr/median/median/index.html
Thanks for this. A loud 'yes' from the back of the internet too.
I contacted Nicolas Devillard a year or so ago to ask him if we could
include his code in Scipy, and he said 'yes'. I can
Hi,
On Fri, Aug 21, 2009 at 11:33 AM, Matthew Brettmatthew.br...@gmail.com wrote:
Nicolas investigated algorithms that find the lower (or upper) median
value. The lower median is the median iff there are an odd number of
entries in our list, or the lower of the central values in the sort,
On Fri, Aug 21, 2009 at 11:33 AM, Matthew Brettmatthew.br...@gmail.com
wrote:
Nicolas investigated algorithms that find the lower (or upper) median
value. The lower median is the median iff there are an odd number of
entries in our list, or the lower of the central values in the sort,
when
10 matches
Mail list logo