Giter VIP home page Giter VIP logo

mcdts.jl's Introduction

Monte Carlo Decision Tree Search for optimal embedding

This project implements the MCDTS algorithm outlined in the paper "Optimal state space reconstruction via Monte Carlo Decision Tree Search", accepted for publication in Nonlinear Dynamics. It aims to provide an optimal time delay state space reconstruction from time series data with the help of decisions trees and suitable statistics that guide the decisions done during the rollout of these trees. For all details of the algorithm the reader is referred to the accompanying paper. Here we provide an implementation of all the variants described in the paper. All major functions have docstrings that describe their use. In what follows basic use examples are outlined.

Usage

This repository serves the purpose of reproducibility only. The proposed method will soon be part of the DynamicalSystems.jl framework which will also contain sufficient documentation of the functionality. In order to reproduce the data, which has been used in the paper you have to set back this repository to commit 842037 (MCDTS version 0.9.10). We are still further developing this repo in order to incorporate more functionality and preparing the code for a migration to DynamicalSystems.jl.

If you do not want to wait that long, we give an example of the basic usage (for that old version we mentioned). We embed a Lorenz63 system. This is meant as a toy example: we generate data from a Lorenz63 system and then try to reconstruct the full state space from only one of the three observables.

For this we also make use of DynamicalSystems.jl.

First we import the needed modules and generate a long trajectory of the Lorenz system (and discard any transient dynamics)

using DynamicalSystems, MCDTS, Random, Test, DelayEmbeddings

# Check Lorenz System
Random.seed!(1234)
ds = Systems.lorenz()
data = trajectory(ds,200)
data = data[10001:end,:]

The easiest way to use MCDTS for embedding is to use it with its default options just as

tree = mcdts_embedding(data, 100)

here with N=100 trials. This will perform the MCDTS algorithm and return the full decision tree. The best embedding can then just be printed as

best_node = MCDTS.best_embedding(tree)
println(best_node)

e.g.

Node with τ=12, i_t=1 ,L=-1.5795030971438209 - full embd. τ=[0, 61, 48, 12] ,i_ts=[1, 1, 1, 1]

This means we have a 4-dimensional embedding with delays [0, 61, 48, 12], which decreased the chosen cost/Loss-function (in this case the L-statistic) by a total amount of L=-1.5795030971438209. Further, customized embedding options covering an ensemble of different cost-functions can be looked up in the documentation.

mcdts.jl's People

Contributors

hkraemer avatar maximilian-gelbrecht avatar

Stargazers

 avatar

Watchers

 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.