skshapes.convolutions.squared_distances.squared_distances

skshapes.convolutions.squared_distances.squared_distances(*, points, window=None, cutoff=None, geodesic=False, kernel=None, target_points=None)

Matrix of squared distances between points.

If source_points is not None, then the (N, M) matrix of squared distances between points (in rows) and source_points (in columns) is returned.

Else, the (N, N) matrix of squared distances between points is returned.

Parameters:
  • points – The points in the target space.

  • window (Literal[None, 'ball', 'knn', 'spectral']) – The type of window to use.

  • cutoff (int | float | None) – The cutoff value for the window.

  • geodesic (bool) – Whether to use geodesic distances.

  • kernel (Callable | None) – The kernel to use.

  • target_points – The points in the source space. If None, then the points in the target space are used.