This manual is designed to document the CSCS 520 suite of programs. The programs are:
These programs are designed to perform simple analyses on a time series. They all reside on the CSCS machines, which are located in the CSCS Computer Lab, 4477 Randall. They can be found in the directory
/s1/courses/pscs520/binEach program can be run in two ways: interactively through a text-based user interface, or with command line options. To run the programs interactively, simply type the name of the program with no command line options. This will start the user interface, which will prompt you for all of the required information to run the program.
Using command line options to specify program parameters is generally faster than using the user interface. If a specific option is not specified, the default value for that option will be used. The defaults are listed in the tables below.
The datasets are stored in binary format as big endian double precision floating point numbers. The best way to import one of the datasets into Mathematica is to export it first into an intermediate file. This can be done by using the utility program /s1/courses/pscs520/bin/convert, which takes a dataset and converts it into an ASCII file.
Usage: convert [-p precision] [-n num_pts] [-s data_set] -o
Once you have exported the dataset, Mathematica should be able to read the
ASCII file.
General Description
In the following discussion, x is a time series. The dimension
calculator divides the range, r into P equally sized segments, where P
is the specified number of initial partitions. It then constructs d-tuples
from the time series by taking time lags, where d is a dimension chosen
for the reconstruction of the time series. Thus, the division of the range
into P segments produces a set of boxes in the d-dimensional space, each
of which has a linear size Next, the program multiplies the number of segments by
m, a multiplicative factor, and divides each axis of the d-dimensional
space into mP segments, thus forming d-dimensional boxes of linear dimension
The index k labels which dimension we are computing. For
a given k, and for each iteration (i.e. each segmentation of the range)
the program calculates the following quantities:
k not 0
k=0
Here V is the total number of d-dimensional vectors in
the time series. If T is the length of the time series, then V=T-d. N is
the total number of boxes into which the d-dimensional reconstruction space
is divided. (This is just the number of segments into which each axis of
the space is divided, raised to the d power.) ni is the number
of d-tuples contained in box i, and epsilon is the
linear size of the box, as defined above.
Although the dimension Dk+1 are, strictly speaking,
defined in the epsilon -> 0 limit, when considering finite data sets, or data sets in which there
may be noise added to some underlying deterministic structure, one cannot
use this definition practically. The reason is that for small epsilon,
statistical limitations due to finite data and noise effects become dominant.
Rather, a more reasonable strategy is to look for a range of epsilon over
which the ratio
or
is sensibly constant. Thus, in practice, one plots (1)
or (2) vs. log(epsilon) and looks for a region where
the resulting curve is approximately a straight line. The slope of that
line will then be an estimate for Dk.
Dimension Program Output File
The dimension program produces an output file containing
the following information: For each value of k that was specified, the
output file has a series of epsilons and dimension calculations. For example,
the output below details five iterations (the five different epsilons)
and three dimensions.
Examples
The following examples demonstrate a few ways of using
the dimension calculator.
General Description
The lyapunov exponent calculator works as follows:
For every n-tuple ( xi, xi+1,
xi+2, ... xi+n-1), the program finds all n-tuples
( xj, xj+1, xj+2, ... xj+n-1)
such that and d < e , where e
is the specified value of epsilon. For each pair of n-tuples that
are within epsilon, the value
is calculated, where T is the specified time offset. From
these two values, d and D, the following estimation of the lyapunov exponent
is calculated:
A histogram of the lambdas is generated by the program.
Lyapunov Program Output File
The program produces an output file containing histogram data, which can be used
to obtain the lyapunov exponent.
Examples
General Description
The delta calculator computes the probability that two
vectors are within e , where e
is a calculated value of epsilon. It works as follows:
Initially, the value of e is
equal to s mu init
, where s is the standard deviation, and
muinit is a user specified parameter. For every d-tuple
( xi, xi-1, xi-2, ... xi-d+1),
the program counts all d-tuples ( xj, xj-1,
xj-2, ... xj-d+1) such that
For each pair of n-tuples that are within e
, the count is incremented. The probability
is calculated, where n is the
count of the number of pairs within e , and
N is the total number of d-tuples in the time series.
From these calculated values of C, the deltas and predictabilities
are then calculated.
In each successive iteration of the program, e
= e mu , where mu
is a user-specified parameter. The loop repeats through i iterations,
with i being specified by the user as well.
Delta Program Output File
The program produces an output file containing the following
information:
where:
precision = number of decimal places in each output file 'myfile'.
num_pts = number of points to convert (default = 1000)
data_set = which data set to convert (a letter between 'a' and 'i')
.
The program then determines the box in which the d-tuple is contained,
and increments the count of the number of d-tuples that are within that
box. When all d-tuples in the time series have been exhausted, the program
computes the quantities in expressions (1) and (2) below.
in the d-dimensional reconstruction space. The number of segments along
each axis is guaranteed to increase by at least one for each iteration
of this process. The program then repeats the calculations described above
for this new set of boxes. After that, the program again multiplies the
number of segments by m, thus forming d-dimensional boxes of linear size
,
and repeating the calculations. This process continues for the number of
specified iterations.
(1)
(2)
k not 0
k = 0
Results for k = -1
Dimension
log10(epsilon) 1 2 3
0.249975 0.000400 0.000800 0.001700
0.199980 0.000500 0.001100 0.002200
0.166650 0.000600 0.001300 0.002600
0.142843 0.000700 0.001600 0.003200
0.124987 0.000800 0.001600 0.003500
dimension -zA
Uses all of the default values on data set A.
dimension -z A -o mydim.out
Same as above except output is written to the file "mydim.out"
dimension -d3:5 -n20000 -f infile.dat
Calculates 20,000 points of the input file "infile.dat" for dimensions 3 to 5 inclusive.
dimension -d4 -zA -c30000:40000
Uses the 10,000 points of data set A from index 30,000 to 40,000 and calculates dimension 4.
dimension -zA -k"-2:2"
Calculates values of k equal to -2, -1, 0, 1, and 2 for data set A, using all other
default values.



