initialise_parameters: initialise_parameters

View source: R/initialise_parameters.R

initialise_parametersR Documentation

initialise_parameters

Description

Internal function to initialise corex parameters

Usage

initialise_parameters(data, n_hidden, dim_hidden)

Arguments

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

Details

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.

Value

Returns a list consisting of 5 initialised corex parameters:

  1. n_samples is the number of rows in the user supplied data.

  2. n_visible is the integer number of variables in user input data.

  3. alpha is a 2D adjacency matrix between input variables and hidden units. In range [0,1].

  4. 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).

  5. 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.


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