https://github.com/memudualimatou/insurance-charges-web-application
https://github.com/memudualimatou/insurance-charges-web-application
flask heroku insurance-charges-prediction
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/memudualimatou/insurance-charges-web-application
- Owner: memudualimatou
- Created: 2020-12-19T22:10:03.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-07-24T20:19:39.000Z (about 3 years ago)
- Last Synced: 2025-04-05T20:33:10.574Z (over 1 year ago)
- Topics: flask, heroku, insurance-charges-prediction
- Language: Jupyter Notebook
- Homepage:
- Size: 1.87 MB
- Stars: 14
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
INSURANCE CHARGES PREDICTION SYSTEM
This is a charge prediction system. The aim is to predict individual insurance charges based on their status
## 😇 INSPIRATION
The purposes of this Project to look into different features to observe their relationship, and plot a regression algorithm based on several features of individual such as age, physical/family condition and location against their existing medical expense to be used for predicting future medical expenses of individuals that help medical insurance to make decision on charging the premium.The dataset has 7 coloumns which are age,sex,region,charges,numberOfChildren, smoke and BMI which is Body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women. BMI= m/h^2
where
m = mass (in kilograms)
h = height (in meters)
## ⚙️ HOW DOES THE INSURANCE CHARGES PREDICTION SYSTEM WORKS?
This sytem is a flask responsive web application hosted on heroku. The user has to input some data and get the predicted charges immediately.
The system's interface is built using using HTML & CSS from scratch.Everything is all about preferences but I will personnaly prefer to style my web app than using the plain streamlit interface.
So We use randomforestRegression algorithm to build the model, sterialize it and destrerialize it using Pickle to make prediction. Whenever a user enter the correspondant input through the interface, at the backend , a function in the flask app is called to fetch the inputted data, clean it and displayed the predicted outcome.
The system depends on the following files.
1. `insurance.csv` [See here](https://github.com/memudualimatou/INSURANCE-CHARGES-WEB-APPLICATION/blob/master/insurance.csv) :The system database [CLICK HERE TO DOWNLOAD](https://www.kaggle.com/noordeen/insurance-premium-prediction)
2. `insurances.ipynb` [See here](https://github.com/memudualimatou/INSURANCE-CHARGES-WEB-APPLICATION/blob/master/Insurances.ipynb) :The model notebook
3. `insurances.py` [See here](https://github.com/memudualimatou/INSURANCE-CHARGES-WEB-APPLICATION/blob/master/Insurances.py): The model python file
4. `app.py` [See here](https://github.com/memudualimatou/INSURANCE-CHARGES-WEB-APPLICATION/blob/master/app.py): The flask app
5. `index.html` [See here](https://github.com/memudualimatou/INSURANCE-CHARGES-WEB-APPLICATION/blob/master/templates/index.html): The html file is located insite the Templates folder
6. `AppStyle.css` [See here](https://github.com/memudualimatou/INSURANCE-CHARGES-WEB-APPLICATION/blob/master/static/AppStyle.css): The css file is located inside the static folder.
## ⚠️ THE TECHNOLOGY
* [FLASK](https://en.wikipedia.org/wiki/Flask_(web_framework))
* [HEROKU](https://en.wikipedia.org/wiki/Heroku)
* [PICKLE](https://en.wikipedia.org/wiki/Pickle)
* [RANDOM FOREST REGRESSION](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestRegressor.html)
# ⌛ Project Demo
[DEPLOYED ON HEROKU | CLICK HERE TO TEST THE SYSTEM](https://insurance-charges-web-app.herokuapp.com/)
.gif)
# 🔑 Prerequisites
All the dependencies and required libraries are included in the file `requirements.txt` [See here](https://github.com/memudualimatou/INSURANCE-CHARGES-WEB-APPLICATION/blob/master/requirements.txt): The css file located inside the static foler.
## 🚀 INSTALLATION
Clone the repo\
```$ https://git.heroku.com/insurance-charges-web-app.git```
Now, run the following command in your Terminal/Command Prompt to install the libraries required
```$ pip3 install -r requirements.txt```
# 👏 And it's done!
Feel free to mail me for any doubts/query ✉️ alimatousadia005@gmail.com
# ❤️ Owner
Made with ❤️ by MEMUDU Alimatou Sadia Anike.