GithubHelp home page GithubHelp logo

grygoryshyn / nsure Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.42 MB

This repository contains the source code used to develop NSure's dynamic webapp MVP focused on providing users a convenient and simple experience in selecting their health insurance policies, bypassing the unnecessary costs involved in dealing with insurance brokers. App covers 18 policies, across 6 insurers operating in the Netherlands market.

License: BSD 3-Clause "New" or "Revised" License

Jupyter Notebook 40.03% Python 13.09% CSS 31.80% HTML 15.07%
convinience css3 dynamic-website fintech flask html5 insurance insuretech machine-learning python3 webapp

nsure's Introduction

NSure

This repository contains the source code and data files used to develop the NSure dynamic web application MVP focused on providing users a convenient and simple experience in selecting their health insurance policies, bypassing the unnecessary costs involved in dealing with insurer brokers.

File Structure Of the Repository

The development and functionality of the web application revolves around 6 core files provided in the repository. Namely:

1. model_development/NSure_Data.csv

In this file is a !generated! dataset with 1,800 samples featuring 9 independent variables and 1 dependent variable feature. The Independent variables relate to different preference fields that users may have regarding their choice in selecting insurance plans, such as CPM (euro cost per month), and the dependent variable refers to 1 of 18 possible existing insurance plan policies offered in the Dutch market by 6 insurance providers that the user ends up opting in for. It is important to stress that this dataset was simulated and therefore is not indicative of true information regarding customer behaviour related to the named insurance products. The dataset was simulated by generating 100 sample observations using unique combination of normal and binomial distributions for features of every respective insurance plan covered by the model.

2. model_development/model_notebook.ipynb

This file contains the python notebook used to train and develop the multi-class classification model which is used to create personalised predictions for insurance policy products in the Dutch market that users should opt in for depending on their personal preferences. The data used to train the models is directly pulled from the NSure_Data.csv file. Ultimately a random forest classifier is used as the model of choice. The random forest model is built using the machine learning library scikit-learn. The model is then stored as a python object using the pickle library.

3. models/model.pkl

This is a python object file which contains the serialized random forest model code trained in model_notebook.ipynb. This file is used to create predictions for users.

4. NSure_app/main.py

This file is a python script which implements the Flask micro web framework to enable the opportunity to directly link python code (model.pkl) with the HTML file (home.html). This framework allows us to route the input data provided by users on the web app to the ML model file to create predictions and send the predictions back to the dynamic website for users in order to provide them near-instant advice on purchasing health insurance products.

5. NSure_app/templates/home.html

This code outlines the content and structure of the front-end website that is accessed by users to send their preference data in return for advice on insurance policies.

6. NSure_app/static/css/style.css

Whilst home.html provides the content and structure for the website, this file is responsible for addressing the presentation of the website.

How to Install and Run the Web App

  1. Clone the repository on your local machine
  2. Go to the console/terminal/command prompt and from project root run the line python NSure_app/main.py
  3. Open http://127.0.0.1:5000/ on your web browser
  4. Fill in all required form fields and click on the advise button
  5. Scroll down until end of the section to see your recommended health insurance products

Credit

The resources used to create the code for the project are listed below:

  1. https://iq.opengenus.org/web-app-ml-model-using-flask/
  2. https://codepen.io/NielsVoogt/pen/eYBQpPR
  3. https://www.w3schools.com/

nsure's People

Contributors

grygoryshyn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.