Skip to content

Brain-XAI-Lab/EEG-LLM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fine-tuned LLM for Electroencephalography(EEG) data classification

This is LLM Fine tuning model that classifies four movements (left arm, right arm, tongue, foot) from EEG.

  • LLM performs its own classification operations based on EEG data.
  • We trained gpt-4o model utilizing fine-tuning for better performance.
figure1

Requirements

Python>=3.8, openai>=1.30.2, mne>=1.6.1
You can install all libraries entering the code:

!pip install -r requirements.txt

Data

Data description : https://www.bbci.de/competition/iii/desc_IIIa.pdf

  • cued motor imagery (multi-class) with 4 classes (left hand, right hand, foot, tongue) three subjects (ranging from quite good to fair performance)
  • EEG, 60 channels, 60 trials per class
  • performance measure: kappa-coefficient

Download : BBCI Competition III (https://www.bbci.de/competition/iii/download/index.html?agree=yes&submit=Submit)


Features

For feature selection and extraction, Fisher Ratio is utilized.

fr_label1 fr_label2 fr_label3 fr_label4

Evaluation

To compare fine-tuned LLM classifier's performance with traditional ML models, we additionally trained SVM, RF and MLP in the same data and same preprocessing method.

Performance metrics:

  • Accuracy
  • F1 score
  • ROC-AUC

(Metrics plot will be here)

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages