Crate temporal_attractor_studio

Crate temporal_attractor_studio 

Source
Expand description

Temporal Attractor Studio - Real FTLE and Lyapunov exponent calculation

This crate provides a complete implementation for calculating Finite-Time Lyapunov Exponents (FTLE) and estimating the largest Lyapunov exponent from trajectory data or time series using:

  • Delay embedding for univariate time series
  • Theiler window exclusion to avoid temporal neighbors
  • VP-tree for efficient nearest-neighbor search
  • Parallel slope calculation over early divergences

Examples:

use temporal_attractor_studio::prelude::*;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // For multivariate state data
    let trajectory = vec![
        vec![1.0, 2.0, 3.0],
        vec![1.1, 2.1, 3.1],
        vec![1.2, 2.2, 3.2],
        vec![1.3, 2.3, 3.3],
        vec![1.4, 2.4, 3.4],
    ];

    let result = estimate_lyapunov(&trajectory, 0.01, 12, 20, 4000, 1e-12)?;
    println!("Lyapunov exponent: {:.6}", result.lambda);
    println!("Doubling time: {:.3} time units", result.doubling_time);

    // For univariate time series with delay embedding
    let series = vec![1.0, 2.1, 1.9, 3.2, 2.8, 4.1, 3.7, 5.2];
    let embedded = delay_embed(&series, 3, 1)?;
    let result = estimate_lyapunov_default(&embedded)?;
    println!("Embedded series Lyapunov exponent: {:.6}", result.lambda);

    Ok(())
}

Re-exports§

pub use ftle::*;

Modules§

attractor
Attractor engine for temporal dynamics
echo_state
Echo-state network module for temporal prediction
ftle
Core FTLE module implementing real algorithms from lyapfit research FTLE and Lyapunov exponent calculator via nearest-neighbor divergence.
prelude
Prelude module for easy imports
time_expansion_bridge
Time expansion bridge for consciousness integration

Enums§

TemporalStudioError
Central error type for Temporal Attractor Studio

Functions§

init
Initialize the framework with logging

Type Aliases§

StudioResult
Result type for the studio