update_hyperparams: update hyperparameters in the latent class model with...

View source: R/update.R

update_hyperparamsR Documentation

update hyperparameters in the latent class model with observations organized in a tree

Description

update hyperparameters in the latent class model with observations organized in a tree

Usage

update_hyperparams(
  Y,
  A,
  leaf_ids_units,
  ancestors,
  h_pau,
  levels,
  v_units,
  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,
  E_beta_sq,
  E_eta_sq,
  E_beta,
  E_eta,
  psi,
  g_psi,
  phi,
  g_phi,
  tau_1,
  tau_2,
  shared_tau,
  a,
  b,
  K,
  tau_update_levels,
  update_hyper,
  quiet
)

Arguments

Y

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.

A

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.

leaf_ids_units

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.

ancestors

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.

h_pau

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.

levels

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.

v_units

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

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

n

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

J

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

p

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

pL

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

Fg

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

prob

variational parameters updated by update_vi_params()

prob_gamma

variational parameters updated by update_vi_params()

mu_gamma

variational parameters updated by update_vi_params()

mu_alpha

variational parameters updated by update_vi_params()

rmat

variational parameters updated by update_vi_params()

sigma_gamma

variational parameters updated by update_vi_params()

Sigma_alpha

variational parameters updated by update_vi_params()

tau_1_t

variational parameters updated by update_vi_params()

tau_2_t

variational parameters updated by update_vi_params()

a_t

variational parameters updated by update_vi_params()

b_t

variational parameters updated by update_vi_params()

E_beta_sq, E_eta_sq, E_beta, E_eta

moments computed by update_vi_params()

psi

parameters updated by update_hyperparams()

g_psi

parameters updated by update_hyperparams()

phi

parameters updated by update_hyperparams()

g_phi

parameters updated by update_hyperparams()

tau_1

parameters updated by update_hyperparams()

tau_2

parameters updated by update_hyperparams()

shared_tau

parameters updated by update_hyperparams()

a

fixed hyperparameters not to be updated.

b

fixed hyperparameters not to be updated.

K

fixed hyperparameters not to be updated.

tau_update_levels

a numeric vector, specifies which levels of hyperparameters to update

update_hyper

Logical, TRUE or FALSE to indicate whether to update tau_1 and tau_2. This is computed at every iteration in fit_lcm_tree()

quiet

default to FALSE, which prints intermediate updates of hyperparameters

Value

a list of updated hyperparameters: tau_1,tau_2,psi,g_psi,phi,g_phi, along with a new ELBO value.


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