Skip to content

🧠 Mental Health Risk Prediction: A machine learning-based system designed to predict mental health risk levels (Low, Medium, High) using survey data from multiple countries. The project includes data preprocessing, EDA, clustering, feature selection, and classification models.

License

Notifications You must be signed in to change notification settings

oxayavongsa/aai-590-capstone-mental-health

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

90 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mental Health Risk Predictor

Watch Presentation Dataset (Kaggle)


This repository contains a machine learning pipeline and Gradio-based web interface for predicting mental health risk levels using various classification models. The project is part of a capstone assignment and leverages structured clinical and behavioral data to assess mental health risk categories: Low, Medium, and High.

🧠 Project Overview

We evaluate three classification approaches for multiclass risk prediction:

  • Logistic Regression β€” interpretable baseline
  • TabNet-inspired Tabular Neural Network β€” non-linear pattern learning
  • Soft Voting Ensemble β€” stability via averaged probabilities

Key metrics include Accuracy, Macro F1, and ROC AUC. An interactive Gradio UI provides live predictions for demo purposes.


πŸ“ Project Structure

β”œβ”€β”€ data-assets/                                      # CSV and PKL files for training/testing
β”‚   β”œβ”€β”€ Mental Health Dataset.csv
β”‚   β”œβ”€β”€ cleaned_mental_health_data.csv
β”‚   β”œβ”€β”€ X_train.csv / X_test.csv
β”‚   β”œβ”€β”€ y_train.csv / y_test.csv
β”‚   └── Encoded + Scaled variants (.pkl / .csv)
β”‚
β”œβ”€β”€ images/                                           # Visuals used for reporting and evaluation
β”‚
β”œβ”€β”€ notebook-pipeline/                                # Pipeline Order          
β”‚   β”œβ”€β”€ clean_filtered_eda.ipynb
β”‚   β”œβ”€β”€ split_preprocessing.ipynb
β”‚   └── models/
β”‚       β”œβ”€β”€ logistic-regression/
β”‚       β”‚   └── logistic_regression_model.ipynb
β”‚       β”œβ”€β”€ tab-neural-network/
β”‚       β”‚   └── tabular_neural_network_hypertuned.ipynb
β”‚       └── soft-voting/
β”‚            └── soft_voting_model.ipynb
β”‚
β”œβ”€β”€ user-interface/
β”‚   β”œβ”€β”€ mental_health_risk_predictor_logistic.ipynb    # Logistic/Ensemble UI
β”‚   β”œβ”€β”€ mental_health_risk_predictor_TNN.ipynb         # TabNet Neural Net UI
β”‚   └── gradio interface.pdf
β”‚
└── README.md

πŸš€ How to Run

  1. Clone the Repository

    git clone https://github.com/oxayavongsa/aai-590-capstone-mental-health.git
    cd aai-590-capstone-mental-health
  2. Install Dependencies

    pip install -r requirements.txt
  3. Run Notebooks
    Launch any of the model training notebooks:

    • notebook-pipeline/models/logistic-regression/logistic_regression_model.ipynb Open in Colab β€” Logistic Regression
    • notebook-pipeline/models/soft-voting/soft_voting_model.ipynbOpen In Colab - Soft Voting
    • notebook-pipeline/models/tab-neural-network/tabular_neural_network_hypertuned.ipynb Open In Colab - TabNet

    Launch the demo Gradio Watch Presentation
    Run one of the UI notebooks:

    • user-interface/mental_health_risk_predictor_logistic.ipynb
    • user-interface/mental_health_risk_predictor_TNN.ipynb

πŸ“Š Model Performance Highlights

Final Model Comparison Bar chart

Model Accuracy Macro F1 ROC AUC (Micro) Generalization
Logistic Regression 0.73 0.73 0.84 Good
Soft Voting 0.78 0.78 0.93 Very Good
TabNet-Inspired 0.79 0.78 0.94 Excellent

🎯 Key Features

  • Multiclass Classification of mental health risks (Low, Medium, High)
  • Advanced Feature Engineering using clinical and behavioral indicators
  • Interactive Gradio Interface for real-time prediction
  • Model Interpretability included with feature importance analysis

βš–οΈ Ethics & Intended Use

Ethics & intended use All examples use anonymous data. The system supports professional judgment and should not be used to make medical diagnoses. For any real deployment, use informed consent, privacy safeguards, access control, and bias monitoring.


πŸ“Œ Dependencies

See requirements.txt for a complete list.


πŸ“š License

This project is licensed under the Apache License.


πŸ™Œ Acknowledgements

  • This capstone was completed in AAI-590 within the Shiley-Marcos School of Engineering at the University of San Diego.
  • Team: Outhai Xayavongsa (Team Lead), Aaron Ramirez (Tech Lead), and Prema Mallikarjunan.
  • We thank Professor Anna Marbut for her guidance and mentorship.

About

🧠 Mental Health Risk Prediction: A machine learning-based system designed to predict mental health risk levels (Low, Medium, High) using survey data from multiple countries. The project includes data preprocessing, EDA, clustering, feature selection, and classification models.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •