Dear Bugs-Experts,
when creating a "hierarchy" of mixtures, WinBUGS crashes during model
compilation (dumps the workspace variable in a window). After a second
compilation run (without reloading model or data) no crash occurs and
the status line shows a message like "multiple definition for phi[1,1]".
# author-topic model (Steyvers et al. 2004)
model{
for( m in 1 : M ) {
for( n in 1 : N ) {
x[m,n] ~ dcat(a[m, 1:A])
z[m,n] ~ dcat(theta[x[m,n],1:K])
w[m,n] ~ dcat(phi[z[m,n] , 1:V])
}
}
for( k in 1 : K ) {
phi[k , 1:V] ~ ddirch(beta[])
}
for ( ii in 1 : A ) {
theta[ii,1:A] ~ ddirch(alpha[])
}
}
Leaving out the stochastic choice of the theta mixture works fine, though:
# latent Dirichlet allocation (Blei et al. 2002)
model{
for( m in 1 : M ) {
theta[m,1:K] ~ ddirch(alpha[])
for( n in 1 : N ) {
z[m,n] ~ dcat(theta[m,1:K])
w[m,n] ~ dcat(phi[z[m,n] , 1:V])
}
}
for( k in 1 : K ) {
phi[k , 1:V] ~ ddirch(beta[])
}
}
Am I ignoring something obvious?
Thanks for help,
gregor
ps: Is it generally ok to post code like this to this list?
-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
|