Combining Magnetoencephalography (MEG) and Machine Learning (ML) to explore the neural correlates of altered states of consciousness.
- Create a Python virtual environment and activate it
python3.9 -m venv .venv_neurococodelics source .venv_neurococodelics/bin/activate - Install project dependencies
pip install --upgrade pip pip install -r requirements.txt
All ML experiments are driven by YAML config files in the machine-learning/configs/ folder.
Copy an existing config and modify as needed (e.g. data paths, features, models).
Example config:
machine-learning/configs/toy_ml_config.yml
Use the run_ml.py script to launch your pipeline with a chosen config:
python machine-learning/run_ml.py \
--config machine-learning/configs/toy_ml_config.ymlThis will:
- Load your data (e.g.
local_data/ketamine.csv) - Select features & targets per the config
- Run analyses (feature selection, hyperparam search, etc.)
- Save results to
results/, including a global summary atresults/<experiment_id>.pkl
Inspect logs and outputs in the results/ directory once complete.