[SciPy-User] point-curve distance estimation or calculation

Zachary Pincus zachary.pincus at yale.edu
Wed Jun 2 09:18:58 EDT 2010


> Calculation is doable by applying this formula
> http://mathcentral.uregina.ca/QQ/database/QQ.09.07/s/elliot1.php
> But then, an estimation of the correct result is required, and it  
> takes a
> lot of time for every step, if you have 25 million values in each set.
>
> First, there might be some functions useful to do this calculation  
> quite
> fast (up to 5 minutes is quite acceptable), that I may have  
> overseen. That
> may basically calculate the following internally
> http://answers.yahoo.com/question/index?qid=20070109172252AAP34wx

Are you applying the formula individually for each x,y point (slow),  
or are you applying the formula in parallel to an array of all the x,y  
points (potentially fast)?

If the former, then you'll want to read up on some numpy tutorials  
until you see how to implement the formula without looping through  
each point (or post code here and someone can help); if the latter  
then maybe you can post code anyway and people can see if there are  
obvious bottlenecks.

In principle it seems like applying the closed-form solution shouldn't  
be too slow, right? Unless I missed something, there's nothing  
iterative, right?

Zach



More information about the SciPy-User mailing list