Medical Insurance Cost Prediction using Machine Learning
📌 Project Overview
This project predicts medical insurance charges based on user details such as age, gender, BMI, number of children, smoking habits, and region.
The model is trained using Machine Learning algorithms and deployed using Streamlit for an interactive web interface.
🚀 Features
- Predict insurance charges instantly
- User-friendly Streamlit web app
- Data preprocessing and feature encoding
- Trained Random Forest model for better accuracy
- Real-time prediction based on user input
🛠️ Technologies Used
- Python
- Pandas
- NumPy
- Scikit-learn
- Matplotlib
- Seaborn
- Streamlit
- Pickle
The dataset contains the following features:
- Age : Age of the person
- Sex : Male / Female
- BMI : Body Mass Index
- Children : Number of dependents
- Smoker : Yes / No
- Region : Residential area
- Charges : Medical insurance cost (Target Variable)
🤖 Machine Learning Model Used
Other models tested:
- Linear Regression
- Decision Tree Regressor
Random Forest gave better performance and accuracy.
📊 Project Workflow
- Data Collection
- Data Cleaning
- Exploratory Data Analysis (EDA)
- Feature Encoding
- Train-Test Split
- Model Training
- Model Evaluation
- Deployment using Streamlit
- R² Score achieved good accuracy
- Low prediction error
- Better generalization on unseen data
▶️ How to Run Project
Step 1: Clone Repository
```bash
git clone https://github.com/yourusername/ML-Project-Medical-Insurance-Cost-Prediction.git