OverlapClustering

class eyefeatures.preprocessing.aoi_extraction.OverlapClustering(x=None, y=None, diameters=None, centers=None, pk=None, aoi_name=None, eps=0.0)[source]

Bases: BaseAOIPreprocessor

Defines the AOI for each fixation using the overlapping clustering algorithm.

Parameters:
  • x (str) – X coordinate of fixation.

  • y (str) – Y coordinate of fixation.

  • diameters (str) – diameters of fixation.

  • centers (str) – centers of fixation.

  • pk (list[str]) – list of column names used to split pd.DataFrame.

  • aoi_name (str) – name of AOI column.

  • eps (float) – additional length to sum of radius

Algorithm

For overlap clustering, you should provide diameters and centers of the fixations.

  1. Build the clusters. Each fixation is the particular cluster.

  2. Find fixations, which are located inside other fixations, we consider this like one cluster.

  3. Start to merge the clusters.

  4. Find the cluster with the highest number of fixations in it (let it be the cluster <b>A</b>).

  5. Find all clusters that intersect with <b>A</b> and merge them to <b>A</b>.

  6. Repeat 4-5 until there are no clusters left.