1
$\begingroup$

I'm trying to use the RTransferEntropy package to compute TE for my data.

I want to understand how discrete series are handled by functions like the transfer_entropy(), calc_te(), etc.

I know that if a continuous valued series is passed, they are discretized using some provided techniques. However, I want to know if an already discrete data is passed into these functions, are they discretized again? Because, I don't find an option to 'turn off' discretization. I think it happens by default no matter what kind of series is passed. Am I right?

In the example below, 'y' is a matrix with continuous values, whereas 'x' is a matrix that is a discretized version of 'y' using quantiles.

x = t(apply(y, 1, function(r) dataDiscretize(r, 
      classBoundaries = 5, method = 'quantile')$discreteData))
print(calc_te(x[1,], x[2,])). 
print(calc_te(y[1,], y[2,], type='quantiles', quantiles=5))

But, for the same values of the number of quantiles used in discretization, I get completely different TE results when calling the 'calc_te' function. The only difference between the two cases is when the discretization is done, x is an already discretized series passed into calc_te() whereas, 'y' is a continuous series that is internally discretized by calc_te(). If the same discretization technique i.e, quantiles (equal frequency) and the same number of quantiles i.e 5 in this case are defined, why are the TE results totally different?

Could someone help me understand what's happening? I would like to discretize the data myself.

$\endgroup$
1
  • 1
    $\begingroup$ Usually one needs a contingency table to compute entropies. Normally, one should separate the discretisation from the main implementation similar to Korbinian Strimmer's cran.r-project.org/web/packages/entropy/index.html Looks like RTransferEntropy did not separated this. $\endgroup$ Commented Dec 4, 2021 at 14:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.