ShannonEntropy

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

Bases: MeasureTransformer

Shannon Entropy.

Measures the uncertainty or randomness of the gaze distribution over Areas of Interest (AOIs). Higher entropy indicates a more uniform distribution of fixations across AOIs (scanning), while lower entropy indicates concentration on specific AOIs.

Parameters:
  • aoi (str) – Area Of Interest column name.

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