lem*_*hop 8 r entropy information-theory
我在解释熵包中的mi.plugin()(或mi.empirical())函数的结果时遇到问题.据我所知,MI = 0告诉您,您要比较的两个变量是完全独立的; 随着MI的增加,两个变量之间的关联越来越不随机.
那么,为什么在R中运行以下命令(使用{entropy}包)时,我得到的值为0 :
mi.plugin( rbind( c(1, 2, 3), c(1, 2, 3) ) )
当我比较两个完全相同的向量时?
我认为我的困惑是基于我的理论误解,有人可以告诉我哪里出错了吗?
提前致谢.
小智 5
使用mutinformation(x,y)包infotheo.
> mutinformation(c(1, 2, 3), c(1, 2, 3) )
[1] 1.098612
> mutinformation(seq(1:5),seq(1:5))
[1] 1.609438
Run Code Online (Sandbox Code Playgroud)
规范化的互信息将为1.