get_hilbert_curve_enc

eyefeatures.features.feature_maps.get_hilbert_curve_enc(data, x, y, scale=True, p=4)[source]

Map scanpath to values on Hilbert curve and encode to single feature vector.

Parameters:
  • data (DataFrame) – input Dataframe with fixations.

  • x (str) – X coordinate column name.

  • y (str) – Y coordinate column name.

  • scale (bool) – whether to scale the scanpath to [0, 1] before mapping to Hilbert curve. If false, then

  • p (int) – order of Hilbert curve, unit square is divided into (2^p)x(2^p) smaller squares. Higher value of p indicates better locality preservation.

Returns:

scanpath encoding in 2^p-dimensional feature space using 1D Hilbert curve.

Return type:

ndarray

Check for get_hilbert_curve method. It is the same method except that resulting values are encoded as a feature vector (boolean encoding), where each binary value represents presence of fixations in the corresponding block.

Reference

Hilbert Curve on Wiki.

Hilbert Curve encoding algorithm.