update_classes_dp | R Documentation |
Dirichlet process class updates
update_classes_dp(
beta,
z,
b,
Omega,
delta,
mu_b_0,
Sigma_b_0,
n_Omega_0,
V_Omega_0,
identify_classes = FALSE,
Cmax = 10L
)
beta |
[ |
z |
[ |
b |
[ |
Omega |
[ |
delta |
[ |
mu_b_0 |
[ |
Sigma_b_0 |
[ |
n_Omega_0 |
[ |
V_Omega_0 |
[ |
identify_classes |
[ |
Cmax |
[ |
A list of updated values for z
, b
, Omega
, and C
.
set.seed(1)
z <- c(rep(1, 10),rep(2, 10))
b <- matrix(c(5, 5, 5, -5), ncol = 2)
Omega <- matrix(c(1, 0.3, 0.3, 0.5, 1, -0.3, -0.3, 0.8), ncol = 2)
beta <- sapply(
z, function(z) oeli::rmvnorm(n = 1, b[, z], matrix(Omega[, z], 2, 2))
)
beta[, 1] <- c(-10, 10)
update_classes_dp(
beta = beta, z = z, b = b, Omega = Omega,
delta = 1, mu_b_0 = numeric(2), Sigma_b_0 = diag(2),
n_Omega_0 = 4, V_Omega_0 = diag(2)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.