Skip to content

Poor support of using column in IO #17

@xukai92

Description

@xukai92

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions