diff --git a/src/likelihoods/gamma.jl b/src/likelihoods/gamma.jl index fc71580..d38b467 100644 --- a/src/likelihoods/gamma.jl +++ b/src/likelihoods/gamma.jl @@ -42,7 +42,7 @@ end function _gamma_exp_loglikelihood_kernel(α, q_f, y) return (α - 1) * log(y) - y * exp((var(q_f) / 2) - mean(q_f)) - α * mean(q_f) - - loggamma(α) + loggamma(α) end default_expectation_method(::GammaLikelihood{ExpLink}) = AnalyticExpectation() diff --git a/test/expectations.jl b/test/expectations.jl index dde49b2..dccf359 100644 --- a/test/expectations.jl +++ b/test/expectations.jl @@ -136,7 +136,7 @@ if def isa GPLikelihoods.AnalyticExpectation push!(methods, def) end - y = [rand(rng, lik(0.)) for lik in liks] + y = [rand(rng, lik(0.0)) for lik in liks] results = map( m -> GPLikelihoods.expected_loglikelihood(m, liks, q_f, y), methods