A machine learning-powered web application that predicts health insurance premiums based on individual characteristics and health factors.
This project uses machine learning algorithms to predict health insurance costs based on various demographic, lifestyle, and health-related factors. The application provides an intuitive interface for users to input their details and receive instant premium predictions.
- Interactive UI: Clean, organized 4x3 grid layout with dark theme
- Real-time Predictions: Instant insurance cost estimates via ML model
- Comprehensive Input Fields: 12 different health and demographic parameters
- User-friendly Controls: Mix of number inputs and dropdown selectors
- Responsive Design: Built with Streamlit for seamless user experience
Visit the live application: Premium Health Insurance Cost Predictor
- Age: 18-100 years
- Number of Dependants: 0-20 dependents
- Income in Lakhs: Annual income (0-200 lakhs)
- Genetical Risk: Risk score 0-5 based on genetic factors
- Insurance Plan: Bronze, Silver, or Gold tier
- Employment Status: Salaried, Self-Employed, Freelancer
- Gender: Male or Female
- Marital Status: Married or Unmarried
- BMI Category: Normal, Overweight, Underweight, Obesity
- Smoking Status: No Smoking, Regular, Occasional
- Region: Northeast, Northwest, Southeast, Southwest
- Medical History:
- No Disease
- Diabetes
- High blood pressure
- Diabetes & High blood pressure
- Thyroid
- Heart disease
- High blood pressure & Heart disease
- Diabetes & Thyroid
- Diabetes & Heart disease
- Frontend: Streamlit
- Backend: Python
- ML Libraries:
- Scikit-learn (Model Training & Prediction)
- Pandas (Data Manipulation)
- NumPy (Numerical Computing)
- Visualization: Matplotlib, Seaborn (for EDA)
- Model Persistence: Pickle/Joblib
healthcare-premium-prediction/
โ
โโโ artifacts/ # Trained models and preprocessors
โ โโโ model_young.joblib # ML model for age <= 25
โ โโโ model_rest.joblib # ML model for age > 25
โ โโโ scaler_young.joblib # Scaler for young age group
โ โโโ scaler_rest.joblib # Scaler for older age group
โ
โโโ main.py # Main Streamlit application
โโโ prediction_helper.py # Prediction utility functions
โโโ requirements.txt # Python dependencies
โโโ README.md # Project documentation
โโโ LICENSE # Apache-2.0 License
โโโ .gitignore # Git ignore rules
- Python 3.10 or higher
- pip package manager
- Clone the repository
git clone https://github.com/thanusree2630/healthcare-premium-prediction.git
cd healthcare-premium-prediction- Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies
pip install -r requirements.txt- Run the application
streamlit run main.py- Access the app
Open your browser and navigate to
http://localhost:8501
streamlit>=1.28.0
pandas>=2.0.0
numpy>=1.24.0
scikit-learn>=1.3.0
matplotlib>=3.7.0
seaborn>=0.12.0
joblib>=1.3.0- Data distribution analysis
- Correlation studies
- Outlier detection
- Missing value handling
- Feature importance analysis
- Categorical encoding (One-Hot/Label Encoding)
- Numerical feature scaling
- Feature interaction creation
- Dimensionality reduction (if applicable)
- Algorithm selection (Linear Regression, Random Forest, XGBoost, etc.)
- Cross-validation
- Hyperparameter tuning
- Model evaluation metrics (RMSE, MAE, Rยฒ)
- Model persistence
- Rยฒ Score
- RMSE
- MAE
-
Open the application in your browser
-
Fill in all required fields in the 4x3 grid layout:
Row 1: Age, Number of Dependants, Income in Lakhs
Row 2: Genetical Risk, Insurance Plan, Employment Status
Row 3: Gender, Marital Status, BMI Category
Row 4: Smoking Status, Region, Medical History
-
Click the "Predict" button
-
View your predicted insurance cost displayed as a success message
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/improvement) - Make your changes
- Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/improvement) - Create a Pull Request
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
Thanusree
- GitHub: @thanusree2630
- Repository: healthcare-premium-prediction
If you encounter any issues or have questions, please:
- Open an issue on GitHub
- Contact me via email
- Add more ML algorithms comparison
- Implement SHAP values for model interpretability
- Add data visualization dashboard
- Include policy recommendation system
- Multi-language support
- Mobile-responsive design improvements
- API endpoint for programmatic access
โญ If you find this project helpful, please consider giving it a star!