dtaidistance.ed

Euclidean Distance (ED)

author:

Wannes Meert

copyright:

Copyright 2020-2024 KU Leuven, DTAI Research Group.

license:

Apache License, Version 2.0, see LICENSE for details.

dtaidistance.ed.distance(s1, s2, inner_dist='squared euclidean', use_ndim=False)

Euclidean distance between two sequences. Supports different lengths.

If the two series differ in length, compare the last element of the shortest series to the remaining elements in the longer series. This is compatible with Euclidean distance being used as an upper bound for DTW.

Parameters:
  • s1 – Sequence of numbers

  • s2 – Sequence of numbers

  • inner_dist – Inner distance function between two values

  • use_ndim – Use n-dimensional methods

Returns:

Euclidean distance