mutual_info calculates the mutual information between two vectors. It is a helper function for muti.

mutual_info(su, normal)

Arguments

su

An n x 2 matrix containing two discrete vectors.

normal

A logical indicator as to whether the mutual information should be normalized to [0,1].

Value

A scalar of class `numeric` of the (possibly normalized) mutual information.