MI(maigesPack)
MI()所属R语言包:maigesPack
Calculate Mutual Information
计算互信息
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Function to calculate the mutual information of 2 random variables, or between all pairs of rows of a numerical matrix.
函数来计算的2个随机变量,或所有对一个数值矩阵的行之间的相互信息。
用法----------Usage----------
MI(x, y=NULL, k=1)
参数----------Arguments----------
参数:x
numerical matrix to calculate the MI between all pairs of rows from x. Also, x must be a numerical vector and y must be specified as another numerical vector of same lenght as x and the MI value between both them are calculated.
数值矩阵计算心肌梗死之间的所有行对从x。此外,x必须是一个数值向量和y必须指定x和心肌梗死的价值两者之间的计算数值另一个相同长度的向量。
参数:y
optional numerical vector that must be specified if x is a vector. Defaults to NULL.
可选的数值向量,必须指定x如果是一个向量。默认为空。
参数:k
integer specifying the number of the neighbours to be used in the calculation of the MI value.
整数,指定将要使用的MI值计算的邻居。
Details
详情----------Details----------
This function implements an algorithm proposed by Kraskov et al. (2004) that don't use estimator of the entropy.
此功能实现由Kraskov等提出了一种算法。 (2004年),不使用的熵的估计。
值----------Value----------
If x is a matrix, the function return a square matrix with lenght equal to the number of rows of x with MI values between all pairs of rows from x. If x is a numerical vector, y must be specified and the function returns a positive real number with the MI value between the two vectors.
如果x是一个矩阵,函数返回长度等于行数一个方阵x从x行之间的所有对MI值。如果x是一个数值向量,y必须指明函数返回一个正实数与两个向量之间的MI值。
作者(S)----------Author(s)----------
Gustavo H. Esteves <<a href="mailto:gesteves@vision.ime.usp.br">gesteves@vision.ime.usp.br</a>>
参考文献----------References----------
information, Physical Review E, 69, 066138, 2004 (http://scitation.aip.org/getabs/servlet/GetabsServlet?prog=normal&id=PLEEE8000069000006066138000001&idtype=cvips&gifs=yes).
举例----------Examples----------
x <- runif(50, 0, 1)
y <- rbeta(50, 1, 2)
MI(x, y)
z <- matrix(rnorm(100, 0, 1), 4, 25)
MI(z)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|