Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

📂 Dataset Information

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

  • Random Forest Regressor

Other models tested:

  • Linear Regression
  • Decision Tree Regressor

Random Forest gave better performance and accuracy.


📊 Project Workflow

  1. Data Collection
  2. Data Cleaning
  3. Exploratory Data Analysis (EDA)
  4. Feature Encoding
  5. Train-Test Split
  6. Model Training
  7. Model Evaluation
  8. Deployment using Streamlit

📈 Model Performance

  • R² Score achieved good accuracy
  • Low prediction error
  • Better generalization on unseen data

▶️ How to Run Project

Step 1: Clone Repository

git clone https://github.com/yourusername/ML-Project-Medical-Insurance-Cost-Prediction.git

Releases

Packages

Contributors

Languages