Frequency spectrogram analysis of EEG data
train.py
is the engine. The model is configured there, the optimizer, loss, and data iterators are declared there, and tensorboard is set up there. Training and validation are done afterwards. The model is saved there every set number of epochs. This file should remain mostly static if you introduce new models - you can play around with the learning rate and such, but the process doesn't really need to be changed.myargs.py
determines some input arguments for training. It's pretty self-explanatory.- in
utils/
you will find data processing files (likespectrogram_generate.py
) that are required for certain models. If you need other data processing, you should write it in a script here and process the data to a location that you determine. Moreover,model.py
contains the training models architectures. Each model should be implemented as a class and will be imported totrain.py
. - data are located at the Google Drive:
MINT/Experiment Data/Machine Learning Data/data
. Simply download the entire folder to your project repository; it's already set up in the right format. In the folder you will seeraw
for the raw data from the EEG andtrain
for data that's already processed in the spectrogram form. You'll have to re-process the raw data if you do not want to use spectrograms. trained_models/
contains saved models.runs/
contains outputs from tensorboard.- the other stuff is miscellaneous.
- Training and test data is located in the Google Drive:
MINT/Experiment Data/Machine Learning Data/data/train
. - copy the
train
folder into the project repo and it should work from there. Everything is already set up in thetrain
folder.
Make sure tensorboard is installed.
While in project directory, start with
python -m tensorboard.main --logdir=runs
View data at
http://localhost:6006/