View source: R/initialise_parameters.R
initialise_parameters | R Documentation |
Internal function to initialise corex parameters
initialise_parameters(data, n_hidden, dim_hidden)
data |
Data provided by user |
n_hidden |
integer. Integer number of hidden units. Default = 1 |
dim_hidden |
integer. Each hidden unit can take dim_hidden discrete values. Default = 2 |
Given the main corex arguments (the data, n_hidden and dim_hidden) this function generates objects with the correct dimensions to initialise the corex algorithm. Random values for alpha are chosen from a random uniform bound between 0 and 1, while for the unnormalised p_y_given_x_3d random values are chosen from a dirichlet distribution before p_y_given_x_3d is then normalised - during this step initial values for log_z are also calculated.
Returns a list consisting of 5 initialised corex parameters:
n_samples is the number of rows in the user supplied data.
n_visible is the integer number of variables in user input data.
alpha is a 2D adjacency matrix between input variables and hidden units. In range [0,1].
p_y_given_x_3d is a 3D array of numerics in range (0, 1), that represent the probability that each observed x variable belongs to n_hidden latent variables of dimension dim_hidden. p_y_given_x_3d has dimensions (n_hidden, n_samples, dim_hidden).
log_z is a 2D matrix containing the pointwise estimate of total correlation explained by each latent variable for each sample - this is used to estimate overall total correlation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.