{"id":25789105,"url":"https://github.com/sts-ryan-holton/loan-risk-score","last_synced_at":"2026-08-16T18:30:18.868Z","repository":{"id":36178303,"uuid":"222112937","full_name":"sts-ryan-holton/loan-risk-score","owner":"sts-ryan-holton","description":":moneybag: Using Machine Learning and Brain JS, discover your loan affordability by getting your FREE Risk Score!","archived":false,"fork":false,"pushed_at":"2023-05-07T07:24:25.000Z","size":78,"stargazers_count":9,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T00:42:18.811Z","etag":null,"topics":["brainjs","loans","machine-learning","scraper","vuejs2"],"latest_commit_sha":null,"homepage":"https://sts-ryan-holton.github.io/loan-risk-score/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sts-ryan-holton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-16T14:42:28.000Z","updated_at":"2024-07-02T05:54:13.000Z","dependencies_parsed_at":"2022-08-08T13:32:40.917Z","dependency_job_id":null,"html_url":"https://github.com/sts-ryan-holton/loan-risk-score","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/sts-ryan-holton/loan-risk-score","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sts-ryan-holton%2Floan-risk-score","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sts-ryan-holton%2Floan-risk-score/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sts-ryan-holton%2Floan-risk-score/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sts-ryan-holton%2Floan-risk-score/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sts-ryan-holton","download_url":"https://codeload.github.com/sts-ryan-holton/loan-risk-score/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sts-ryan-holton%2Floan-risk-score/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36721898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-08-06T04:43:03.162Z","status":"online","status_checked_at":"2026-08-16T02:00:06.462Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brainjs","loans","machine-learning","scraper","vuejs2"],"created_at":"2025-02-27T11:18:33.286Z","updated_at":"2026-08-16T18:30:18.582Z","avatar_url":"https://github.com/sts-ryan-holton.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :moneybag: Loan Affordability (Risk Score)\n\nThis project uses machine learning [neural networks](https://en.wikipedia.org/wiki/Artificial_neural_network) using [Brain JS](https://github.com/BrainJS/brain.js#brainjs) 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)\n\n\n## :star2: Demo\n\n**[See it in action](https://sts-ryan-holton.github.io/loan-risk-score/)**\n\n#### :wrench: Param options\n\n- `?enable_seed_data=true` - pass this to generate random data to test the system.\n- `?enable_logs=true` - pass this to get real-time console updates as Brain JS learns your data.\n- `?enable_risk_factor_logging=true` - pass this to see your individual risk factors, logged to the console.\n- `?salary=500` - pass a `number` as a salary to set salary on page load.\n\n\n## :bulb: How it works\n\n**We use [Brain JS](https://github.com/BrainJS/brain.js#brainjs)**\n\nThe 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)_\n\n\n## :books: Training Data\n\nTraining data collected from hundreds of jobs via Node JS scraping using Cheerio and Puppeteer _(development use only)_\n\nUsing 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.\n\n#### Salary\n\n1. If min \u0026 max salary provided, they're added together and divided to get a yearly average.\n2. If single salary provided, no extra assumptions made.\n3. If hourly salary provided, we randomly pick either 37 or 25 hrs a week, and 4.3 weeks a month, calculated over a year.\n4. All salaries are then divided by 12 to get a monthly salary.\n5. All salaries have approx 17% deducted as a buffer for tax and NI.\n\n#### Expenses\n\n1. £190/month, **Utility Bills (Gas, Electric, Water, Phone, TV, Broadband)**, [source](https://www.moneyadviceservice.org.uk/blog/what-is-the-average-cost-of-utility-bills-per-month)\n2. £600/month, **Rent/Mortgage (1 bedroom)**, [source](https://www.bbc.co.uk/news/business-46072509)\n3. £260/month, **Food shopping (small family)**, [source](https://www.moneyadviceservice.org.uk/blog/how-does-your-household-food-spend-compare)\n\n#### Loan\n\n1. A loan average of £500 taken based on approx 6,000 applicants.\n\n\n## :mag: Scraper\n\nInstall the scraper, you need **Node JS 10 or greater**\n\n``` bash\n# clone project\n$ git clone git@github.com:sts-ryan-holton/loan-risk-score.git\n\n# install dependencies.\n$ npm install\n```\n\n:warning: You will need to **enable** the scraper, and provide a URL to scrape. We've provided an example that you can copy.\n\n### :wrench: Starting\n\n``` bash\n# start scraping\n$ node scraper/scrape-jobs.js\n```\n\n### :wrench: Starting - With options\n\n``` bash\n# start scraping with options (you can pass all, or some of the following with number format)\n$ node scraper/scrape-jobs.js --searchRadius=300 --memThreshold=50 --tempThreshold=93 --scrapeInterval=1000 --thresholdDelay=7500\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsts-ryan-holton%2Floan-risk-score","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsts-ryan-holton%2Floan-risk-score","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsts-ryan-holton%2Floan-risk-score/lists"}