update_vi_params: update variational parameters in the latent class models with...

View source: R/update.R

update_vi_paramsR Documentation

update variational parameters in the latent class models with observations organized in a tree

Description

Used by fit_lcm_tree(), which also invoke update_hyperparams() to update hyperparameters and calculate evidence lower bound (ELBO)

Usage

update_vi_params(
  Y,
  A,
  Z_obs,
  leaf_ids_units,
  leaf_ids_nodes,
  ancestors,
  cardanc,
  v_units,
  h_pau,
  levels,
  subject_id_list,
  X,
  n,
  J,
  p,
  pL,
  Fg,
  prob,
  prob_gamma,
  mu_gamma,
  mu_alpha,
  rmat,
  sigma_gamma,
  Sigma_alpha,
  tau_1_t,
  tau_2_t,
  a_t,
  b_t,
  psi,
  g_psi,
  phi,
  g_phi,
  tau_1,
  tau_2,
  shared_tau,
  a,
  b,
  K,
  s_u_zeroset,
  s_u_oneset
)

Arguments

Y, A, Z_obs, leaf_ids_units, leaf_ids_nodes, ancestors, cardanc, v_units, h_pau, levels, subject_id_list

outputs from design_tree(), which reorders the nodes by internal and leaf nodes; the observations are also ordered from low- to high-indexed leaf nodes.

X, n, J, p, pL, Fg

computed from the data by lcm_tree() at the beginning before the VI updates

prob, prob_gamma, mu_gamma, mu_alpha, rmat, sigma_gamma, Sigma_alpha, tau_1_t, tau_2_t, a_t, b_t,

variational parameters updated by update_vi_params()

psi, g_psi, phi, g_phi, tau_1, tau_2, shared_tau

parameters updated by update_hyperparams()

a, b, K, s_u_zeroset, s_u_oneset

fixed hyperparameters not to be updated.


zhenkewu/lotR documentation built on April 24, 2022, 2:36 a.m.