commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <>
Subject Re: [math] exceptions or NaN from Univariate
Date Wed, 14 May 2003 15:03:00 GMT
O'brien, Tim wrote:
> On Wed, 2003-05-14 at 09:04, Mark R. Diggory wrote:
>>So, from what I can see, if the window isn't infinite, some storage 
>>needs to occur. (But again, I could easily be missing something really 
>>obvious here).
> there is no way to remove the influence of element[window+1] without
> knowing what that element is.
> I think there might be a need for two Univariate implementations.  The
> current implementation would remain and not store raw values, and the
> second implementation would store a configurable number of values in a
> (optionally finite) FIFO.  In other words, the "StoredUnivariate" would
> have a no-arg constructor which would take into account every element,
> as well as a constructor with an int argument for the implementation of
> this Univariate "window".  Remembering raw values would allow us to use
> Freq internally to calculate the mode of a statistical population.

Seems to me that we should be able to maintain just _one_ "lagged" value 
(the next one to be rolled off) and then adjust sums for the difference 
between the contribution of the new value and that of the value being 
rolled off.  I will play with this and submit a patch this eve. (unless 
someone else does first ;-)

Assuming that I am not out of my mind, a "bonus" question is what is the 
minimal number of values that we would need to retain to keep additional 
order statistics up to date (median, quartiles)?

I *strongly* agree that we should not include the need to store all of 
the values in this implementation, since I also use this thing for 
*large* datasets.


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

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

View raw message