OT Re: C-extension in Python -- returning results

Jive Dadson jdadson at ix.netcom.com
Thu Nov 8 17:15:26 EST 2001


Keith Farmer wrote:
> 
> A word on the original function.  One of the reasons this function is
> able to be approximated by the polynomial is that given a reasonably
> short period of time (a year for the outer planets, weeks for the
> inner), the path described is very roughly a straight line (<70deg
> arc), which with only a few minute's calculation (a thousand or two
> samples) I can get accuracies to within 0.001%.
> 
> The choice of polynomial was based on the prior existance of these
> datasets.  It provides a convenient way to check the method, if
> nothing else.

This is now way off topic, but one more comment... If the data form an
approximate straight line, a 5th degree polynomial is under-determined. 
The fitting algorithm may "try" to use the extra degrees of freedom to
fit noise in the data or roundoff error. Even if the algorithm
"succeeds", you may get a fit that is very wild, not at all
approximating a straight line.

Followup-To: sci.stat.math.

Jive



More information about the Python-list mailing list