Recurrence Functions

A recurrence function determines whether two states of a dynamical system, $\vec{x}$ and $\vec{y}$, are recurrent.

It is defined by an expression of the form

\[R(\vec{x}, \vec{y}) = \Theta(\varepsilon - |\vec{x} - \vec{y}|),\]

where $\Theta(\cdot)$ denotes the Heaviside step function and $\varepsilon$ is the threshold parameter defining the maximum distance between two states for them to be considered $\varepsilon$-recurrent.

This definition differs from the expression used to construct the full recurrence matrix, introduced in the section A brief review. While the recurrence matrix evaluates all pairwise recurrences in a time series, a recurrence function computes a single recurrence value between two states.

In RecurrenceMicrostatesAnalysis.jl, recurrence functions are implemented via the RecurrenceExpression abstraction. The actual recurrence evaluation is performed by implementing the recurrence function for the corresponding expression type.

RecurrenceMicrostatesAnalysis.recurrenceFunction
recurrence(expr::RecurrenceExpression, [x], [y], [...])

Define how the recurrence state between [x] and [y] is computed for a given RecurrenceExpression.

The additional arguments ([...]) depend on whether the recurrence is computed for time-series or spatial data.

Time-series recurrence

function recurrence(expr::RecurrenceExpression, x::StateSpaceSet, y::StateSpaceSet, ::Int, ::Int)

The two Int arguments correspond to the positions $(i, j)$ in the time series used to evaluate recurrence.

Spatial recurrence

function recurrence(expr::RecurrenceExpression, x::AbstractArray{<:Real}, y::AbstractArray{<:Real}, ::NTuple{N, Int}, ::NTuple{M, Int})

The two NTuple{N, Int} arguments correspond to the positions $(\vec i, \vec j)$ in the spatial data used to evaluate recurrence.

Info

To support GPU execution, recurrence expressions must implement gpu_recurrence instead of recurrence. The arguments are equivalent, with the addition of the phase-space dimension as an input parameter. See Standard for a reference implementation.

Output

The recurrence function must always return a UInt8: 0 for non-recurrence and 1 for recurrence.

source

Implemented recurrence functions

RecurrenceMicrostatesAnalysis.StandardType
Standard <: RecurrenceExpression

Recurrence expression defined by the standard threshold criterion:

\[R(\vec{x}, \vec{y}) = \Theta(\varepsilon - |\vec{x} - \vec{y}|),\]

where $\Theta(\cdot)$ denotes the Heaviside function and $\varepsilon$ is the distance threshold defining the maximum separation for two states to be considered recurrent.

The Standard struct stores the threshold parameter ε, as well as the distance metric used to evaluate $|\vec{x} - \vec{y}|$. The metric must be defined using the Distances.jl package.

Constructor

Standard(ε::Real; metric::Metric = Euclidean())

Examples

Standard(0.27)
Standard(0.27; metric = Cityblock())

The recurrence evaluation is performed via the recurrence function. For GPU execution, the corresponding implementation is provided by gpu_recurrence.

source
RecurrenceMicrostatesAnalysis.CorridorType
Corridor <: RecurrenceExpression

Recurrence expression defined by the corridor criterion introduced in (Iwanski and Bradley, 1998):

\[R(\vec{x}, \vec{y}) = \Theta(|\vec{x} - \vec{y}| - \varepsilon_{min}) \cdot \Theta(\varepsilon_{max} - |\vec{x} - \vec{y}|),\]

where $\Theta(\cdot)$ denotes the Heaviside function and $(\varepsilon_{min}, \varepsilon_{max})$ define the minimum and maximum distance thresholds for two states to be considered recurrent.

The Corridor struct stores the corridor thresholds ε_min and ε_max, as well as the distance metric used to evaluate $|\vec{x} - \vec{y}|$. The metric must be defined using the Distances.jl package.

Constructor

Corridor(ε_min::Real, ε_max::Real; metric::Metric = Euclidean())

Examples

Corridor(0.05, 0.27)
Corridor(0.05, 0.27; metric = Cityblock())

The recurrence evaluation is performed via the recurrence function. For GPU execution, the corresponding implementation is provided by gpu_recurrence.

source