commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] Commented: (MATH-512) "GaussianFitter" could inherit from "CurveFitter"
Date Thu, 17 Feb 2011 13:45:24 GMT


Gilles commented on MATH-512:

"" does not apply cleanly; I got
Hunk #2 FAILED at 52.
1 out of 4 hunks FAILED

Could you please re-create it from the latest version in trunk. And while at it, I noticed
quite some formatting "errors" in the code (e.g. opening brackets "{" must be on the same
line as the declaration, conditional, or try/catch statement, ...). Thanks.

> "GaussianFitter" could inherit from "CurveFitter"
> -------------------------------------------------
>                 Key: MATH-512
>                 URL:
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Gilles
>            Priority: Minor
>             Fix For: 3.0
>         Attachments: GaussianFitter.patch, GaussianFitterTest.patch, ParametricGaussianFunctionTest.patch
> Currently, the "GaussianFitter" class contains a "CurveFitter" instance (and delegates
most method calls to it) for the sake of being able to return a "GaussianFunction" instance
(from the call to the "fit" method).
> I think that it would clearer (in the context of the "fitting" package) that "fit" returns
an array of doubles (as "CurveFitter" does). The user can then easily create a "Gaussian"
function object, if needed.
> [Also, note that the "GaussianFitter" actually fits the sum of a constant and a Gaussian
function; thus the name is slightly misleading IMO.]
> I also think that "ParametricGaussianFunction" and "GaussianParametersGuesser" should
become inner classes of "GaussianFitter" (as this makes it clear what their use is).

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message