Displaying 1 result from an estimated 1 matches for "meanl".
Did you mean:
means
2008 Jul 17
0
How to compute loglikelihood of Lognormal distribution
...ls with EM.
I was wondering how does one compute the log likelihood.
The current implementation I have is as follows,
which perform really bad in learning the mixture models.
__BEGIN__
# compute probably density of lognormal.
dens <- function(lambda, theta, k){
temp<-NULL
meanl=theta[1:k]
sdl=theta[(k+1):(2*k)]
for(j in 1:k){
# each being lognormal distribution
temp=cbind(temp,dlnorm(x,meanlog=meanl[j],sdlog=sdl[j]))
}
temp=t(lambda*t(temp))
temp
}
old.obs.ll <- sum(log(apply(dens(lambda, theta, k...