update_rmat: Update the variational probabilities of each observation in...

View source: R/RcppExports.R

update_rmatR Documentation

Update the variational probabilities of each observation in one of K classes

Description

This function updates the N by K matrix rmat in the package

Usage

update_rmat(
  psi,
  g_psi,
  phi,
  g_phi,
  X,
  E_beta,
  E_eta,
  E_beta_sq,
  E_eta_sq,
  v_lookup
)

Arguments

psi, g_psi, phi, g_phi

local variational parameters

X

transformed data: 2Y-1

E_beta, E_eta, E_beta_sq, E_eta_sq

moment updates produced by get_moments_cpp

v_lookup

a vector of length equal to the total number of rows in X; each element is an integer, indicating which leaf does the observation belong to.

Value

N by K variational multinomial probabilities; row sums are 1s.


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