Skip to main content
. 2023 Jun 24;25(7):973. doi: 10.3390/e25070973
Algorithm 1: Time delay determination
Input: one-dimensional time series S = {xi}; time delay max value τmax; iteration number N
Output: best time delay τ*
1 compute the entropy of S: HS=sSpslog ps
2 for i = 1: N
3     time delay τ = i × τmax/N
4     time delayed system Q = {xi+τ}
5     compute the entropy of Q: HQ=qQpqlog pq
6    compute the joint entropy of SandQ: HS,Q=sS,qQpsqlog psq
7    compute the mutual information of SandQ: I(τ)=HS+HQHS,Q
8 end for
9 τ* =arg min τIτ