I have a numpy array of shape N_Samples x 360, as an example, consider the following:

 [ 89 94 56 - - - 55] <-360 length vector
 [ 56 98 55 - - - 98]
 |                  |
 |                  |
 [ 67 55 99 - - - 77] Total N such vectors

There is one label 0 or 1 corresponding to each of the 360- length vector I am asked to train this using CNN but everywhere I am observing that CNN is used for image classification. I am confused about the following:

  1. Is CNN appropriate for such data?
  2. If yes, then how concepts like max pooling and strides are applicable?
  3. Should we use Conv1D instead of Conv2D?

I will also appreciate if some helpful papers or blogs are provided with respect to this context on how to adjust shapes of input and weight.

Edit: The 360-length vector is showing ECG signal values of one heartbeat. Keeping R-peak in the middle, I have 180 signal values after and 180 before the R-Peak to have 360 long chunks represent heartbeats (Sampling Rate: 360). I am using it to classify each heartbeat as arrhythmic or non-arrhythmic.

  • $\begingroup$ True, CNN is better than generic NN by exploiting the nature of data being image-like. Do you really not have any extra information of what your 360-length vector is supposed to represent? $\endgroup$ Oct 4 '17 at 14:40
  • $\begingroup$ It depends on the nature of your data. Read about CNNs - CNNs are appropriate where you think there are some spatial similarity. I suggest doing more research about the topic -- it will help you answer your own question. We can't answer the question in its current form because you haven't told us anything about where the data is coming from or what it means. $\endgroup$
    – D.W.
    Oct 4 '17 at 21:40
  • $\begingroup$ @Billiska I edited the post, it represents ECG signal values of one heartbeat $\endgroup$
    – Urja Pawar
    Oct 5 '17 at 14:56
  • $\begingroup$ Images are also arrays of numbers. I see no reason why it shouldn't work. $\endgroup$
    – adrianN
    Oct 5 '17 at 15:45

Yes, you can use a CNN. CNN's are not limited to just images. Use a 1D convolution, not a 2D convolution; you have 1D data, so a 1D convolution is more appropriate. A CNN is a reasonable thing to try, but the only way to find out if it actually works or not is to try it on some real data and evaluate its effectiveness.

You can also try simpler methods, like a fully connected network, or even logistic regression.


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.