Skip to content

ParsaSeyedpour/brain-decoding-ica-pca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 

Repository files navigation

brain-decoding-ica-pca

๐Ÿง  Brain Decoding with ICA vs PCA

This project compares Independent Component Analysis (ICA) and Principal Component Analysis (PCA) for decoding cognitive states from fMRI data using the Haxby dataset. We extract brain activation patterns, classify them with SVMs, and visualize the components as brain maps.


๐Ÿ“š Project Highlights

  • ๐ŸŽฏ Goal: Classify cognitive states (e.g., face, house, cat, etc.) from brain activity
  • ๐Ÿง  Data: Haxby fMRI Dataset
  • ๐Ÿงฎ Techniques: PCA, ICA, SVM
  • ๐Ÿ”ฌ Tools: Nilearn, Scikit-learn, Matplotlib, Seaborn
  • ๐Ÿงพ Outputs:
    • Classification accuracy
    • Brain component visualizations
    • Confusion matrices for ICA vs PCA

๐Ÿงช Methodology

  1. Preprocessing: Extract time-series data from fMRI volumes using a ventral temporal mask
  2. Feature Extraction:
    • PCA: Reduce to 100 principal components
    • ICA: Extract 100 independent components
  3. Classification:
    • Linear SVM to predict stimulus categories
    • Evaluate and compare performance
  4. Visualization:
    • Confusion matrix for both methods
    • Brain maps of top components (via nilearn.plotting)

๐Ÿ“Š Results Snapshot

  • PCA Accuracy: ~๐Ÿ’ฏ%
  • ICA Accuracy: ~๐Ÿ’ฏ%
  • Component maps show distinct spatial patterns per method

ICA tends to find more interpretable components, while PCA excels at capturing variance.


๐Ÿงฐ Requirements

pip install nilearn nibabel scikit-learn matplotlib seaborn

Releases

No releases published

Contributors