[jira] Created: (MATH-176) Getting errors in estimated parameters using Estimator

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

[jira] Created: (MATH-176) Getting errors in estimated parameters using Estimator

JIRA jira@apache.org
Getting errors in estimated parameters using Estimator
------------------------------------------------------

                 Key: MATH-176
                 URL: https://issues.apache.org/jira/browse/MATH-176
             Project: Commons Math
          Issue Type: Improvement
    Affects Versions: 1.2
            Reporter: Kazuhiro Koshino
            Priority: Minor
             Fix For: 1.2


To validate estimated parameters by GaussNewtonEstimator and LevenbergMarquardtEstimator, we need errors (or covariances) in the parameters.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (MATH-176) Getting errors in estimated parameters using Estimator

JIRA jira@apache.org

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

Kazuhiro Koshino updated MATH-176:
----------------------------------

    Attachment: LevenbergMarquardtEstimator.java.diff

This patch is to get a chi-square value, covariances and errors in estimated parameters.
This patch is based on the file LevenbergMarquardtEstimator.java in commons-math-20071120-src.tar.gz because I cannot access subversion repository.

Thanks.

> Getting errors in estimated parameters using Estimator
> ------------------------------------------------------
>
>                 Key: MATH-176
>                 URL: https://issues.apache.org/jira/browse/MATH-176
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 1.2
>            Reporter: Kazuhiro Koshino
>            Priority: Minor
>             Fix For: 1.2
>
>         Attachments: LevenbergMarquardtEstimator.java.diff
>
>
> To validate estimated parameters by GaussNewtonEstimator and LevenbergMarquardtEstimator, we need errors (or covariances) in the parameters.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-176) Getting errors in estimated parameters using Estimator

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Luc Maisonobe commented on MATH-176:
------------------------------------

I have started implementing this feature, using the provided patch as a guide. Since the patch code is not Levenberg-Marquardt specific, I intend to add an AbstractEstimator class which will be the base class for the two existing estimators (Gauss-Newton and Levenberg-Marquardt).

I encountered one problem during tests. The LevenbergMarquardtTest.testTrivial is based on a simple linear one parameter problem, solved with one measurement. Basically, we solve 2x = 3. Since the residual after solve is exactly 0, I would have expected that the guessed error would be 0 too. In fact  get a NaN. The reason for this is because the error guessing performs a division by dof (which stands for degrees of freedom I suppose) which is 0 since there are exactly as many measurements as parameters.

My statistics skills are rather poor, so I don't understand either the rationale for the chi square and dof values.
If anybody could provide references or hints, please add comments to this issue.

> Getting errors in estimated parameters using Estimator
> ------------------------------------------------------
>
>                 Key: MATH-176
>                 URL: https://issues.apache.org/jira/browse/MATH-176
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 1.2
>            Reporter: Kazuhiro Koshino
>            Priority: Minor
>             Fix For: 1.2
>
>         Attachments: LevenbergMarquardtEstimator.java.diff
>
>
> To validate estimated parameters by GaussNewtonEstimator and LevenbergMarquardtEstimator, we need errors (or covariances) in the parameters.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-176) Getting errors in estimated parameters using Estimator

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Kazuhiro Koshino commented on MATH-176:
---------------------------------------

Sorry for late reply.

Degrees of freedom (dof) is defined by
 n - p
, where n is a number of measurements, p is a number of parameters, respectively.
However,
if n is equal to p, there is no freedom. It means that measurements determine parameters uniquely and no need to validate the model (parameter problem).
If n < p, we cannot determine the parameters represent the measurements because there are infinite number of parameter sets. For example, we want to represent a measurement with y = ax + b,
where a and b are parameters, y is a measurement for an input x. There are infinite straight lines passing through the point (x, y).

For your example of 2x = 3, n = 1 (a measurement = 3 for an input value of 2) and p = 1 (parameter is x). Then the dof is 0.

If users will get errors in estimated parameters for the cases of n = p or n < p, My idea is
1) AbstractEstimator throws EstimationException during calling guessParametersErrors.
or
2) An additional method, which enables users to check the validity of the dof, that is, n > p befor calling guessParametersErrors

My english is too poor. I hope that you will ask me any questions in my comment patiently.

> Getting errors in estimated parameters using Estimator
> ------------------------------------------------------
>
>                 Key: MATH-176
>                 URL: https://issues.apache.org/jira/browse/MATH-176
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 1.2
>            Reporter: Kazuhiro Koshino
>            Assignee: Luc Maisonobe
>            Priority: Minor
>             Fix For: 1.2
>
>         Attachments: LevenbergMarquardtEstimator.java.diff
>
>
> To validate estimated parameters by GaussNewtonEstimator and LevenbergMarquardtEstimator, we need errors (or covariances) in the parameters.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-176) Getting errors in estimated parameters using Estimator

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Luc Maisonobe commented on MATH-176:
------------------------------------

The methods have been implemented as of r613474 in the subversion repository.

Please, review what has been done and check the unit tests and the computed values. If additional tests with reference results could be added, this would be even better.

> Getting errors in estimated parameters using Estimator
> ------------------------------------------------------
>
>                 Key: MATH-176
>                 URL: https://issues.apache.org/jira/browse/MATH-176
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 1.2
>            Reporter: Kazuhiro Koshino
>            Assignee: Luc Maisonobe
>            Priority: Minor
>             Fix For: 1.2
>
>         Attachments: LevenbergMarquardtEstimator.java.diff
>
>
> To validate estimated parameters by GaussNewtonEstimator and LevenbergMarquardtEstimator, we need errors (or covariances) in the parameters.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (MATH-176) Getting errors in estimated parameters using Estimator

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Luc Maisonobe resolved MATH-176.
--------------------------------

    Resolution: Fixed

Closing issue since there have been no complaints since last fix.

> Getting errors in estimated parameters using Estimator
> ------------------------------------------------------
>
>                 Key: MATH-176
>                 URL: https://issues.apache.org/jira/browse/MATH-176
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 1.2
>            Reporter: Kazuhiro Koshino
>            Assignee: Luc Maisonobe
>            Priority: Minor
>             Fix For: 1.2
>
>         Attachments: LevenbergMarquardtEstimator.java.diff
>
>
> To validate estimated parameters by GaussNewtonEstimator and LevenbergMarquardtEstimator, we need errors (or covariances) in the parameters.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.