lyapunov -zC -n50000 -d3:5 -T3
Performs the calculation on 50,000 points of dataset C for dimensions 3, 4, and 5 with
a time offset of 3.
lyapunov -c40000:50000 -d2 -zb
Analyzes 10,001 points of dataset b from index 40,000 to 50,000 inclusive for
dimension 2.


CSCS 520 Delta Calculator Results - Thu Mar 18 16:08:50 1998
Program parameters:
Input file: /s1/courses/pscs520/data/dataA.bin
Time Series Length: 10000 points, Range: 0 - 10000
Starting Dimension: 1 Ending Dimension: 3
Mu: 0.5000000 Number of Mu's: 4
Sigma: 0.2903502
Lag Values : 0, 1, 2
*************************************************************************
Epsilon C01 C02 C03
0.1451751 0.1500574 0.0843727 0.0472669
0.0725875 0.0739823 0.0394495 0.0210504
0.0362938 0.0368568 0.0191454 0.0099546
0.0181469 0.0183442 0.0093495 0.0047707
*************************************************************************
Epsilon Delta 01 Delta 02 Delta 03
0.1451751 0.7331217 0.0036645 0.0000000
0.0725875 0.8612563 0.0007028 0.0000000
0.0362938 0.9290472 0.0009426 0.0000000
0.0181469 0.9640077 0.0011719 0.0000000
*************************************************************************
Epsilon S01 S02 S03
0.0725875 0.0739823 0.5332295 0.5336045
0.0362938 0.0368568 0.5194545 0.5199446
0.0181469 0.0183442 0.5096689 0.5102669
0.0090734 0.0091349 0.5041898 0.5054090
Examples
deltacalc -za -c "1000:2000" -d "3:5"
Analyze 1001 points between 1000 and 2000 inclusive for dimensions 3 to 5 of data set A
deltacalc -M 0.33 -i 15 -f myfile.inp
Analyze points from myfile.inp with initial mu of 0.33 and perform 15 iterations.
deltacalc -zf -l "0,1,5:9"
Analyze data set F and set the lag map to 0, 1, 5, 6, 7, 8, 9