You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Sébastien Brisard <se...@m4x.org> on 2012/05/16 07:47:01 UTC

[math] Possible confusions in GammaDistribution

Hi,
while working on MATH-753, I found that some methods
o.a.c.m3.distribution.GammaDistribution were 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()

What do you think ?

Sébastien


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] Possible confusions in GammaDistribution

Posted by Luc Maisonobe <Lu...@free.fr>.
Le 16/05/2012 07:47, Sébastien Brisard a écrit :
> Hi,
> while working on MATH-753, I found that some methods
> o.a.c.m3.distribution.GammaDistribution were 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()
> 
> What do you think ?

Seems good, as long as we also make sure in the Javadoc what is returned
and we point out there is no consensus on the beta or 1/beta names.

Luc

> 
> Sébastien
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org