calculate_topological_features

eyefeatures.features.feature_maps.calculate_topological_features(scanpath, time_series, max_radius=1.0, max_time=1.0, max_dim=2, time_steps=100)[source]
Calculate topological features (persistence curve

and persistence entropy) for a scanpath.

Parameters:
  • scanpath (ndarray) – scanpath data array of shape (n, 2).

  • time_series (ndarray) – 1d array of time series data (e.g. x or y coordinates over time).

  • max_radius (float) – maximum radius for Vietoris-Rips filtration.

  • max_time (float) – maximum threshold for the persistence curve.

  • max_dim (int) – maximum dimension for persistent homology.

  • time_steps (int) – number of time steps for evaluating the persistence curve and entropy.

Returns:

values of persistence curve at each time step, values of persistence entropy at each time step.