Skip to content

Commit

Permalink
Merge pull request #41 from JuliaGaussianProcesses/st/gamma_swap
Browse files Browse the repository at this point in the history
**BREAKING** swap order of parametrization of GammaLikelihood
  • Loading branch information
theogf authored Jan 31, 2022
2 parents 05abf88 + 7a48b74 commit 1ec687f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/likelihoods/gamma.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Gamma likelihood with fixed shape `α`.
```math
p(y|f) = \\operatorname{Gamma}(y | α, l(f))
```
On calling, this would return a gamma distribution with shape `α` and scale `l(f)`.
On calling, this would return a Gamma distribution with shape `α` and scale `invlink(f)`.
"""
struct GammaLikelihood{T<:Real,Tl<:AbstractLink} <: AbstractLikelihood
struct GammaLikelihood{Tl<:AbstractLink,T<:Real} <: AbstractLikelihood
α::T # shape parameter
invlink::Tl
end
Expand Down
2 changes: 1 addition & 1 deletion test/likelihoods/gamma.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@testset "GammaLikelihood" begin
for args in ((), (1.0,), (exp,), (ExpLink(),), (1.0, exp), (1.0, ExpLink()))
lik = GammaLikelihood(args...)
@test lik isa GammaLikelihood{Float64,ExpLink}
@test lik isa GammaLikelihood{ExpLink,Float64}
@test lik.α == 1
end

Expand Down

2 comments on commit 1ec687f

@theogf
Copy link
Member Author

@theogf theogf commented on 1ec687f Jan 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release Notes:

Breaking:

  • The parametrization from GammaLikelihood went from {Talpha,Tlink} to {Tlink,Talpha}
  • The default constructor for CategoricalLikelihood will return CategoricalLikelihood{BijectiveSimplexLink{SoftMaxLink}} instead of CategoricalLikelihood{SoftMaxLink}

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/53564

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.0 -m "<description of version>" 1ec687fe7620cf991d7c5c5de7e125af545fe883
git push origin v0.3.0

Please sign in to comment.