Skip to content

Commit 4fde429

Browse files
authored
bugfix: logpdf of gmm was wrong
I forgot the log...
1 parent 3b619f5 commit 4fde429

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/io/distributions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function logpdf(d::_GMM.GMM{Float64,Array{Float64,2}}, x::Real)
153153
σ = sqrt.(d.Σ)
154154
μ = d.μ
155155
g = _DST.Normal.(μ, σ)
156-
sum([d.w[i]*_DST.pdf(g[i],x) for i in 1:d.n])
156+
log(sum([d.w[i]*_DST.pdf(g[i],x) for i in 1:d.n]))
157157
end
158158

159159
function gradlogpdf(d::_GMM.GMM{Float64,Array{Float64,2}}, x::Real)

0 commit comments

Comments
 (0)