Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ModelX Dementia Risk Prediction

ModelX Optimization Sprint - IEEE Society, IIT Sri Lanka

A binary classification system to predict dementia risk using non-medical demographic and lifestyle features from the NACC dataset. This submission achieves 0.9254 ROC-AUC using only information that individuals can self-report without medical testing.


Team Members

Name University Email
Tharushka Dinujaya NSBM tharushkadinujaya05@gmail.com
Zenith NSBM Zenith.ivan123@gmail.com
Gimhani Samanalee NSBM silvagsd@students.nsbm.ac.lk
Manuja NSBM mmdwijesinghe@students.nsbm.ac.lk

Project Overview

Challenge

Build a machine learning model to predict dementia using ONLY non-medical features - information that normal people would know about themselves without clinical assessments, cognitive tests, or medical diagnoses.

Dataset

  • Source: NACC (National Alzheimer's Coordinating Center) Research Database
  • Samples: 195,196 participant visits
  • Original Features: 1,024 variables
  • Selected Features: 13 non-medical features (demographics, education, social factors)

Key Constraints

  • Excluded: CDR scores, cognitive test results, brain scans, lab results, medical assessments
  • Allowed: Age, sex, education, marital status, living situation, handedness, ethnicity

Results

Final Model Performance

  • Model: Gradient Boosting (Tuned)
  • Test ROC-AUC: 0.9254
  • Test Accuracy: 89.98%
  • Precision: 82.61%
  • Recall: 83.67%
  • F1-Score: 83.13%

Top 3 Most Important Features

  1. AGE (63.83%) - Age at clinical visit
  2. AGE_EDUC_INTERACTION (15.51%) - Age × Education years
  3. EDUC (8.77%) - Years of formal education

Models Compared

  • Logistic Regression
  • Random Forest
  • Gradient Boosting (Selected)
  • Extra Trees

Setup & Installation

Prerequisites

  • Python 3.8+
  • Conda (recommended)

Installation

# Clone repository
git clone <your-repo-url>
cd ModelX-Dementia

# Create conda environment
conda create -n modelX python=3.10 -y
conda activate modelX

# Install dependencies
pip install -r requirements.txt

# Install Jupyter kernel
python -m ipykernel install --user --name=modelX --display-name="Python (modelX)"

Running the Notebook

# Start Jupyter
jupyter notebook

# Open: notebooks/ModelX_Dementia_Prediction.ipynb
# Select kernel: Python (modelX)
# Run: Kernel → Restart & Run All

Methodology

1. Data Exploration

  • Analyzed 195,196 samples with 1,024 features
  • Identified class imbalance (70.5% no dementia, 29.5% dementia)
  • Examined missing values and special codes

2. Feature Engineering

  • Selected: 17 initial non-medical features
  • Removed: 3 features with >50% missing data (HISPOR, RACESEC, RACETER)
  • Created: AGE (calculated), AGE_EDUC_INTERACTION, LIVES_ALONE
  • Final: 13 features for modeling

3. Data Preprocessing

  • Replaced special codes (-4, 88, 99) with NaN
  • Median imputation for missing values
  • RobustScaler for numeric features
  • Stratified 70%-15%-15% train-validation-test split

4. Model Development

  • Trained 4 baseline models with class balancing
  • Compared using ROC-AUC as primary metric
  • Selected top 2 models for hyperparameter tuning

5. Hyperparameter Tuning

  • RandomizedSearchCV with 50 iterations
  • 5-fold cross-validation
  • Optimized for ROC-AUC score

6. Evaluation & Explainability

  • Comprehensive test set evaluation
  • Confusion matrix, ROC curves, PR curves
  • Feature importance analysis

Key Findings

Medical Insights

  1. Age is the strongest predictor (63.83% importance) - consistent with medical literature
  2. Education provides cognitive reserve - higher education associated with lower dementia risk
  3. Age-education interaction is significant - protective effect of education varies with age
  4. Social factors matter - living situation contributes to prediction

Technical Achievements

  • Successfully avoided medical variables (no "cheating" with clinical scores)
  • Handled class imbalance with stratified sampling and class weights
  • Achieved strong performance (0.9254 ROC-AUC) using only 13 features
  • Comprehensive explainability with feature importance analysis

Limitations

  • Performance ceiling due to non-medical feature restriction
  • Cannot replace professional medical diagnosis
  • Model is for screening/risk assessment only

Technologies Used

  • Python 3.10
  • Pandas - Data manipulation
  • NumPy - Numerical operations
  • Scikit-learn - ML models and preprocessing
  • Matplotlib & Seaborn - Visualization
  • Jupyter Notebook - Interactive development

Hackathon Evaluation Criteria

Criteria Weight Our Approach
Data Preprocessing 15% Special codes, imputation, scaling, stratified splits
Feature Engineering 20% AGE calculation, interaction terms, binary indicators
Model Development 20% 4 models trained, hyperparameter tuning, class balancing
Hyperparameter Tuning 15% RandomizedSearchCV, 50 iterations, 5-fold CV
Evaluation 15% ROC-AUC, confusion matrix, ROC/PR curves
Explainability 10% Feature importance, medical interpretation
Code Quality 5% Clean notebook, documentation, reproducibility

License

This project is submitted for the ModelX Optimization Sprint organized by IEEE Society, IIT Sri Lanka.


Acknowledgments

  • IEEE Society, IIT Sri Lanka - For organizing the ModelX Optimization Sprint
  • NACC - For providing the dementia prediction dataset
  • Medical Literature - For cognitive reserve theory and domain knowledge

Contact

For questions about this submission, please contact:

About

Binary classification system for dementia risk prediction using non-medical features. ModelX Optimization Sprint submission by IEEE Society, IIT Sri Lanka. Achieves 0.9254 ROC-AUC using only demographic and lifestyle data from NACC dataset

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages