HHTFeatures
- class eyefeatures.features.measures.HHTFeatures(max_imfs=-1, features=None, x=None, y=None, aoi=None, pk=None, return_df=True, ignore_errors=False)[source]
Bases:
MeasureTransformerHilbert-Huang Transform (HHT) Features.
Decomposes the signal (scanpath coordinates) into Intrinsic Mode Functions (IMFs) using Empirical Mode Decomposition (EMD), then extracts statistical features from these IMFs. HHT is well-suited for analyzing non-linear, non-stationary signals.
- Parameters:
max_imfs (int) – maximum number of intrinsic mode functions (IMFs) to extract. Set to -1 for automatic determination.
features (list[str]) – list of features to extract from each IMF. Available options are: ‘mean’, ‘std’, ‘var’, ‘median’, ‘max’, ‘min’, ‘skew’, ‘kurtosis’, ‘entropy’, ‘energy’, ‘dom_freq’.
x (str) – X coordinate column name.
y (str) – Y coordinate column name.
aoi (str) – Area Of Interest column name(-s).
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.
- Returns:
features extracted from each IMF of the HHT decomposition.
- get_feature_names_out(input_features=None)[source]
Returns the names of the features generated by this transformer.
- sample_entropy(imf_data, m=1, r=0.2)[source]
Calculates sample entropy of the intrinsic mode functions (IMFs).