### Cost functions

The extendable family of routines for the generation of annealed surrogate data can accomodate a variety of cost functions, needed to implement different constraints. In this version, the following modules are available.

#### Autocorrelation function

`randomize_``auto``_`cool`_`perm`-D# [-W#] [`general options`] [`cooling options`] [`permutation options`]` file

> `-D` number of lags for autocorrelation
> `-W` type of average: 0=max(c), 1=|c|/lag, 2=(c/lag)**2, 3=max(c)/lag (default 0)

The specified number of shortest lags of the autocorrelation function without periodic continuation is matched with the data. The cost is given by the maximum deviation in any lag, weighted by 1/lag.

#### Periodic autocorrelation function

`randomize_``autop``_`cool`_`perm`-D# [-W#] [`general options`] [`cooling options`] [`permutation options`]` file

> `-D` number of lags for autocorrelation
> `-W` type of average: 0=max(c), 1=|c|/lag, 2=(c/lag)**2, 3=max(c)/lag (default 0)

The specified number of shortest lags of the periodically continued autocorrelation function is matched with the data. The cost is given by the maximum deviation in any lag, weighted by 1/lag.

#### Generic constraints

`randomize_``generic``_`cool`_`perm`[`general options`] [`cooling options`] [`permutation options`]` file

The generic module is provided as the easiest starting point of individual extensions. Virtually anything can be specified as part of the cost function by editing the source and recompiling (recommended: rename the module). In the distribution, as an example the maximal deviation in either one of

      < x   x  >,  < x   x  >,
         n-1 n        n-2 n

         2                2        2
      < x   x  >,  < x   x  >,  < x   x  >,  < x   x   x >,
         n-1 n        n-1 n        n-2 n        n-2 n-1 n

         2   2            3        3
      < x   x  >,  < x   x  >,  < x   x  >
         n-1 n        n-1 n        n-1 n

is minimised. After thorough annealing, this can be used to make randomly shuffled Hénon attractors - whatever that is good for.

#### Spectrum of spike trains

`randomize_``spikespec``_`cool`_event [-F# -## -i] [`general options`] [`cooling options`] [`permutation options`]` file

> `-F` maximal frequency (2*l / total time)
> `-#` number of frequencies (F* total time /2)
> `-i` expect intervals rather than times

For an explanation of the inter-event spectrum see spikespec. S(f) is computed for `#` frequencies between 0 and `-F` (no binning). By default, a sequence of event times is expected. If the flag `-i` is set, the data is taken to be inter-event intervals.

#### Plans for future releases

I am working on

- crosscorrelations with a reference signal
- running mean/variance for nonstationary data
- Lomb periodogram for unevenly spaced data

Please tell me if you have implemented any other interesting constraints.

constrained randomization * Table of Contents * TISEAN home