mi.plugin {entropy} | R Documentation |
mi.plugin
computes the mutual information of
of two discrete random variables from the specified bin frequencies.
mi.plugin(freqs2d, unit=c("log", "log2", "log10"))
freqs2d |
matrix of bin frequencies. |
unit |
the unit in which entropy is measured. |
The mutual information of two discrete random variables X and Y is defined as MI = H(X) + H(Y) - H(X, Y).
mi.plugin
returns the mutual information.
Korbinian Strimmer (http://strimmerlab.org).
# load entropy library library("entropy") # joint distribution of two discrete variables freqs2d = rbind( c(0.2, 0.1, 0.15), c(0, 0.3, 0.25) ) # and corresponding mutual information mi.plugin(freqs2d)