Git Product home page Git Product logo

fraserswinney's Introduction

Fraser-Swinney lag estimate

This is a Mex wrapper for the original script minfo.c written by Eric Weeks (see references). The script estimates the mutual-information between an input time-series and its lagged versions for several lags. This is typically used to select the optimal lag for phase-space reconstruction. The method is published in:

Independent coordinates for strange attractors from mutual information
A. Fraser, H. Swinney, PRA 1986 (doi: 10.1103/PhysRevA.33.1134)

Compiling

Simply run

    mex -largeArrayDims -O -lut milag.cpp

from the command-line in Matlab. Note the linking to -lut for keyboard-interruption support.

Usage

The script takes one to three arguments:

  • X -- an Ntimes x Nchannels matrix of time-series in each column
  • lag_max (optional) -- the maximum lag to consider (see DEFAULT_LAG_MAX)
  • nbins (optional) -- number of bins

The computation can be interrupted from the Matlab command-line using Ctrl+C.

Notes

It is actually unclear to me how nbins affects the results, and I cannot see how this corresponds to the number of bins (which assumes that mutual information is estimated from a histogram, which is really not immediate from the code). I would advise not to use this input.

The original author (Eric Weeks) released his code in the public domain, but Dmytro Lituiev copyrighted his version despite a minimal contribution. I'm releasing this in the public domain, please don't hesitate to drop me a line for copyright concerns.

Output

Returns a (lag_max+1) x Nchannels matrix with the MI estimates for each lag and channel.

References

  1. Andrew M. Fraser and Harry L. Swinney. "Independent coordinates for strange attractors from mutual information", Phys. Rev. A 33 (1986) 1134-1140.
  2. Eric Weeks' page with the description of the modified algorithm

Contributors

  • Jonathan Hadida (2016), University of Oxford
  • Dmytro S. Lituiev (2013), University of Zurich
  • Eric Weeks C script (1997)

fraserswinney's People

Contributors

dslituiev avatar jhadida avatar sheljohn avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.