Can 3D data be fed into a ML model?

Hi dataquest learners!

I am working on my thesis which involves applying Machine Learning on EEG (electroencephlography) data. My data is 3D (electrodes x times x trials). When I tried to put it into classification learner app in matlab, it didn’t work. I didn’t even want to start writing scripts in python before I can clarify this. So far on dataquest, I only worked with 2D data.

So, is it even possible to feed 3D data into ML models?

Let me assume when you say ML you don’t mean DL but using sklearn, because there is no limit to the number of Dimension in DL (they usually just flatten to single dimension either from the get-go for vanilla feedfoward neural network or flatten in the middle for Convolutional neural network).

In my knowledge, the entire sklearn api can only handle 2D information for any .fit or .predict or .transform.
If you want to stick to ML on sklearn, maybe you have to condense on 1 dimension (electrodes and trials look non-continuous so i would break up either one) and do it repeatedly on the other 2D.

Alternatively, you encode the 3rd dimension into 2D by making composing columns like electrode1_trial1, electrode1_trail2… electrode2_trial1. This makes untangling difficult later though.

I’m interested in EEG too. Would you share where i can find some open data sources?

Hi Hanqi! Thanks for your response. I could try out DL or encode the 3rd dim as you described, and see what happens.

However, I do not quite understand what you mean by condensing on 1 dimension and do repeatedly on the other 2D?

Here is a list of datasets from github. I have another one from some neuroscience societies, I 'll provide a link to it when I find it. My dataset is so far not open source, unfortunately.

Thanks for the link.
I mean’t to build a different model based on a new set of 2D data for every unique category of the 3rd dimension

I get it, thanks! Here is another database with neuroscientific data:

1 Like