Jorvz / Microstates.jl

Other
1 stars 0 forks source link

Microstates

Build Status

Description

Microstates.jl is a package designed to calculate the probabilities associated with microstates from a Recurrence Plot. Based on these probabilities, it can also estimate the entropy of the microstates for a given time series. These methods are useful in the context of dynamical systems, dealing with chaotic, stochastic, or periodic time series.

Installation

To install the package, you can clone the repository and use Pkg to add the package locally:

using Pkg
Pkg.add(url="https://github.com/Jorvz/Microstates.jl")

or you can directly type:

using Pkg
Pkg.add(Microstates)

Exemple of Usage

Calculating the microstate probabilities and the microstate entropy of a given time series is straightforward:

# One-dimensional time series
serie_1d = rand(100)
threshold = 0.5
microstates, entropy = MS(serie_1d, threshold)

# Multidimensional time series varying microstate size
serie_3d = rand(100, 3)
threshold = 0.5
microstates, entropy = MS(serie_3d, threshold, Stats_Block=3)

One can also easily calculate the maximum microstate entropy as well as the threshold that maximizes it by using:

# One-dimensional time series
serie_1d = rand(100)
threshold_range = (0.1, 0.5, 10)
S_max, best_eps = MaxS(serie_1d, threshold_range)

# Multidimensional time series
serie_3d = rand(100, 3)
threshold_range = (0.01, 0.70, 20)
S_max, best_eps = MaxS(serie_3d, threshold_range)

References