计算r中的转移熵

时间:2017-09-13 07:36:13

标签: r transfer entropy

library(TransferEntropy)

x = c(0,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0)

y = c(0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0)

computeTE(x,y,3,1,"MI_diff",safetyCheck = T)
  

computeTE中的错误(x,y,3,1,“MI_diff”,safetyCheck = T):     X树中具有相同坐标的点(添加噪声)。

我有像x和y这样的二进制数据,我需要计算它们之间的传递熵,我使用R并执行上述步骤但是我收到错误!!但是当我使用时:

computeTE(x,y,3,1,"Correlation")

这有效,但我想知道为什么 当我将相同的代码R崩溃时,我的实际数据有43200条记录

1 个答案:

答案 0 :(得分:0)

由于数据的格式是数据格式是双重格式,因此r不接受它因此崩溃