wannesm / dtaidistance

Time series distances: Dynamic Time Warping (fast DTW implementation in C)
Other
1.08k stars 184 forks source link

KMeans do not support ndim series. #179

Closed tongda closed 1 year ago

tongda commented 1 year ago

According to this line, it seems KMeans support ndim series. However, the initialization use 1-dim version of distance. As a result, calling model.fit will raise exception with n-dim series.

wannesm commented 1 year ago

The default initialization (kmeans++) did indeed not yet support ndim series. This is fixed in 32cebdb4ee9dfa9f1dd2be3b19b16114ba415455 and will be part of the next release. If you already want to use this functionality you can install directly from github using pip install --force-reinstall --no-binary dtaidistance git+https://github.com/wannesm/dtaidistance.git (assuming you have a C compiler installed if you want to use the fast version).

tongda commented 1 year ago

Thanks, that helps a lot.