get_line1_2_15_doubletree: calculate line 1, 2, and 15 of ELBO*

View source: R/RcppExports.R

get_line1_2_15_doubletreeR Documentation

calculate line 1, 2, and 15 of ELBO*

Description

Intended to be faster than its counterpart implementation in R.

Usage

get_line1_2_15_doubletree(
  F,
  digamma_emat,
  rmat,
  emat,
  v1_lookup_NA_replaced,
  v2_lookup
)

Arguments

F

intermediate values from updates of rmat and emat; dimension: N by pL1 by K; currently for observations with known leaf labels in tree1 AND tree2, there is redundancy because once we know i, we know the leaf 1 label, hence no need for the second dimension

digamma_emat

matrix(pL1 by pL2)

rmat

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

emat

matrix (N by pL1)

v1_lookup_NA_replaced

vector; includes values of pL+1 for unknown leaf label in tree1.

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

line 1, 2, 15 of the ELBO* in Appendix


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