SpectralEntropy

class eyefeatures.features.measures.SpectralEntropy(x=None, y=None, aoi=None, pk=None, return_df=True, ignore_errors=False)[source]

Bases: MeasureTransformer

Spectral Entropy.

Measures the complexity of the fixation trajectory in the frequency domain using Power Spectral Density (PSD). It treats the scanpath coordinates as a signal. High spectral entropy implies a more random/complex signal (white noise), while low entropy implies a more periodic/predictable signal.

Parameters:
  • 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.