Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

NeuroScience Lab POS Classification for MEG Data

Table of Contents

  1. Create the Environment
  2. Activate the Environment
  3. Train the Network
  4. Steps to Train the Network
  5. Training Results
  6. Optional

Create the Environment

  • Change Directory
    cd neuroscience_lab_meg
  • On Unix/Linux
    conda env create -f environment_ubuntu.yml
  • On Mac
    conda env create -f environment_mac.yml

Activate the Environment

Activate the environment using:

conda activate neuroscience_lab

Train the Network

  • To train a Fully Connected Network, use the file:
    fully_connected_single_subject_classifier.py
  • To train a 1D Convolution Network, use the file:
    conv1d_single_subject_classifier.py

Steps to Train the Network

  1. Change to the code Directory

    cd code
  2. Edit the Training File Edit either fully_connected_single_subject_classifier.py or conv1d_single_subject_classifier.py, depending on the network choice.

  3. Specify the Location of basedir

    • basedir is the directory where training statistics and results (e.g., TensorBoard logs, figures, and final results) will be saved.
    • Important: Ensure basedir is empty before starting the training process.
  4. Specify the Location of data_directory

    • data_directory is the directory where MEG data (*.fif files) are stored.
  5. Run the Training Script

    • Replace your_network_filename.py with the appropriate file name (e.g., fully_connected_single_subject_classifier.py or conv1d_single_subject_classifier.py):
      python your_network_filename.py
    • To store logs during the training process:
      python your_network_filename.py > training_stdout.txt

Training Results

  • Subject-wise training statistics and results will be stored in the basedir location.

Optional

To extract and save only the desired channels from MNE files (to save time during training):

python save_selected_channels.py --input_directory /path/to/input --output_directory /path/to/output --channels "A196,A197"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages