Skip to content

sam-coolshrestha/Health-Monitoring-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฉบ Lifestyle Disease Risk Prediction & Health Insights Dashboard

๐Ÿ”ด Live Dashboard

๐Ÿ‘‰ Click here to view the live dashboard


๐Ÿ“Œ Project Overview

This project analyzes health-related data to predict the risk of lifestyle diseases based on an individual's health parameters. Users input basic health information such as blood pressure, heart rate, smoking status, BMI, and other lifestyle indicators, and the system analyzes this data to estimate potential disease risks.

The project also generates visual insights through a dashboard to help users better understand their health patterns and risk factors.

The goal of this project is to demonstrate how data analysis and predictive modeling can assist in early detection of lifestyle diseases and promote preventive healthcare.


๐ŸŽฏ Objectives

  • Analyze healthcare datasets to identify patterns related to lifestyle diseases.
  • Predict disease risk based on user-provided health parameters.
  • Provide data-driven health insights through visualization dashboards.
  • Help users understand how their lifestyle factors affect their health.

๐Ÿง  Key Features

โœ” Health data preprocessing and cleaning โœ” Lifestyle disease risk prediction using data analysis techniques โœ” User input system for personal health parameters โœ” Risk evaluation based on dataset insights โœ” Interactive health insights dashboard โœ” Data visualization for better understanding of health patterns


๐Ÿค– ML Model Results

The backend trains and compares 6 machine learning models on the NHANES dataset (5,735 participants):

Model Accuracy F1 Score AUC-ROC
Logistic Regression 95.12% 0.9712 0.9777
Decision Tree 99.91% 0.9995 0.9973
Random Forest 99.74% 0.9984 1.0000
Gradient Boosting โœ… 99.91% 0.9995 1.0000
SVM 97.04% 0.9825 0.9943
KNN 96.34% 0.9783 0.9881

Best Model: Gradient Boosting (AUC = 1.0000)

Training Details

  • Dataset: NHANES (National Health and Nutrition Examination Survey)
  • Samples: 5,735 participants
  • Features: 17 (including 5 engineered features)
  • Train/Test Split: 80% / 20% stratified
  • Cross-Validation: 5-Fold Stratified KFold

๐Ÿ“Š Input Parameters

The system analyzes the following user inputs:

  • Blood Pressure (Systolic & Diastolic)
  • Heart Rate
  • BMI
  • Smoking Status
  • Age
  • Waist Circumference
  • Physical Activity Level
  • Other lifestyle-related indicators (based on dataset features)

Using these parameters, the system estimates the risk probability of lifestyle-related diseases.


๐Ÿ“ˆ Output

The system provides:

  • Disease risk estimation
  • Health insights based on dataset trends
  • Visual dashboard displaying:
    • Health indicators
    • Risk distribution
    • Lifestyle impact on disease probability

๐Ÿ›  Technologies Used

Backend / ML

  • Python 3
  • Pandas โ€“ Data preprocessing and analysis
  • NumPy โ€“ Numerical operations
  • Matplotlib / Seaborn โ€“ Data visualization
  • Scikit-learn โ€“ Machine learning models
  • SciPy โ€“ Statistical analysis

Frontend / Dashboard

  • React โ€“ Frontend framework
  • Vite โ€“ Build tool
  • Recharts โ€“ Interactive charts
  • Vercel โ€“ Deployment

๐Ÿš€ Run the ML Backend Locally

1. Clone the repo

git clone https://github.com/sam-coolshrestha/Health-Monitoring-System.git
cd Health-Monitoring-System

2. Install dependencies

pip install pandas numpy matplotlib seaborn scikit-learn scipy

3. Run the pipeline

python lifestyle_risk_model.py

This will print all model results and generate 4 plots in an outputs/ folder.


๐Ÿ–ฅ Run the Dashboard Locally

cd dashboard
npm install
npm run dev

Open http://localhost:5173 in your browser.


๐Ÿ“‚ Project Workflow

1๏ธโƒฃ Data Collection 2๏ธโƒฃ Data Preprocessing 3๏ธโƒฃ Exploratory Data Analysis (EDA) 4๏ธโƒฃ Feature Engineering 5๏ธโƒฃ Model Training & Evaluation 6๏ธโƒฃ Dashboard Visualization 7๏ธโƒฃ User Health Input System (Risk Calculator)


๐Ÿ“Š Dataset Analysis

The NHANES dataset contains multiple health and lifestyle parameters analyzed to identify correlations between lifestyle habits and disease risks.

Key findings:

  • 59.4% of participants are smokers โ€” largest single risk factor
  • 71.2% are overweight or obese (BMI โ‰ฅ 25)
  • Hypertension rate jumps from 13% (age 18โ€“30) to 59% (age 60+)
  • BMI and waist circumference are nearly perfectly correlated (r = 0.91)

๐Ÿ”ฎ Future Scope

1๏ธโƒฃ Computer Vision Based Rehabilitation Assistant

A future version aims to integrate OpenCV-based rehabilitation exercise monitoring, where:

  • Patients perform rehabilitation exercises
  • The system detects body posture using computer vision
  • It provides feedback on whether exercises are performed correctly

This feature is currently proposed as a future enhancement and has not yet been implemented.

2๏ธโƒฃ Machine Learning Model Improvements

  • Train deep learning models (Neural Networks)
  • Improve accuracy of disease risk prediction

3๏ธโƒฃ Real-Time Health Monitoring

Integration with wearable devices for real-time health data.

4๏ธโƒฃ Backend API

Build a REST API so the dashboard can call the ML model directly in real time.


๐Ÿ“œ License

This project is open source and available under the MIT License.

Releases

No releases published

Packages

 
 
 

Contributors