calculate_latent: calculate latent

View source: R/calculate_latent.R

calculate_latentR Documentation

calculate latent

Description

Internal function to calculate the probability distribution for hidden factors for each sample

Usage

calculate_latent(data, alpha, log_p_y, log_marg_x_4d)

Arguments

data

Data provided by user

alpha

2D matrix. Numeric matrix of indicator variables that indicates adjacency of observed vs hidden variables

log_p_y

A 2D matrix representing the log of the marginal probability of the latent variables

log_marg_x_4d

A 4D array the contains the value of the marginal distribution for each variable, for each dimension of each hidden variable and for each data row.

Details

Calculate the probability distribution for each latent y variable given the data, the marginals and the probability of each y. This calculation is represented by Equation 16 of Greg Ver Steeg and Aram Galstyan. Maximally Informative Hierarchical Representations of High-Dimensional Data. 2015. https://arxiv.org/abs/1410.7404

Value

3D array of numerics in range (0, 1), that represent the probability for n_hidden latent y variables of dimension dim_hidden, for each observed x variable with dimensions (n_hidden, n_samples, dim_hidden)


jpkrooney/rcorex documentation built on July 25, 2022, 1:37 a.m.