View source: R/calculate_marginals_on_samples.R
calculate_marginals_on_samples | R Documentation |
Internal function to calculate marginals given data and parameter estimates
calculate_marginals_on_samples( data, theta, marginal_description, log_p_y, dim_visible = NULL, returnratio = TRUE, logpx_method )
data |
Data provided by user |
theta |
List of estimated parameters |
marginal_description |
Character string which determines the marginal distribution of the data. A single marginal description applies to all variables in biocorex. |
log_p_y |
A 2D matrix representing the log of the marginal probability of the latent variables |
dim_visible |
The dimension of the data provided - i.e. the number of discrete levels that exist in the data. Must be positive integer. |
returnratio |
A Boolean that returns log_marg_x_4d for the value TRUE and log_p_xi_given_y_4d for the value FALSE. Intended for development use and may not be retained long term. |
logpx_method |
EXPERIMENTAL - A character string that controls the method used to calculate log_p_xi. "pycorex" uses the same method as the Python version of biocorex, "mean" calculates an estimate of log_p_xi by averaging across n_hidden estimates. |
Calculate the value of the marginal distribution for each variable, for each dimension of each hidden variable and each sample
4D array of dimensions: (n_hidden, n_samples, n_visible, dim_hidden )
where n_samples is the number of rows in the user provided data, and n_visible is the number of columns. Returned data is result fo the calculation log ≤ft( \frac{p≤ft(y_{j} \mid x_{i}\right)}{p≤ft(y_{j}\right)} \right)) for each j,sample,i,y_j
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.