Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DementiaInsight

🧠 MODELX: Dementia Risk Prediction

This project is a submission for the MODE-LX hackathon. The goal is to build a binary classification model that predicts a person's risk of dementia using only non-medical variables.

This solution is built as a reproducible pipeline that automates data preprocessing, model training, and evaluation, and includes a script to run live predictions from user input.

🏆 Key Results

  • Best Model: LightGBM
  • Test Set PR AUC (Primary Metric): 0.560
  • Test Set ROC AUC: 0.734
  • Top Predictors: NACCAGE (Age), EDUC (Years of Education), and SMOKYRS (Total Years Smoked) were identified as the most important predictive features.

The Following are the outcomes of our Demensia Prediction Model.

Sample 1 WhatsApp Image 2025-11-16 at 18 45 58_884452f1

Sample 2 WhatsApp Image 2025-11-16 at 18 47 05_20aa55a1


🛠️ Tech Stack

  • Data Analysis & Manipulation: pandas, numpy
  • Data Visualization: matplotlib, seaborn
  • Preprocessing & Modeling: scikit-learn, lightgbm
  • Notebooks: jupyter
  • Model Serialization: pickle

📂 Project Structure

DimensiaRiskAi/
│
├── data/
│   ├── raw/
│   │   ├── dataset.csv         (Not in repo - Must be added manually)
│   ├── processed/              (Ignored by git)
│   │   ├── X_train_processed.npy
│   │   ├── y_train.csv
│   │   └── ...
│
├── models/
│   ├── LightGBM.pkl
│   ├── RandomForest.pkl
│   └── ...
│
├── notebooks/                  (Original development notebooks)
│   ├── 01_eda.ipynb
│   ├── 02_preprocessing.ipynb
│   ├── 03_modeling.ipynb
│   └── 04_evaluation.ipynb
│
├── report/
│   ├── figures/
│   │   ├── model_comparison.png
│   │   ├── feature_importance.png
│   │   └── ...
│
├── src/                        (Source code for the pipeline)
│   ├── preprocessing.py
│   ├── train.py
│   ├── evaluation.py
│   ├── predict.py              (Run this for a new prediction)
│   ├── main.py                 (Run this to train everything)
│   └── utils.py
│
├── .gitignore
├── README.md                   (This file)
└── requirements.txt            (Generated by 'pip freeze')

🚀 How to Run

1. Installation

  1. Clone the repository:
    git clone https://github.com/vidun-upek/DementiaInsight.git
    cd DementiaInsight # Locate it in the vs code 
  2. Create a virtual environment:
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install the required packages: (You will need to create a requirements.txt file with pandas, numpy, scikit-learn, lightgbm, matplotlib, seaborn)
    pip install -r requirements.txt

2. Add folders data/raw(ADD THE CSV FILE HERE), data/processed, models, report/figures

3. Run the Full Pipeline

This will run all steps: data preprocessing, model training, and evaluation. Figures will be saved to report/figures/.

python src/main.py

4. Run a Live Prediction

After running the main pipeline, you can use the predict.py script to get a new prediction from the command line.

python src/predict.py

The script will prompt you for the 8 non-medical features.

The following are some report figures

  1. Pr_curve_Comaprison
pr_curve_comparison 2. Model_comparison model_comparison 3. Feature_importance feature_importance 4. Roc_curve_comparison roc_curve_comparison

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages