jeffalstott / powerlaw

600 stars 132 forks source link

stretched_exponential_likelihoods continuous definition #66

Closed mountaindust closed 5 years ago

mountaindust commented 5 years ago

Maybe I am just missing something, but shouldn't the likelihood definition for stretched_exponential_likelihoods on line 2779: likelihoods = data ** (beta - 1) * beta * Lambda * exp(Lambda * (xmin ** beta - data ** beta)) be likelihoods = (data*Lambda) ** (beta - 1) * beta * Lambda * exp(Lambda ** beta * (xmin ** beta - data ** beta))? This second expression is equivalent to the way the likelihood and pdf is defined in the Stretched_Exponential class, and it's what I would expect it to be from the typical definition of a Weibull distribution... Am I just missing something?

jeffalstott commented 5 years ago

Could be! Those are unadvertised functions that indeed might be wrong:

#What follows are functional programming forms of the above code, which are more
#clunky and have somewhat less functionality. However, they are here if your
#really want them.

If you need them and you've identified a bug like this, please submit a pull request. Thanks!