I have multiple experiments and each of them produce several ($k$ for example) binary signals; some artificial example next:binary signal

I have a metric to compare experiment results but I need vectors of equal size to do it.

The problem is that signal length can differ from one experiment to another so I need to reduce the signal dimension somehow.

What I tried/ideas:

  1. Calculate area under each signal. Result is vector of dimension $k$. The problem is that this method cannot differentiate signals with the same area.
  2. Split signal on $m$ bins and calculate an area in each bin. Result is a vector of dimension $k \times m$.
    1. Take Fourier series coefficients. Result is vector of dimension $(a+b)\times k$. The problem is that the spectrum is too large and Fourier cannot work nice (am I correct?)
    2. Some wavelet transforms (like Haar for example). But I don't understand how to do it correctly.

I will be grateful for advices or any method that can help me.

  • $\begingroup$ Can you discrete the metric you already have? It can tell a lot about how you assess the similarity of signals. Shift, scale or factor invariance can be very important here $\endgroup$ Aug 2 '17 at 15:00
  • $\begingroup$ "Can you discrete the metric you already have?", - it is specific biophysics metric and a bit complex :) In our previous model signals had equal sized and there were no problem but now signals can have different lengths. $\endgroup$
    – Vladislav
    Aug 4 '17 at 13:14
  • $\begingroup$ Sorry for the "discrete" in place of a "describe. I believe that even if complex, its description would be useful to slide from equal to unequal length $\endgroup$ Aug 8 '17 at 13:27

It seems your needs matches the Dynamic Time Warping algorithm.
You should try it as a metric to compare them.

The idea of changing the size is trickier as you may loose / change data which is important for your comparison.

Maybe what you should do is alter the "Distance" metric in the Dynamic Time Warping algorithm to something which suits your needs.

  • $\begingroup$ As I understand DTW allow to compute similarity between signals but cant shrink the size of signal. Am i correct? $\endgroup$
    – Vladislav
    Aug 4 '17 at 13:15
  • 1
    $\begingroup$ You wanted a Metric to compare signals. So instead of shrinking one, you can use DTW to compare them even if they have different lengths. $\endgroup$
    – Royi
    Aug 4 '17 at 13:57
  • $\begingroup$ @Vladislav, Could you please mark my answer? $\endgroup$
    – Royi
    Sep 26 '21 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.