calculate_mis: calculate mis

View source: R/calculate_mis.R

calculate_misR Documentation

calculate mis

Description

Internal function to calculate the mutual information between each known variable and latent variable(s).

Usage

calculate_mis(
  data,
  theta,
  marginal_description,
  log_p_y,
  p_y_given_x_3d,
  dim_visible,
  logpx_method
)

Arguments

data

Data provided by user

theta

List of estimated parameters

marginal_description

Character string which determines the marginal distribution of the data. 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.

p_y_given_x_3d

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)

dim_visible

The dimension of the data provided in data - i.e. the number of discrete levels that exist in the data. Must be positive integer.

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 y estimates.

Value

Returns an array of normalised mutual information with number of columns = n_visible and number of rows = n_hidden.


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