commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <Luc.Maison...@free.fr>
Subject Re: [jira] Commented: (MATH-85) [math] SimpleRegression getSumSquaredErrors
Date Tue, 11 Jul 2006 20:51:43 GMT
J.Pietschmann wrote :

> Well, the majority of the num math text books on my shelf actually
> recommend computing the sum of the squared errors instead of the
> algebraic equivalent form given in the more analytically oriented
> text books (and used above). This is, of course, more complicated
> and still prone to adverse numerical effects unless the sequence
> is also sorted.

You are right, but this would also imply storing all values and either 
recompute everything as points are added/removed or set up a "dirty" 
flag to perform lazy evaluation only when needed. This has an impact on 
both memory and CPU usage.

The current implementation does not retain each points, it simply 
handles them on the fly by updating a few running sums. It can handle an 
extremely large number of points with a very little memory footprint.

Do you think we should provide two implementations, one being memory/CPU 
friendly and the other one being accuracy-friendly ?

Luc

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message