I have a signal with14 events

enter image description here

of 2 types:

  • type 1: the 4th and the 10th peak
  • type 2: the rest of the peaks

I would like a function in which the input is the number of events of each type and the output should be the timing and the type of each event.

Does anyone knows any function that performs this (maybe some machine learning algorith). I use R, but I can also use python.

I have signals with events of different shapes (the plot is just one example). I would like to have a function that works independently of the shape of the events so I do not need to provide information about the specific shapes that I have for a given signal.

  • $\begingroup$ This looks like you could even write this down in English as "an event is a positive jump, where the next sample is more than 3 larger than the previous one; it's a type 1 if the sample after..." and just write this down as python. Where's your specific problem in implementing that? $\endgroup$ Feb 14, 2020 at 16:25
  • $\begingroup$ I would like a function that works independently of the shape of the events (edited the question to make this clear). $\endgroup$ Feb 14, 2020 at 16:35
  • $\begingroup$ aha. Have you heard of correlation? That's probably a term worth understanding here. $\endgroup$ Feb 14, 2020 at 16:36
  • 1
    $\begingroup$ This post may help you? dsp.stackexchange.com/questions/62956/… $\endgroup$ Feb 14, 2020 at 20:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.