[ 
https://issues.apache.org/jira/browse/MATH-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268901#comment-13268901
 ] 

Sébastien Brisard commented on MATH-784:
----------------------------------------

In this 
[thread|http://mail-archives.apache.org/mod_mbox/commons-dev/201205.mbox/%3C20120504132409.GZ32074%40dusk.harfang.homelinux.org%3E],
 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
{quote}
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
"sigma".
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
account.
{quote}

This was done in {{r1334315}}.
                
> Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague
> -----------------------------------------------------------------------------
>
>                 Key: MATH-784
>                 URL: https://issues.apache.org/jira/browse/MATH-784
>             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: AbstractLeastSquaresOptimizerTestValidation.java, 
> OUT.10, OUT.100, RandomStraightLinePointGenerator.java, 
> StraightLineProblem.java, SyntheticData.java, SyntheticDataLinear.java, 
> montecarlo_params.eps
>
>
> This bug report follows a recent discussion available 
> [here|http://mail-archives.apache.org/mod_mbox/commons-dev/201204.mbox/%3C20120418122114.GB32074%40dusk.harfang.homelinux.org%3E].
>  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|http://www.itl.nist.gov/div898/strd/] are 
> to be used.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to