Watch Demo Video
Machine Learning
Life Expectancy Prediction Using Machine Learning
The Life Expectancy Prediction Using Machine Learning system is a comprehensive machine learning solution that predicts whether a country's life expectancy is High or Low using WHO data with 20 health and socioeconomic features. This project is ideal for B.Tech, MCA, CSE, and engineering students as their final year project. It uses advanced ensemble algorithms like XGBoost and Random Forest to achieve 91.5% accuracy.
The system leverages features including adult mortality, BMI, GDP, schooling, immunization rates, and income composition of resources. It provides interactive visualizations, feature importance analysis, model comparison, and real-time life expectancy prediction to help policymakers and healthcare administrators make data-driven decisions.
Python 3.8+
Machine Learning
XGBoost
Random Forest
Scikit-learn
Pandas
NumPy
Matplotlib
Seaborn
Flask
HTML/CSS/JS
Key Features:
- Binary Life Expectancy Classification
- XGBoost (91.5% Accuracy)
- Random Forest (90.8% Accuracy)
- 20 Feature Analysis
- Feature Importance Analysis
- Real-time Country Prediction
- Model Performance Comparison
- Interactive Visualizations
- 5-Fold Stratified CV
- Flask Web Application
Algorithms Used
⚡ XGBoost Classifier
Optimized gradient boosting with regularization, handles missing values effectively
🎯 Accuracy: 91.5%
🌲 Random Forest Classifier
Ensemble learning with 100 trees, robust to outliers and noise
🎯 Accuracy: 90.8%
📊 Feature Engineering
StandardScaler, binary target creation, categorical encoding
📊 Features: 20
🔍 5-Fold Stratified CV
Cross-validation for model stability and generalization
📊 XGB: 89.9% ± 1.5%
Methodology & Workflow
1
Data Loading & Inspection
WHO dataset with 2,938 records across 193 countries
2
Data Preprocessing
Missing value imputation, outlier removal, feature scaling
3
Feature Engineering
Binary target creation, status encoding
4
Model Training
XGBoost & Random Forest with optimized parameters
5
Model Evaluation
Accuracy, Precision, Recall, F1-Score, ROC-AUC, 5-fold CV
6
Web Deployment
Flask web app for real-time life expectancy prediction
Model Performance Comparison
| Metric |
XGBoost |
Random Forest |
Best |
| Accuracy |
0.915 |
0.908 |
XGBoost |
| Precision |
0.916 |
0.909 |
XGBoost |
| Recall |
0.915 |
0.908 |
XGBoost |
| F1-Score |
0.915 |
0.908 |
XGBoost |
| ROC-AUC |
0.961 |
0.949 |
XGBoost |
| CV Mean (5-Fold) |
0.899 |
0.891 |
XGBoost |
Project Package Includes:
Complete Source Code
Documentation (50+ pages)
Video Tutorial
Dataset (2,938 records)
Flask Web App
Model Files (Pickle)
Visualizations
24/7 Expert Support