PhaseEntropy

class eyefeatures.features.measures.PhaseEntropy(m=2, tau=1, x=None, y=None, aoi=None, pk=None, return_df=True, ignore_errors=False)[source]

Bases: MeasureTransformer

Phase Entropy.

Measures the complexity of the phase space trajectory. The scanpath (time series) is embedded into a multi-dimensional phase space using time-delay embedding. The entropy of the distribution of pairwise distances (or density) in this phase space is calculated. Higher values distinguish chaotic signals from periodic/predictable ones.

Parameters:
  • m (int) – embedding dimension (default: 2).

  • tau (int) – time delay for phase space reconstruction (default: 1).

  • x (str) – X coordinate column name.

  • y (str) – Y coordinate column name.

  • aoi (str) – Area Of Interest column name(-s).

  • pk (list[str]) – primary key.

  • 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 PhaseEntropy

transformer = PhaseEntropy(x=”x”, y=”y”) features = transformer.fit_transform(fixations_df)