commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <stei...@yahoo.com>
Subject Re: [math] Priorities, help needed
Date Wed, 21 May 2003 22:08:55 GMT

--- "Mark R. Diggory" <mdiggory@latte.harvard.edu> wrote:
> Phil Steitz wrote:
> 
> >I agree that we need to carefully document preconditions
> >for *all* interfaces; but I strongly disagree with the
> >assertion that we need separate implementations to
> enforce
> >domain restrictions.  Will we have an
> >"InvertibleRealMatrix" class? I don't think so.  Better
> to
> >just document that the inversion method will throw an
> >exception if the matrix is singular -- and provide a
> test
> >for singularity (I think this is in the interface
> already).
> >  
> >
> Good point.
> 
> >
> >I will do a little research on this and post some links
> >and/or code.  What I meant was to consider using the
> using
> >the alternative computational formula 
> >geom mean = exp(((log(v1) + ... + log(vn))/n).  This
> >*might* control rounding error better.  As I said, this
> >needs to be researched.  The alternative formula just
> comes
> >from the identity log(ab) = log(a) + log(b).
> >  
> >
> 
> Looks like we just need to calc sumLog as:
> 
> sumLog += Math.log(v);
> 
> and
> 
> sumLog -= Math.log(discard);
> 
> and then do
> 
> 
> Math.exp( sumLog / n );
> 
> A not so stable reference to the methodology is:
> http://shazam.econ.ubc.ca/intro/gmean.htm
> 
> -Mark

Yes.  The computation is easy.  The question is is it a)
more efficient and/or b) more accurate.  That is what we
need to find out. 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-dev-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

---------------------------------------------------------------------
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