Giter VIP home page Giter VIP logo

loan-risk-score's Introduction

๐Ÿ’ฐ Loan Affordability (Risk Score)

This project uses machine learning neural networks using Brain JS to calculate an applicant's likelihood of being able to repay a loan. A Risk Score is provided to the applicant ranging from 0 to 500, the higher the number, the better (more chance of affording the loan)

๐ŸŒŸ Demo

See it in action

๐Ÿ”ง Param options

  • ?enable_seed_data=true - pass this to generate random data to test the system.
  • ?enable_logs=true - pass this to get real-time console updates as Brain JS learns your data.
  • ?enable_risk_factor_logging=true - pass this to see your individual risk factors, logged to the console.
  • ?salary=500 - pass a number as a salary to set salary on page load.

๐Ÿ’ก How it works

We use Brain JS

The core concept of this system is to provide a score to the user on their likelihood of being able to repay a loan using machine learning. This works by feeding the machine learning system a set of "training data" in a JSON format, providing an input, and an output as to whether the input is good or bad, the system can then figure out a probability between 0-100 (100 being very likely to be able to afford a loan)

๐Ÿ“š Training Data

Training data collected from hundreds of jobs via Node JS scraping using Cheerio and Puppeteer (development use only)

Using the below assumptions, if a take-home pay is provided lower than ยฃ1,500 a month, and doesn't look accurate, a lower probability will occur.

Salary

  1. If min & max salary provided, they're added together and divided to get a yearly average.
  2. If single salary provided, no extra assumptions made.
  3. If hourly salary provided, we randomly pick either 37 or 25 hrs a week, and 4.3 weeks a month, calculated over a year.
  4. All salaries are then divided by 12 to get a monthly salary.
  5. All salaries have approx 17% deducted as a buffer for tax and NI.

Expenses

  1. ยฃ190/month, Utility Bills (Gas, Electric, Water, Phone, TV, Broadband), source
  2. ยฃ600/month, Rent/Mortgage (1 bedroom), source
  3. ยฃ260/month, Food shopping (small family), source

Loan

  1. A loan average of ยฃ500 taken based on approx 6,000 applicants.

๐Ÿ” Scraper

Install the scraper, you need Node JS 10 or greater

# clone project
$ git clone [email protected]:sts-ryan-holton/loan-risk-score.git

# install dependencies.
$ npm install

โš ๏ธ You will need to enable the scraper, and provide a URL to scrape. We've provided an example that you can copy.

๐Ÿ”ง Starting

# start scraping
$ node scraper/scrape-jobs.js

๐Ÿ”ง Starting - With options

# start scraping with options (you can pass all, or some of the following with number format)
$ node scraper/scrape-jobs.js --searchRadius=300 --memThreshold=50 --tempThreshold=93 --scrapeInterval=1000 --thresholdDelay=7500

loan-risk-score's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lcsouzamenezes

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.