Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-512

"GaussianFitter" could inherit from "CurveFitter"

Rank to TopRank to BottomVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Labels:
      None

      Description

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

        Attachments

        1. GaussianFitter.patch
          13 kB
          Ole Solberg
        2. GaussianFitterTest.patch
          5 kB
          Ole Solberg
        3. ParametricGaussianFunctionTest.patch
          4 kB
          Ole Solberg
        4. GaussianFitter.patch
          12 kB
          Ole Solberg
        5. GaussianFitter.patch
          12 kB
          Ole Solberg

        Issue Links

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              Unassigned
              Reporter:
              erans Gilles Sadowski

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment