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

View source: R/RcppExports.R

update_emat_with_F_doubletreeR Documentation

Update the variational probabilities of each observation in one of pL1 leaves in tree1

Description

NB: does this work for the case where missing tree1 label can be in multiple domains, and missing/non-missing can happen at the same time for any domain?

Usage

update_emat_with_F_doubletree(curr_F, rmat, digamma_emat, v2_lookup)

Arguments

curr_F

F from F_doubletree()

rmat

matrix (N by K); row sums are one - the class probabilities for each observation.

digamma_emat

matrix(pL1 by pL2)

v2_lookup

v2_lookup is 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 in tree2

Details

This function updates the N by pL1 matrix emat in the package

Value

N by pL1 variational multinomial probabilities for the posterior distribution of N people's membership in the pL1 leaves in tree1; row sums are 1s. F is to prepare for rmat updates. For subjects with observed leaf label in tree1, the corresponding rows of res should be further modified.


zhenkewu/doubletree documentation built on Oct. 21, 2023, 7:04 a.m.