Measures

The measures submodule provides methods to infer some characteristics from scanpaths, treating them as either 2D, 3D, or 4D timeseries.

Base Measure Transformer

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

Bases: ABC, BaseTransformer

Base Transformer class for measures.

Parameters:
  • x (str) – X coordinate column name.

  • y (str) – Y coordinate column name.

  • aoi (str) – Area Of Interest column name(-s). If provided, features can be calculated inside the specified AOI.

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

  • return_df (bool) – whether to return output as DataFrame or numpy array.

  • feature_name (str) – Column name for resulting feature.

  • ignore_errors (bool) – If True, return NaN values when feature computation fails instead of raising an error. Default is False.

get_feature_names_out(input_features=None)[source]

Returns the names of the features generated by this transformer.

Return type:

list[str]

Measure Transformers

Common measures

Entropy-based