The procedure for calculating the approximate entropy (ApEn) [26] is as follows:
Assume that the original data series is x(1), x(2),…, x(N), with a total number of N points.
(1) A set of m-dimensional vectors is composed in sequential order of serial numbers:
(2) The distance d[X(i), X(j)] between X(i) and X(j) is defined as the greatest difference between two corresponding elements:
The difference between other corresponding elements in X(i) and X(j) is less than d. Calculate the distance d[X(i), X(j)] between X(i) and the rest of the vector X(j) (j = 1~N−m+1, and j≠i) for each i.
(3) Assume a threshold r, count the number of d[X(i), X(j)] less than r for each i, and calculate the ratio of this number to the total distance N–m, denoted as , as follows:
(4) Calculate the logarithm of first, and then calculate the mean value of the logarithm for all i, denoted as Φm(r), as follows:
(5) Add 1 to the dimension to obtain m+1, and repeat steps (1)–(4) to obtain and Φm+1(r).
(6) The ApEn of the series can be calculated using the following formula:
When N is finite, an estimated ApEn of the series can be obtained as follows:
The parameters m and r have an impact on estimating ApEn and need to be determined. According to Pincus’s proposal [27], the parameter m is set to 2, the parameter r is usually k times the standard deviation of the data series, and the value of k ranges from 0.10 to 0.20, with a step size of 0.01. The influence of different k values on the ApEn of the soil moisture and temperature series under the experimental sloping land use types was programmed and calculated using MATLAB R2015b software (The Mathworks, Natick, MA, USA).
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this article to respond.