Statistical Features
The stats submodule provides statistical analysis of eye movement components.
Base Feature Transformer
- class eyefeatures.features.stats.StatsTransformer(features_stats, x=None, y=None, t=None, duration=None, dispersion=None, aoi=None, calc_without_aoi=False, pk=None, return_df=True, warn=True)[source]
Bases:
BaseTransformerBase class for statistical features. Aggregate function strings must be compatible with pandas. Expected dataframe with fixations.
- Parameters:
features_stats (dict[str, list[str]]) – Dictionary of format {‘feature_1’: [‘statistic_1’, ‘statistic_2’], …}.
x (str) – X coordinate column name.
y (str) – Y coordinate column name.
t (str) – timestamp column name.
duration (str) – duration column name (milliseconds expected).
dispersion (str) – fixation dispersion column name.
aoi (str | list[str]) – Area Of Interest column name(-s). If provided, features can be calculated inside the specified AOI.
calc_without_aoi (bool) – if True, then, in addition to AOI-wise features, calculate regular features ignoring AOI.
return_df (bool) – whether to return output as DataFrame or numpy array.
warn (bool) – whether to enable warnings.