You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Mark R. Diggory" <md...@latte.harvard.edu> on 2003/06/18 03:18:10 UTC

Re: [math] Refactored UnivariateImpl


Phil Steitz wrote:
> --- "Mark R. Diggory" <md...@latte.harvard.edu> wrote:
> 
>>Hi all,
>>
>>As this is now a sensitive subject, I'm not going to commit this until I 
>>receive +/- input from the group. Please review the following 
>>UnivariateImpl and submit your opinion, This version of UnivariateImpl 
>>no longer extends AbstractStoredUnivariate to accomplish delegation, but 
>>does delegate methods to an implementation of the static statistical 
>>functions in StatUtils, it no longer directly instantiates runtime 
>>exceptions.
>>
>>-Mark
>>
> 
> This is definitely making progress.  I like the structure.  There are a couple
> of things that should probably be improved, however:
> 
> 1. Some relatively trivial stylistic cleanup -- eliminate unecessary "super()"
> calls in the constructors and use standard Java naming conventions for
> variables (i.e. lose the _'s).  Also there is one remaining reference to
> AbstractStoreUnivariate in comments.
> 

Done.

> 2. I am worried about the powers, product and sumsq computations blowing up
> prematurely (i.e. before the stats they are used in become NaN) in the infinite
> window case, or having bad numerical stability.  We should probably research
> better ways to compute these.  If this is too hard to do before initial
> release, we might want to consider dropping the higher order moments and
> geometric mean from UnivariateImpl.
> 
> Phil

Yes, I like the Wests algorithm approach for variance and I'm exploring 
the use of this approach for higher moments, this would eliminate the 
sums of powers.

Again, we've got the log based approach for geometric mean that is more 
stable than the product based approach (this should also get implemented 
in StatUtils. I'll review it again and finally get it into the code.

-Mark





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


Re: [math] Refactored UnivariateImpl

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Thanks Brent, thats what I was looking for.

Brent Worden wrote:
> 
> Here are some recursive formulas for higher central moments
> http://www.spss.com/tech/stat/Algorithms/11.5/descriptives.pdf
> 
> 
> Brent Worden
> http://www.brent.worden.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 


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


RE: [math] Refactored UnivariateImpl

Posted by Brent Worden <br...@worden.org>.
>
> > 2. I am worried about the powers, product and sumsq
> computations blowing up
> > prematurely (i.e. before the stats they are used in become NaN)
> in the infinite
> > window case, or having bad numerical stability.  We should
> probably research
> > better ways to compute these.  If this is too hard to do before initial
> > release, we might want to consider dropping the higher order moments and
> > geometric mean from UnivariateImpl.
> >
> > Phil
>
> Yes, I like the Wests algorithm approach for variance and I'm exploring
> the use of this approach for higher moments, this would eliminate the
> sums of powers.

Here are some recursive formulas for higher central moments
http://www.spss.com/tech/stat/Algorithms/11.5/descriptives.pdf


Brent Worden
http://www.brent.worden.org


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