commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Brisard (JIRA) <>
Subject [jira] [Commented] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague
Date Sat, 05 May 2012 05:17:50 GMT


Sébastien Brisard commented on MATH-784:

In this [thread|],
it was agreed to
* deprecate {{guessParametersErrors()}}
* create a new method, namely {{getSigma()}}, which simply returns the square root of the
diagonal coefficients of the covariance matrix. If necessary, the values previously returned
by {{guessParametersErrors()}} can easily be retrieved from {{getSigma()}} and {{getChiSquare()}}.

The rationale for this decision is copied below from the mailing list
Independently of the explanation to be provided by Dimitri, I think that
there are code design arguments in favour of deprecating (and later,
deleting) the "guessParametersErrors" method, as follows.

In the context of the "optimization.general" package, one assumes that a
Jacobian matrix is available. From there, the code in "AbstractLeastSquares"
computes the covariance matrix, from which one can readily extract the
This can be done without computing the chi-square! [While, as you have
probably noticed, the "guessParametersErrors" will not behave nicely if you
don't call "updateResidualsAndCost()" beforehand.]

For the class to be self-consistent, the story can end here: Any additional
utilities can lead to wrong expectations from different types of users (as
we've demonstrated here).
Indeed, confidence intervals refer to additional variables (as Dimitri
wrote: "By how much can a parameter change before the normalized chi2
changes by <some number>?"). Being able to answer those questions also
involves the correlations between the parameters (cf. the plot I've attached
to MATH-784), whereas "guessParametersErrors" does not take them into

This was done in {{r1334315}}.
> Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague
> -----------------------------------------------------------------------------
>                 Key: MATH-784
>                 URL:
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: javadoc, optimization
>             Fix For: 3.1
>         Attachments:, OUT.10, OUT.100,,,,,
> This bug report follows a recent discussion available [here|].
It is now recognized that the values returned by {{guessParametersErrors()}} are in fact known
as (asymptotic) standard errors. The javadoc should be made more explicit. Besides, the values
returned by this method should be tested. The reference datasets from [NIST|]
are to be used.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message