calculate_p_xi_given_y: calculate_p_xi_given_y

View source: R/calculate_p_xi_given_y.R

calculate_p_xi_given_yR Documentation

calculate_p_xi_given_y

Description

Internal function to calculate marginals for a single column of data given parameter estimates

Usage

calculate_p_xi_given_y(x_i, thetai, marginal_description, dim_visible = NULL)

Arguments

x_i

A single variable/column of data

thetai

Estimated parameters corresponding to the single variable/column of data provided to x_i

marginal_description

Character string which determines the marginal distribution of the data. For biocorex only 'gaussian' and 'discrete' are allowed.

dim_visible

Integer. The dimension of the data - i.e. the number of discrete levels that exist in the data.

Details

This function is an intermediate function with parent calculate_marginals_on_samples and child functions marginal_p_discrete and marginal_p_gaussian. It's main function is to call the appropriate child function depending on the value of the marginal_description variable.

Value

A 3D array of marginals with dimensions: (n_hidden, n_samples, dim_hidden) - i.e. marginals for each data point in x_i given current n_hidden x dim_hidden parameter estimates


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