-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Description
Model using :
below is poorly supported to fetch variables from Chain
.
@model ldamodel(K, V, M, N, w, doc, alpha, β) = begin
theta = Matrix{Real}(M, K)
for m = 1:M
theta[m,:] ~ Dirichlet(alpha)
end
phi = Matrix{Real}(K, V)
for k = 1:K
phi[k,:] ~ Dirichlet(β)
end
# z = tzeros(Int, N)
# for n = 1:N
# z[n] ~ Categorical(theta[doc[n]])
# end
for n = 1:N
w[n] ~ Categorical(phi' * theta[doc[n],:])
end
end
Have to write variables in type of nest arrays at this moment.
Metadata
Metadata
Assignees
Labels
No labels