marginal_p_discrete: Marginal Probabilities for discrete data

View source: R/marginal_p_discrete.R

marginal_p_discreteR Documentation

Marginal Probabilities for discrete data

Description

Internal function to estimate the marginals for discrete data.

Usage

marginal_p_discrete(x_i, thetai, dim_visible)

Arguments

x_i

A single variable/column of data

thetai

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

dim_visible

The dimension of the variable provided in x_i - i.e. the number of discrete levels

Details

Estimate the marginals for a single column of data x_i for each hidden variable with dimension dim_hidden. For discrete data this can be calculated directly from the data.

Value

A three dimensional array of marginals with dimensions: (n_hidden, dim_hidden, n_samples) - 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.