Commit Β·
3060f2f
1
Parent(s): b951f95
add readme file
Browse files
README.md
CHANGED
|
@@ -1,3 +1,66 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: mit
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Medical Insurance Cost Prediction
|
| 3 |
+
emoji: π₯
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
sdk_version: 5.0.0
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
license: mit
|
| 11 |
+
short_description: A regression model predicting medical insurance charges based on demographic and health metrics.
|
| 12 |
---
|
| 13 |
+
|
| 14 |
+
# Medical Insurance Cost Prediction Using Machine Learning π₯β¨
|
| 15 |
+
|
| 16 |
+
Welcome! This repository marks my **second (2nd)** hands-on Machine Learning project developed completely by myself.
|
| 17 |
+
|
| 18 |
+
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.
|
| 19 |
+
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
## π Dataset Overview
|
| 23 |
+
|
| 24 |
+
The dataset used is `insurance.csv`, which consists of the following features:
|
| 25 |
+
|
| 26 |
+
- **age:** Age of the primary beneficiary.
|
| 27 |
+
- **sex:** Insurance contractor gender (female, male).
|
| 28 |
+
- **bmi:** Body Mass Index, providing an understanding of body weight relative to height.
|
| 29 |
+
- **children:** Number of children covered by health insurance / Number of dependents.
|
| 30 |
+
- **smoker:** Smoking status of the beneficiary (yes, no).
|
| 31 |
+
- **region:** The beneficiary's residential area in the US (northeast, southeast, southwest, northwest).
|
| 32 |
+
- **charges (Target Variable):** Individual medical costs billed by health insurance.
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## π οΈ Tech Stack Used
|
| 37 |
+
|
| 38 |
+
- **Programming Language:** Python π
|
| 39 |
+
- **Environment:** VS Code & Jupyter Notebook (`insurance.ipynb`)
|
| 40 |
+
- **Libraries:** Pandas, NumPy, Scikit-Learn
|
| 41 |
+
- **Deployment:** Hugging Face Spaces & Gradio
|
| 42 |
+
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## π Project Objective & Learning Curve
|
| 46 |
+
|
| 47 |
+
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.
|
| 48 |
+
|
| 49 |
+
Through this project, I practiced:
|
| 50 |
+
|
| 51 |
+
1. Handling categorical text data using One-Hot Encoding / Label Encoding.
|
| 52 |
+
2. Implementing Regression algorithms (like Linear Regression, Decision Tree Regressor, or Random Forest).
|
| 53 |
+
3. Evaluating model performance using metrics like R-squared ($R^2$) and Root Mean Squared Error (RMSE).
|
| 54 |
+
|
| 55 |
+
This is another confident step forward in my Data Science journey!
|
| 56 |
+
|
| 57 |
+
---
|
| 58 |
+
|
| 59 |
+
## π How to Run Locally
|
| 60 |
+
|
| 61 |
+
### 1. Clone and Enter the Repository
|
| 62 |
+
|
| 63 |
+
```bash
|
| 64 |
+
git clone [https://huggingface.co/amirsoahil101/Medical_Insurance_Cost_Prediction_Using_Machine_Learningt](https://huggingface.co/amirsoahil101/Medical_Insurance_Cost_Prediction_Using_Machine_Learning)
|
| 65 |
+
cd Insurance-Cost-Prediction-Using-Machine-Learning
|
| 66 |
+
```
|