This project demonstrates an end-to-end machine learning workflow to predict the diagnosis of Alzheimer's disease based on a comprehensive clinical dataset. The notebook covers everything from data exploration and preprocessing to training and evaluating 10 different supervised classification models.
The primary goal of this project is to identify the most effective supervised learning model for classifying Alzheimer's disease. By analyzing various patient attributes—including demographic, lifestyle, and clinical data—we aim to build a robust predictive tool that can aid in early and accurate diagnosis.
The dataset used is alzheimers_disease_data.csv, which contains:
- 2,149 patient records
- 34 predictive features, such as Age, BMI, Blood Pressure, and MMSE score
- Target Variable:
Diagnosis(0 for Cognitively Normal, 1 for Alzheimer's) - No missing values or duplicates
The project follows a structured machine learning pipeline:
- Data Loading & Inspection: Initial examination of the dataset's structure and quality
- Exploratory Data Analysis (EDA): In-depth analysis of feature distributions, correlations, and class balance
- Data Preprocessing:
- Dropping non-predictive columns (
PatientID,DoctorInCharge) - Splitting the data into 80% training and 20% testing sets
- Scaling numerical features using
StandardScaler
- Dropping non-predictive columns (
- Model Training & Evaluation: Iteratively training and evaluating 10 different classification models
- Model Comparison: Compiling performance metrics (F1-Score, Accuracy) to identify the best-performing model
- The dataset is balanced (near 50/50 class split)
- MMSE score and Age are the strongest individual predictors
- Family history is also strongly correlated with diagnosis
10 supervised models were trained and compared:
- Logistic Regression
- Support Vector Machine (SVM)
- K-Nearest Neighbors (KNN)
- Decision Tree
- Random Forest
- AdaBoost
- Gaussian Naive Bayes
- XGBoost
- Bagging Classifier
- Stacking Classifier
| Model | F1-Score (%) | Accuracy (%) |
|---|---|---|
| XGBoost | 92.62 | 94.88 |
| Random Forest | 92.26 | 94.65 |
| Stacking Classifier | 91.75 | 94.19 |
| Bagging Classifier | 90.34 | 93.49 |
| Decision Tree | 90.20 | 93.02 |
| AdaBoost | 89.19 | 92.56 |
| Support Vector Machine (SVM) | 74.42 | 82.09 |
| Logistic Regression | 73.68 | 81.40 |
| Gaussian Naive Bayes | 68.39 | 77.21 |
| K-Nearest Neighbors (KNN) | 57.25 | 74.65 |
XGBoost emerged as the top-performing model, showcasing the effectiveness of ensemble methods.
This project confirms that machine learning models—particularly XGBoost—can effectively predict Alzheimer's disease from structured clinical data.
- Hyperparameter Tuning: Use
GridSearchCVto improve model performance - Feature Importance: Analyze top contributing features for clinical insight
- Deployment: Develop a simple web app for real-time predictions