Skip to content

Repository files navigation

Machine Learning Project

🧠 Early Detection of Autism Spectrum Disorder Using Machine Learning

An interpretable Machine Learning framework for early detection of Autism Spectrum Disorder (ASD) using structural T1-weighted MRI scans from the ABIDE II dataset.


📌 Overview

Autism Spectrum Disorder (ASD) is a neurodevelopmental disorder characterized by difficulties in social communication, repetitive behaviors, and restricted interests. Early diagnosis is essential for timely intervention, yet current clinical diagnosis primarily depends on behavioral assessments.

This project presents an interpretable Machine Learning pipeline that analyzes structural MRI (T1-weighted) brain scans to classify individuals as ASD or Neurotypical. Instead of relying on deep learning, the project focuses on conventional machine learning models combined with explainable AI to identify anatomically significant brain regions contributing to the diagnosis.


🎯 Objectives

  • Detect Autism Spectrum Disorder using structural MRI images.
  • Extract meaningful anatomical features from brain MRI scans.
  • Compare Random Forest and XGBoost classifiers.
  • Improve interpretability using SHAP feature importance.
  • Identify brain regions that contribute significantly to ASD prediction.

🏥 Dataset

Dataset: ABIDE II (Autism Brain Imaging Data Exchange II)

Data Used

  • Structural MRI (T1-weighted)
  • NIfTI (.nii/.nii.gz) brain scans
  • Phenotypic metadata (DX_GROUP)

Classification Labels

Label Description
0 Neurotypical Control
1 Autism Spectrum Disorder

⚙️ Project Workflow

ABIDE II Dataset
        │
        ▼
Load MRI (.nii)
        │
        ▼
Skull Stripping
        │
        ▼
Brain Mask Generation
        │
        ▼
Morphological Operations
        │
        ▼
Gaussian Smoothing
        │
        ▼
Atlas-Based Brain Parcellation (AAL)
        │
        ▼
ROI Feature Extraction
        │
        ▼
Feature Scaling
        │
        ▼
SHAP Feature Selection
        │
        ▼
Machine Learning Models
        │
 ┌───────────────┐
 │ Random Forest │
 └───────────────┘
        │
 ┌───────────────┐
 │   XGBoost     │
 └───────────────┘
        │
        ▼
Performance Evaluation
        │
        ▼
Brain Region Importance Visualization

🧠 MRI Preprocessing

The preprocessing pipeline consists of:

  • MRI Loading using Nilearn
  • Brain Mask Extraction
  • Skull Stripping
  • Binary Opening
  • Binary Closing
  • Gaussian Smoothing
  • Noise Removal
  • Normalization

🗂 Feature Extraction

Brain regions are extracted using the Automated Anatomical Labeling (AAL) Atlas.

Total Regions

116 Anatomical Brain Regions

For every subject:

  • Mean intensity is computed for each ROI.
  • Features are stored as a 116-dimensional feature vector.
  • Diagnostic labels are matched using the phenotypic metadata.

📈 Feature Selection

Explainable AI is incorporated using SHAP (SHapley Additive Explanations).

SHAP identifies the most influential anatomical regions contributing to ASD classification.

Some important brain regions include:

  • Thalamus (Left)
  • Heschl Gyrus (Left)
  • Frontal Inferior Operculum (Right)
  • Cerebellum Crus II (Left)

🤖 Machine Learning Models

Random Forest

  • 100 Decision Trees
  • Random State for reproducibility
  • 80:20 Train-Test Split
  • 5-Fold Cross Validation

XGBoost

  • Learning Rate = 0.1
  • 100 Estimators
  • Maximum Depth = 4
  • Stratified Train-Test Split

📊 Evaluation Metrics

The models were evaluated using:

  • Accuracy
  • Precision
  • Recall
  • F1 Score
  • Confusion Matrix

📈 Results

Random Forest

Metric Score
Accuracy 66.84%
Precision 65.31%
Recall 69.57%
F1 Score 66.9%

XGBoost

Metric Score
Accuracy 60.43%
Precision 63.44%
Recall 59.60%
F1 Score 61.46%

📊 Performance Comparison

Model Accuracy Precision Recall F1 Score
Random Forest 66.84% 65.31% 69.57% 66.9%
XGBoost 60.43% 63.44% 59.60% 61.46%

✅ Random Forest outperformed XGBoost across all evaluation metrics.


🛠 Technologies Used

Programming Language

  • Python

Libraries

  • NumPy
  • Pandas
  • Scikit-Learn
  • XGBoost
  • SHAP
  • Nilearn
  • NiBabel
  • SciPy
  • Matplotlib
  • Seaborn

Neuroimaging Tools

  • Nilearn
  • NIfTI
  • AAL Atlas

📂 Repository Structure

├── dataset/
│
├── preprocessing/
│
├── skull_stripping/
│
├── feature_extraction/
│
├── feature_selection/
│
├── models/
│     ├── random_forest.py
│     ├── xgboost.py
│
├── results/
│     ├── confusion_matrix_rf.png
│     ├── confusion_matrix_xgb.png
│     ├── shap_summary.png
│
├── notebooks/
│
├── README.md
│
└── requirements.txt

🚀 Future Improvements

  • Increase dataset diversity.
  • Integrate volumetric brain analysis.
  • Compare with FreeSurfer-based measurements.
  • Incorporate multimodal MRI (Structural + Functional).
  • Explore Graph Neural Networks and Vision Transformers.
  • Deploy as a clinical decision-support system.

📚 References

  • ABIDE II Dataset
  • Nilearn Documentation
  • SHAP Explainability
  • Scikit-Learn
  • XGBoost

👥 Project Team

  • Mythri Kodela
  • Murari Vedha Smitha
  • Hemanth Kumar Mandala

Faculty Guide

  • Debanjali Bhattacharya

📄 License

This project is developed for academic and research purposes.

About

Interpretable Machine Learning framework for early detection of Autism Spectrum Disorder using T1-weighted MRI scans from the ABIDE II dataset with Random Forest, XGBoost, SHAP, and AAL Atlas.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages