0
$\begingroup$

I am very new signal processing and I am asking this with the expectation that someone gives me a concrete guideline on how to approach my problem.

The problem I need to solve is that I have 2 signals (shown in green and yellow) which look like this as below in original scales enter image description here

and log scale

enter image description here

Based on the interaction (e.g. cutting each other) of these 2 signals, few features are calculated like i.e. range where both signals are low, the range where signals are up and only a threshold difference in amplitude value but now I need some kind of Machine learning may be RNN or LSTM or 1D CNN. I have a set of pre-calculated values and corresponding signals. Now I am wondering how to apply machine learning techniques while looking at both these signals together.

$\endgroup$
  • $\begingroup$ The question isn't clear to me. You want to build a "machine learning" box, the input is the green or yellow signal and what is the output? What are the purple and pink lines in the plots? $\endgroup$ – Engineer Feb 13 at 14:53
  • $\begingroup$ Just ignore purple and pink plots. input: 2 input signals, output: maybe another 1 signal with step 4 discrete values as 0,1,2,3. $\endgroup$ – Roshan Mehta Feb 13 at 15:16
  • $\begingroup$ So you input the green and yellow signals and want to output "maybe another 1 signal"? I really don't understand what you're trying to do. What do the signals mean? Give some context so people understand what you're doing $\endgroup$ – Engineer Feb 13 at 15:28
  • $\begingroup$ e.g input: time-based 2 sensors values say for 1 AM-2 AM hour from a user, output: the range of times e.g where the user was doing activity 1, activity 2, activity X on 1:10-1:15, 1:15-1:30, 1:30-2:00 with a confidence value. $\endgroup$ – Roshan Mehta Feb 13 at 16:10
  • $\begingroup$ Do you have a lot of labeled data? $\endgroup$ – Engineer Feb 13 at 16:14
1
$\begingroup$

You say you're "a beginner" so I will suggest using Keras (https://keras.io/). It is written in Python and runs on top of Tensorflow which is a neural network toolbox written by Google. Keras allows you to build a network layer-by-layer in an easy way. For example, here is an example of building a 1D CNN (https://keras.io/examples/imdb_cnn/), please note that the example contains many things that you do not need or are optional. My advice, start with a simple network and know how to identify its problems and how to fix them.

A while back, I worked on a similar problem involving inputting two time domain signals and classifying it (input: [# samples]-by-2, output: probabilities corresponding to each class). Now you will input the two time domain signals and you need to think carefully about how your output is formatted because sometimes you might have one activity, other times you might have five activities, or sometimes you might have no activity.

For example, say you input two signals ($x_1[n], x_2[n]$) of length 1024 and say you had activity #1 during samples 0-255, activity #2 from 256-511, and all other time is activity #0. Then you could format your output to be a signal of length 1024 (equal to length of input signals), to be: $y[n]= \begin{cases} 1, & 0 \leq n \leq 255 \\ 2, & 256 \leq n \leq 511 \\ 0, & n \geq 512 \end{cases} $. I bet this requires a bit of preprocessing of your dataset but this is not uncommon at all when doing these sorts of things.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Why not RNN but 1D CNN ? $\endgroup$ – Roshan Mehta Feb 13 at 20:33
  • $\begingroup$ RNN can be helpful in cases where you have data that has some patterns. If you were doing something with text analysis, certain words commonly follow others so that would be a place to try RNN $\endgroup$ – Engineer Feb 13 at 20:51
  • $\begingroup$ I did what you said for preprocessing but now I am stuck how to make such CNN network which outputs another signal and takes 2 signals. A very basic example would be great. $\endgroup$ – Roshan Mehta Feb 14 at 23:51

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.