Distributions.jl icon indicating copy to clipboard operation
Distributions.jl copied to clipboard

Missing docstring for loglikelihood

Open cgarling opened this issue 1 year ago • 3 comments

On the latest version of the documentation, the following docstring is missing as there is no method with this signature defined. It looks like this should be loglikelihood(::UnivariateDistribution, ::Real) instead.

https://github.com/JuliaStats/Distributions.jl/blob/a9b0e3c99c8dda367f69b2dbbdfa4530c810e3d7/docs/src/univariate.md?plain=1#L76

cgarling avatar Apr 01 '24 09:04 cgarling

The vectorised version left us with https://github.com/JuliaStats/Distributions.jl/commit/d6985ad5f08990123b9ba84431626f22f1a408bd#diff-c185a88dade2ce18f68ff0130b5626734ed3cdb341bf5765dbb008fd8a6d91a0

loglikelihood(::UnivariateDistribution, ::Real) should have a docstring though, did it get lost there?

mschauer avatar Apr 01 '24 15:04 mschauer

I am unfortunately not a git wizard but it looks to me like the relevant method definition is https://github.com/JuliaStats/Distributions.jl/blob/f33af97da34a2e772837b63891c0ed52a3a1a989/src/univariates.jl#L329-L330 for which I do not see a docstring.

cgarling avatar Apr 02 '24 09:04 cgarling

P.S. It looks like pdf(::MultivariateDistribution, ::AbstractArray) and logpdf(::MultivariateDistribution, ::AbstractArray) are also included in the documentation but do not exist. I don't use the multivariate models much so I'm not sure what changed, but if I had to guess maybe these are the correct methods now? https://github.com/JuliaStats/Distributions.jl/blob/f33af97da34a2e772837b63891c0ed52a3a1a989/src/common.jl#L198-L234 https://github.com/JuliaStats/Distributions.jl/blob/f33af97da34a2e772837b63891c0ed52a3a1a989/src/common.jl#L240-L275

cgarling avatar Apr 02 '24 09:04 cgarling