TransWikia.com

1D convolution for uni-variate data

Data Science Asked on January 9, 2021

Every one. I have EEG dataset with 80 subjects, 3072 data points and 100 trials. This a univariate data, it mean there is only one channel. I am confused how to feed this data to convolution neural network.
Most of blog and tutorial deals with multivariate data. But i have univariate and i am clueless how to move ahead

2 Answers

I believe that the following image (original link) will be helpful to understand. 1D convolutions work exactly the same way as 2D convolutions, the main difference is how the filter/mask is applied. 1D convolution is intuitively like a sliding window of a certain width.

Many packages like Keras or PyTorch have native 1D convolution function/modules, so I would recommend checking their documentation and perhaps source code for deeper understanding.

https://blog.goodaudience.com/introduction-to-1d-convolutional-neural-networks-in-keras-for-time-sequences-3a7ff801a2cf

Answered by Valentin Calomme on January 9, 2021

Is it possible that you are having problems with specifying the "input_shape" parameter in the first layer properly? Number of channels only take part there so that's probably the issue.

Check this notebook for a 1 dimensional CNN example for univariate data.

Edit: Ok, it is actually a mixed NN with first layer a CNN. But still it should help with the input layer. Let me know if that helps. There must be a CNN somewhere in that folder.

Answered by serali on January 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP