commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <>
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 ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message