[jira] [Created] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)
Sébastien Brisard created MATH-784:
--------------------------------------

             Summary: 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
             Fix For: 3.1


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 | Threaded
Open this post in threaded view
|

[jira] [Commented] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)

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

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

Made improvements to the javadoc in {{r1332076}}.
               

> 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
>
>
> 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 | Threaded
Open this post in threaded view
|

[jira] [Commented] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)
In reply to this post by Richard (Jira)

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

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

The Statistical Reference Datasets from NIST provide reference values of the standard deviation of the parameters for many datasets. In {{r1332086}} these values are used to test {{guessParametersErrors()}}.
               

> 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
>
>
> 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 | Threaded
Open this post in threaded view
|

[jira] [Commented] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)
In reply to this post by Richard (Jira)

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

Gilles commented on MATH-784:
-----------------------------

Did you confirm that the correct "error" is returned by "guessParametersErrors" but not by the diagonal elements of the covariance matrix?

               

> 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
>
>
> 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 | Threaded
Open this post in threaded view
|

[jira] [Commented] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)
In reply to this post by Richard (Jira)

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

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

I did confirm that {{guessParametersErrors()}} in fact returns an estimate of the standard deviation of the parameters.

As for the meaning (if any) of the unweighted diagonal elements of the covariance matrix, I still don't know.
               

> 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
>
>
> 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 | Threaded
Open this post in threaded view
|

[jira] [Issue Comment Edited] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)
In reply to this post by Richard (Jira)

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

Sébastien Brisard edited comment on MATH-784 at 5/4/12 1:20 AM:
----------------------------------------------------------------

I did confirm that {{guessParametersErrors()}} in fact returns the same estimate of the standard deviation of the parameters as the one listed in the NIST data.
               
      was (Author: celestin):
    I did confirm that {{guessParametersErrors()}} in fact returns an estimate of the standard deviation of the parameters.

As for the meaning (if any) of the unweighted diagonal elements of the covariance matrix, I still don't know.
                 

> 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
>
>
> 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 | Threaded
Open this post in threaded view
|

[jira] [Updated] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)
In reply to this post by Richard (Jira)

     [ https://issues.apache.org/jira/browse/MATH-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sébastien Brisard updated MATH-784:
-----------------------------------

    Attachment: SyntheticData.java

Attached is a Monte-Carlo simulation where 100000 realizations of the same dataset are sampled. This leads to a series of 100,000 optimized values of the parameters of the model. Then, the standard deviation of these parameters can be estimated, and compared to the value returned by {{guessParametersErrors()}}. The match is very good. However, the match with the sqrt of the diagonal elements of the covariance matrix is also very good. Thinking about it, it's not a big surprise, since the two estimates differ only by a factor {{sqrt(n/(n-m))}}, where {{n}} is the number of observations, and {{m}} the number of parameters (if the fit is good, the optimum value of chi2 is nearly equal to {{n}}).
Also shown by this program: the sqrt of the diag coeffs of the covariance matrix provide the 68% confidence interval on the parameters.

What remains to be explored
* use smaller number of observables (then {{n/(n-m)}} should be significantly greater than 1),
* use observations which are not distributed according to a gaussian law.
               

> 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: SyntheticData.java
>
>
> 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 | Threaded
Open this post in threaded view
|

[jira] [Updated] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)
In reply to this post by Richard (Jira)

     [ https://issues.apache.org/jira/browse/MATH-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sébastien Brisard updated MATH-784:
-----------------------------------

    Attachment: SyntheticDataLinear.java

Attached a new version of the MC simulation, whith a linear model y = a[0] + a[1] * x, and only 3 observation points x[0] = 0.333, x[1] = 0.666 and x[2] = 1.0. It looks like in that case, the two estimator differ quite significantly, and in fact, the simple one (unweighted square root of the diagonal coefficients) is a much better estimator of the sd on the parameters.

It comes out as a surprise, because it contradicts formulas (34) and (35) in [MathWorld|http://mathworld.wolfram.com/LeastSquaresFitting.html]. Also, the standard deviation on the parameters in [NIST StRD|http://www.itl.nist.gov/div898/strd/general/dataarchive.html] is computed with the other formula.
               

> 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: SyntheticData.java, SyntheticDataLinear.java
>
>
> 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 | Threaded
Open this post in threaded view
|

[jira] [Updated] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)
In reply to this post by Richard (Jira)

     [ https://issues.apache.org/jira/browse/MATH-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles updated MATH-784:
------------------------

    Attachment: RandomStraightLinePointGenerator.java
                StraightLineProblem.java
                AbstractLeastSquaresOptimizerTestValidation.java

Here are the code I was talking about on the ML.
You have been doing the same thing it seems...

               

> 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, RandomStraightLinePointGenerator.java, StraightLineProblem.java, SyntheticData.java, SyntheticDataLinear.java
>
>
> 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 | Threaded
Open this post in threaded view
|

[jira] [Updated] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)
In reply to this post by Richard (Jira)

     [ https://issues.apache.org/jira/browse/MATH-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles updated MATH-784:
------------------------

    Attachment: OUT.100
                OUT.10

The "OUT.10" and "OUT.100" are the output of the first unit test in "AbstractLeastSquaresOptimizerTestValidation.java" for 10 and 100 observations respectively.
The Monte-Carlo (on the observations) confirms that "sigma" (from the covariance matrix) better approximates the standard deviation (of the parameter distribution generated by the Monte-Carlo).
               

> 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
>
>
> 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 | Threaded
Open this post in threaded view
|

[jira] [Updated] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)
In reply to this post by Richard (Jira)

     [ https://issues.apache.org/jira/browse/MATH-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles updated MATH-784:
------------------------

    Attachment: montecarlo_params.eps

"montecarlo_params.eps" is the plot of a Monte-Carlo run _on the parameters_, i.e. generating sets of parameters, and recording which (plotted in green) have a chi-square lower than "1 + chi2_b", where "chi2_b" is the chi-square of the optimal solution (plotted in red).

               

> 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 | Threaded
Open this post in threaded view
|

[jira] [Commented] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)
In reply to this post by Richard (Jira)

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

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

It seems we did the same simulations, with same conclusions! Good
OK, I think I did a lot of noise for nothing, it seems, and I do apologize for that.
I just want to understand though, why the fomulas in MathWorld and NIST Statistical Reference Datasets are different.
               

> 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 | Threaded
Open this post in threaded view
|

[jira] [Commented] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)
In reply to this post by Richard (Jira)

    [ 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 | Threaded
Open this post in threaded view
|

[jira] [Updated] (MATH-784) Javadoc of AbstractLeastSquaresOptimizer.guessParametersErrors() is too vague

Richard (Jira)
In reply to this post by Richard (Jira)

     [ https://issues.apache.org/jira/browse/MATH-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sébastien Brisard updated MATH-784:
-----------------------------------

    Fix Version/s:     (was: 3.1)
                   4.0
         Assignee:     (was: Sébastien Brisard)

{color:red}
As far as version 3.1 is concerned, this issue is _fixed_. However, this ticket must remain open until 4.0 is on the tracks, as some deprecated methods must be removed.
{color}
               

> 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
>              Labels: javadoc, optimization
>             Fix For: 4.0
>
>         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