TheDatumOrg/kshape-python

kshape

Closed this issue · 2 comments

some questions regarding your kshape code:

  1. can your code be applied to time series with different lengths?
  2. I need to extract shape prototype, but could not figure out what inputs are needed? Would you explain the parameters in _shape_extraction function?
Mic92 commented
  1. Yes. The time series must be of same length. You can try to interpolate values if you have missing intermediates.

# @idx the assignment of each timeserie to a specific cluster
# @x all timeseries
# @j index of the cluster that the shape is computed for
# @cur_center the current centroid on which the new centroid will be computed
def _extract_shape(idx, x, j, cur_center):
  pass

Interpolation for missing values or padding of zeros left/right of the time series to bring them in the same size (this is what FFT is doing either way internally).