You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2012/08/12 23:10:38 UTC

[jira] [Created] (MATH-844) "HarmonicFitter.ParameterGuesser" sometimes fails to return sensible values

Gilles created MATH-844:
---------------------------

             Summary: "HarmonicFitter.ParameterGuesser" sometimes fails to return sensible values
                 Key: MATH-844
                 URL: https://issues.apache.org/jira/browse/MATH-844
             Project: Commons Math
          Issue Type: Bug
    Affects Versions: 3.0
            Reporter: Gilles
            Priority: Minor
             Fix For: 3.1


The inner class "ParameterGuesser" in "HarmonicFitter" (package "o.a.c.m.optimization.fitting") fails to compute a usable guess for the "amplitude" parameter.


--
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

        

[jira] [Resolved] (MATH-844) "HarmonicFitter.ParameterGuesser" sometimes fails to return sensible values

Posted by "Gilles (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles resolved MATH-844.
-------------------------

    Resolution: Fixed

As of revision 1374046, the code will generate an exception.
                
> "HarmonicFitter.ParameterGuesser" sometimes fails to return sensible values
> ---------------------------------------------------------------------------
>
>                 Key: MATH-844
>                 URL: https://issues.apache.org/jira/browse/MATH-844
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Gilles
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: MATH-844.test.patch
>
>
> The inner class "ParameterGuesser" in "HarmonicFitter" (package "o.a.c.m.optimization.fitting") fails to compute a usable guess for the "amplitude" parameter.

--
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

        

[jira] [Commented] (MATH-844) "HarmonicFitter.ParameterGuesser" sometimes fails to return sensible values

Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434999#comment-13434999 ] 

Luc Maisonobe commented on MATH-844:
------------------------------------

In this case, the guesser fails because the function in really far from an harmonic function. It is a triangular periodic function with amplitude +/-3 and period 12, and all sample points are taken as integer abscissa, so values all belong to the integer subset {-3, -2, -1, 0, 1, 2, 3}.

This is an (interesting) ill-conditioned case. As small integers are represented exactly even as primitive doubles, all computations are exact and one of the intermediate parameters (c2 in the source code) is a perfect 0 (there are no approximation here, the result is exact), and we divide by c2.

I would suggest to raise an exception here, and to store this as a junit test for failure mode.
                
> "HarmonicFitter.ParameterGuesser" sometimes fails to return sensible values
> ---------------------------------------------------------------------------
>
>                 Key: MATH-844
>                 URL: https://issues.apache.org/jira/browse/MATH-844
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Gilles
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: MATH-844.test.patch
>
>
> The inner class "ParameterGuesser" in "HarmonicFitter" (package "o.a.c.m.optimization.fitting") fails to compute a usable guess for the "amplitude" parameter.

--
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

        

[jira] [Commented] (MATH-844) "HarmonicFitter.ParameterGuesser" sometimes fails to return sensible values

Posted by "Gilles (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434614#comment-13434614 ] 

Gilles commented on MATH-844:
-----------------------------

I propose to check whether the values are sensible, and when they are not, either
# throw an appropriate exception (i.e. signal that the guesser fails), or
# return arbitrary values that would allow the optimizer to proceed.

Any preference?

                
> "HarmonicFitter.ParameterGuesser" sometimes fails to return sensible values
> ---------------------------------------------------------------------------
>
>                 Key: MATH-844
>                 URL: https://issues.apache.org/jira/browse/MATH-844
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Gilles
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: MATH-844.test.patch
>
>
> The inner class "ParameterGuesser" in "HarmonicFitter" (package "o.a.c.m.optimization.fitting") fails to compute a usable guess for the "amplitude" parameter.

--
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