Skip to main content
edited tags
Link
ttnphns
  • 58.8k
  • 53
  • 287
  • 512

Cosine similarity with vectors of different lengths (time series)

added 99 characters in body
Source Link
SoH
  • 43
  • 4

I have time series of different lengths with different patterns. I want to find the similarity between them in such a way that it is defined from 0 to 1 and the measure takes into account the length (of time). I decided to use cosine similarity as a metric (I also read about DTW, but I have different waveforms possible). However, I do not want to use resampling to bring the signals to the same length and I want the similarity to decrease with the difference in length. That is, the measure should describe the similarity of forms and the difference in time. Help if anyone came across this!

Example: enter image description here

In this example, it is important for me what in first signal the duration is 80 seconds, and in the second 200 seconds, and I want this to affect the similarity.

I have time series of different lengths with different patterns. I want to find the similarity between them in such a way that it is defined from 0 to 1 and the measure takes into account the length (of time). I decided to use cosine similarity as a metric (I also read about DTW, but I have different waveforms possible). However, I do not want to use resampling to bring the signals to the same length and I want the similarity to decrease with the difference in length. That is, the measure should describe the similarity of forms and the difference in time. Help if anyone came across this!

I have time series of different lengths with different patterns. I want to find the similarity between them in such a way that it is defined from 0 to 1 and the measure takes into account the length (of time). I decided to use cosine similarity as a metric (I also read about DTW, but I have different waveforms possible). However, I do not want to use resampling to bring the signals to the same length and I want the similarity to decrease with the difference in length. That is, the measure should describe the similarity of forms and the difference in time. Help if anyone came across this!

Example: enter image description here

In this example, it is important for me what in first signal the duration is 80 seconds, and in the second 200 seconds, and I want this to affect the similarity.

Source Link
SoH
  • 43
  • 4

Cosine similarity with vectors of different lengths

I have time series of different lengths with different patterns. I want to find the similarity between them in such a way that it is defined from 0 to 1 and the measure takes into account the length (of time). I decided to use cosine similarity as a metric (I also read about DTW, but I have different waveforms possible). However, I do not want to use resampling to bring the signals to the same length and I want the similarity to decrease with the difference in length. That is, the measure should describe the similarity of forms and the difference in time. Help if anyone came across this!