next up previous contents
Next: MLDK2FIT Up: Implementation Previous: MLDK2MCC   Contents

MLDK2

The MLDK2 program does the calculation of distances from a time series. It is implemented under VAX/VMS and CONVEX/UNIX. This section describes MLDK2 version 4.1, for the CONVEX, implemented in FORTRAN, in double precision.

A time series is kept as a data file on a computer storage device. The data file may contain samples obtained from an analog-to-digital converter or from a simulation program that solves difference or differential equations. A file should contain the number of samples, the sample time, identification strings and the sample values. For efficiency and accuracy reasons, the data is stored in their binary form (unformatted).

After invoking MLDK2, the user should specify the name of the data file. The data is then read into the $x$-array. To scale the distances so that the maximum one will equal 1, the size of the attractor (assuming there is one) is estimated by the difference between the minimum and maximum value in the array. The $x$ values are transformed by the equations


$\displaystyle a$ $\textstyle =$ $\displaystyle \frac{1}{\max(x) - \min(x)}$  
$\displaystyle b$ $\textstyle =$ $\displaystyle -\frac{(\max(x)-\min(x))}{2(\max(x)-\min(x))}$ (5.78)
$\displaystyle x$ $\textstyle :=$ $\displaystyle {ax + b \quad \mbox{for every sample}}$  

The user specifies the values for the time delay, the ``Theiler correction'', the norm, the maximum embedding dimension, the number of distances, the number of bins $N_{bin}$, the distance to be associated with the first bin boundary ($r_{min}$) and the name of the output file. The default value for $r_{min}$ is determined by an estimate of the smallest distance likely to be found5.1 at embedding dimension 1:

\begin{displaymath}
r_{min} = \frac{1}{N}
\end{displaymath} (5.79)

where $N$ is the number of distances [Takens, 1987]. The bins are necessary to group the distances instead of storing them all. The $d$-dimensional phase space is constructed with the method of time delayed coordinates as described in section 2.5. The original correlation integral involved the calculation of all distances possible, i.e. using all possible indices $i,j$ with $1 \leq i,j \leq L' = L - (d-1)l$. To save computer time and satisfy the independence assumption, a method should be devised to choose a subset of all possible indices. MLDK2 just chooses the indices using the NAG random number generator:
\begin{displaymath}
i = \mbox{int} ( \mbox{G05DAF}(0,L') ) + 1
\end{displaymath} (5.80)

So a particular vector index can be chosen more than once. The same applies for index $j$. The Theiler correction now comprises that if
\begin{displaymath}
\mbox{abs} (j-i) \leq W
\end{displaymath} (5.81)

this choice is to be discarded.

Since MLDK2FIT (see below) makes a plot of the correlation integrals, i.e. $\log C(r)$ as a function of $\log r$, we let the right (upper) bin boundaries be given by

\begin{displaymath}
\log(r_{ibin}) = \frac{\log(r_{min}) (N_{bin}-ibin)} {(N_{bin}-1)}
\end{displaymath} (5.82)

The ``distance to bin index'' conversion is consequently
\begin{displaymath}
ibin = \mbox{max} \left( 0,\mbox{int} \left(
\frac{\log(r) (1-N_{bin})}{\log(r_{min})} + (N_{bin}-1)
\right) \right) + 1
\end{displaymath} (5.83)

This construction sets the bin boundaries of the first bin to $]0,\log(r_{min})]$. Note that the actual left boundary is given by machine precision. The occurrence of distances that are indistinguishable from zero are counted in the $nnul$ array (they cannot be discarded since they belong to $N_l$). In the case of the Euclidean norm, $r$ is divided by the square root of the embedding dimension so that the maximum distance possible will fall in the $N_{bin}$-th bin.

The $dista$ array contains the sum of the logarithm of the distances that fall in a specific bin; the $count$ array contains the number of distances that fall in that bin and all ``lower'' ones.

At the end, the specified parameter values, the ($dista$, $count$ and $nnul$) arrays and the date of the experiment are written to the output file. This is a ``formatted'' one, since it must be transferred to the VAX via the network for post-processing by MLDK2FIT.


next up previous contents
Next: MLDK2FIT Up: Implementation Previous: MLDK2MCC   Contents
webmaster@rullf2.xs4all.nl