LyapunovExponent
- class eyefeatures.features.measures.LyapunovExponent(m=2, tau=1, T=1, x=None, y=None, aoi=None, pk=None, return_df=True, ignore_errors=False)[source]
Bases:
MeasureTransformerLyapunov Exponent.
Estimates the largest Lyapunov exponent, which characterizes the rate of separation of infinitesimally close trajectories in phase space. A positive Lyapunov exponent indicates chaos (sensitive dependence on initial conditions). Calculated using the Rosenstein algorithm (tracking divergence of nearest neighbors).
- Parameters:
m (int) – embedding dimension (default: 2).
tau (int) – time delay for phase space reconstruction (default: 1).
T (int) – time steps to average the divergence over (default: 1).
x (str) – X coordinate column name.
y (str) – Y coordinate column name.
aoi (str) – Area Of Interest column name(-s).
return_df (bool) – whether to return output as DataFrame or numpy array.
ignore_errors (bool) – If True, return NaN when feature computation fails; otherwise raise.
Example
from eyefeatures.features.measures import LyapunovExponent
transformer = LyapunovExponent(x=”x”, y=”y”) features = transformer.fit_transform(fixations_df)