Commit cf0a9863 authored by Chris Jewell's avatar Chris Jewell
Browse files

Fixed omission of concentration parameter from Dirichlet Process conditional...

Fixed omission of concentration parameter from Dirichlet Process conditional posterior on groupings.
parent c798daef
......@@ -375,7 +375,7 @@ PoisGammaDPUpdate <- R6::R6Class(
logpi <-
log(nk_local) + y[i] * log(theta) - theta * aX[i]
logpiplus <-
logpiplus <- log(self$node$conc) +
log(self$beta ^ self$alpha / gamma(self$alpha)) +
lgamma(self$alpha + y[i]) -
(self$alpha + y[i]) * log(self$beta + aX[i])
......@@ -402,7 +402,7 @@ PoisGammaDPUpdate <- R6::R6Class(
0 # Add new class, increment later
}
else {
self$node$s[i] <<- names(pi)[idx]
self$node$s[i] <- names(pi)[idx]
}
# Update table of s counts, remove a class from theta if necessary
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment