SampleEntropy

class eyefeatures.features.measures.SampleEntropy(m=2, r=0.2, x=None, y=None, aoi=None, pk=None, return_df=True, ignore_errors=False)[source]

Bases: MeasureTransformer

Sample Entropy.

Measures the complexity or irregularity of the scanpath. It is defined as the negative natural logarithm of the conditional probability that two sequences similar for m points remain similar at the next point, excluding self-matches. Lower values indicate more self-similarity (regularity), higher values indicate more complexity/randomness.

Parameters:
  • m (int) – embedding dimension (length of sequences to compare).

  • r (float) – tolerance threshold for matches acceptance (usually 0.2 * std).

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