Skip to content

Commit

Permalink
use logmvgamma instead of old name lpgamma
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinschmidt committed Jun 27, 2018
1 parent cbfcf59 commit d6b90cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/normalinversewishart.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function logpdf(niw::NormalInverseWishart, x::Vector{T}, Sig::Matrix{T}) where T
# Normalization
logp::T = hnu * logdet(Lamchol)
logp -= hnu * p * log(2.)
logp -= lpgamma(p, hnu)
logp -= logmvgamma(p, hnu)
logp -= hp * (log(2.*pi) - log(kappa))

# Inverse-Wishart
Expand Down
2 changes: 1 addition & 1 deletion src/normalwishart.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function logpdf(nw::NormalWishart, x::Vector{T}, Lam::Matrix{T}) where T<:Real
logp = hp*(log(kappa) - Float64(log2π))
logp -= hnu * logdet(Tchol)
logp -= hnu * p * log(2.)
logp -= lpgamma(p, hnu)
logp -= logmvgamma(p, hnu)

# Wishart (MvNormal contributes 0.5 as well)
logp += (hnu - hp) * logdet(Lam)
Expand Down

0 comments on commit d6b90cd

Please sign in to comment.