On Wed, Apr 18, 2012 at 07:23:04PM +0200, Luc Maisonobe wrote:
> Le 18/04/2012 14:21, Gilles Sadowski a écrit :
> > Hi.
> >
> > In "AbstractLeastSquaresOptimizer" (package "optimization.general"), the
> > method "guessParametersErrors" is defined as:
> > ---CUT---
> > public double[] guessParametersErrors() {
> > if (rows <= cols) {
> > throw new
> > NumberIsTooSmallException(LocalizedFormats.NO_DEGREES_OF_FREEDOM,
> > rows, cols, false);
> > }
> > double[] errors = new double[cols];
> > final double c = FastMath.sqrt(getChiSquare() / (rows -
> > cols)); // <--- HERE
> > double[][] covar = getCovariances();
> > for (int i = 0; i < errors.length; ++i) {
> > errors[i] = FastMath.sqrt(covar[i][i]) * c;
> > }
> > return errors;
> > }
> > ---CUT---
> >
> > In the above, could someone point me to a reference that would explain the
> > line marked "HERE" (i.e. the usage of "c" to compute the error
> > estimation)?
>
> I have tracked the changes back to issue MATH-176
Thanks.
Looking at this patch, in the method in question, there is:
---CUT---
errors[i] = Math.sqrt(covar[i][i]) * c);
---CUT---
This looks like it couldn't have been compiled as is; maybe an indication
the original patch was not tested by the contributor.
Does anyone object to the estimated error be defined as
errors[i] = FastMath.sqrt(covar[i][i]);
?
Best regards,
Gilles
> (<https://issues.apache.org/jira/browse/MATH-176>).
> I don't know the theory underlying the patch that was provided.
>
> Luc
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]