Commit 818d3e48 authored by Chris Jewell's avatar Chris Jewell
Browse files

Small reversion in the model.

parent 62da9323
......@@ -79,9 +79,9 @@ DPModel_impl <- R6::R6Class(
for (src in 1:length(Sources)) {
# Dirichlet prior on r, as a result of Dirichlet/Multinomial conjugacy on R.
a_r_full <- DataNode$new(data = a_r[, src, time] + X[, src, time], name = paste('a_r', time, src, sep = '_')) # Todo: Prior here
xcol <- R[, src, time] + 0.1 # Added for numeric stability -- only affects starting values for r
xcol <- R[, src, time] + 0.000001 # Added for numeric stability -- only affects starting values for r
xcol <- xcol/sum(xcol)
self$rNodes[[time]][[src]] <- DirichletNode2$new(data = setNames(xcol, Type),
self$rNodes[[time]][[src]] <- DirichletNode$new(data = setNames(xcol, Type),
alpha = a_r_full,
name = paste('r', time, src, sep = '_'))
}
......
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