commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Brisard <sebastien.bris...@m4x.org>
Subject Re: [math] Deprecating
Date Fri, 04 May 2012 01:30:45 GMT
Hi,
2012/5/3 Gilles Sadowski <gilles@harfang.homelinux.org>:
> Hello.
>
>> in this thread,
>> http://mail-archives.apache.org/mod_mbox/commons-dev/201204.mbox/%3C20120418122114.GB32074%40dusk.harfang.homelinux.org%3E
>> I suggested that we deprecate guessParametersErrors() and replace it
>> with getParametersStandardDeviation(), since the implemented formula
>> seems to be the accepted estimate for the sd of the optimized
>> parameters.
>> There was no reaction, but I don't think that meant agreement (!).
>
> There isn't even an agreement that this method should not be deleted... :-)
> Indeed, people around here (working in astronomy) maintain that the error
> they'd publish is the square-root of the diagonal element of the covariance
> matrix.
>
> I've been busy coding a trivial example aimed at comparing the two formulae.
> I'll probably attach the file to issue MATH-784 tomorrow.
>
>> Although I do think that guessParametersErrors() is a bit vague (if
>> not confusing), I'm going to drop this proposal unless someone says he
>> supports it. As far as I am concerned, MATH-784 would then be resolved
>> (I stiil need to inquire about getSigma()).
>
> As hinted above, what we use here is
>
>  for (int i = 0; i < covMat.length; i++) {
>    sigma[i] = FastMath.sqrt(covMat[i][i]);
>  }
>
> Thus, a
>
>  double[] getSigma() { /* ... */ }
>
> method would be nice to have, IMO.
> However, we should make quite clear in the Javadoc what is the meaning of
> the returned "error" (in particular, as most users are no more statistician
> than we are, there should probably be a simple explanation of when to use
> which).
>
>
> Best,
> Gilles
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
this is interesting stuff. I can make the addition of the required
getSigma() method. Only, I'm reluctant to call it getSigma(), as sigma
would suggest a standard deviation, which in fact is returned by
guessParametersErrors().

The only reference I was able to find where the diagonal elements are
directly used is numerical recipes, and if I remember correctly, I
think it was called $\Delta a$, and was derived from the $\chi-2$
distribution. So it basically returns a confidence interval, I think,
while guessParametersErrors truly returns a standard deviation. Is
that correct? In that case, we could call getSigma() just that:
getConfidenceInterval (the associated probability might even be
specified as a parameter, or decided once and for all in the javadoc).
Is

Gilles, the best thing to do would probably be a Monte-Carlo
simulation, with several realizations of the same dataset. Then, you
would have a distribution of the parameters, from which you would be
able to compute the standard deviation. If you want, I can do that.

Meanwhile, I've asked for the Bevington book, but inter-library loans
can tae a while...

Best regards,
Sébastien


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


Mime
View raw message