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

GammaDistribution.getAlpha() and getBeta() are confusing

    Details

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

      Description

      As discussed on the mailing list

      Some methods in o.a.c.m3.distribution.GammaDistribution are ill-named. Indeed, the class javadoc explicitly refers to the Wikipedia page. In this page, the shape parameter is named alpha and the scale parameter is 1 / beta
      (inverse of beta), while in the current implementation, the shape parameter is named alpha, and the scale parameter is named beta (not 1 / beta !!!). This might be confusing. Looking at other web pages, I see there is apparently no consensus on the naming of shape and scale
      parameters. The problem lies with the accessors, which are
      double getAlpha()
      double getBeta()

      I think these accessors can lead to confusion. I would therefore propose to deprecate them, and replace them with
      double getShape()
      double getScale()

        Attachments

          Activity

            People

            • Assignee:
              celestin Sébastien Brisard
              Reporter:
              celestin Sébastien Brisard
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: