Learn R Programming

SpeedReader (version 0.9.1)

mutual_information: Mutual Information

Description

Calculate Mutual Information

Usage

mutual_information(joint_dist, normalized = FALSE,
  non_zero_column_entries = NULL)

Arguments

joint_dist

A matrix of class "simple_triplet_matrix" or a standard dense matrix.

normalized

Defaults to FALSE. If TRUE, then the function expects a matrix which sums to one. WARNING -- this function will not check to see if the matrix sums to one if TRUE (for speed reasons).

non_zero_column_entries

Defaults to NULL, otherwise, a vector of length equal to the number of rows in the joint_dist recording the number of non-zero column entries for that row. Can greatly speed up computation. Must be supplied if normalized = TRUE.

Value

The mutual information of the joint distribution.