Medical Insurance Cost Prediction Using Machine Learning π₯β¨
Welcome! This repository marks my second (2nd) hands-on Machine Learning project developed completely by myself.
Moving forward from classification, this project focuses on a Regression task. I built a predictive model that estimates the medical insurance charges (charges) billed to an individual based on their demographic and health metrics.
π Dataset Overview
The dataset used is insurance.csv, which consists of the following features:
- age: Age of the primary beneficiary.
- sex: Insurance contractor gender (female, male).
- bmi: Body Mass Index, providing an understanding of body weight relative to height.
- children: Number of children covered by health insurance / Number of dependents.
- smoker: Smoking status of the beneficiary (yes, no).
- region: The beneficiary's residential area in the US (northeast, southeast, southwest, northwest).
- charges (Target Variable): Individual medical costs billed by health insurance.
π οΈ Tech Stack Used
- Programming Language: Python π
- Environment: VS Code & Jupyter Notebook (
insurance.ipynb) - Libraries: Pandas, NumPy, Scikit-Learn
- Deployment: Hugging Face Spaces & Gradio
π Project Objective & Learning Curve
The goal of this project was to tackle continuous numerical data and learn how lifestyle choices (like smoking status) and physical attributes (like BMI) impact insurance costs.
Through this project, I practiced:
- Handling categorical text data using One-Hot Encoding / Label Encoding.
- Implementing Regression algorithms (like Linear Regression, Decision Tree Regressor, or Random Forest).
- Evaluating model performance using metrics like R-squared ($R^2$) and Root Mean Squared Error (RMSE).
This is another confident step forward in my Data Science journey!
π How to Run Locally
1. Clone and Enter the Repository
git clone [https://huggingface.co/amirsoahil101/Medical_Insurance_Cost_Prediction_Using_Machine_Learningt](https://huggingface.co/amirsoahil101/Medical_Insurance_Cost_Prediction_Using_Machine_Learning)
cd Insurance-Cost-Prediction-Using-Machine-Learning
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support