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,
我有一个变量,其值类似于[23.13,56.1,12.6,1.23,5.56]。我想找到这个变量的熵。我在这里得到了一个代码How to compute the shannon entropy and mutual information of N variables,但是对于连续变量,bin大小应该是首选?