Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ankhanhquach/universal_banking_loan_prediction_knn
This machine learning initiative seeks to leverage the k-Nearest Neighbors (k-NN) classification algorithm to predict whether a Universal Bank will accept a personal loan offer.
https://github.com/ankhanhquach/universal_banking_loan_prediction_knn
k-nn machine-learning r
Last synced: 27 days ago
JSON representation
This machine learning initiative seeks to leverage the k-Nearest Neighbors (k-NN) classification algorithm to predict whether a Universal Bank will accept a personal loan offer.
- Host: GitHub
- URL: https://github.com/ankhanhquach/universal_banking_loan_prediction_knn
- Owner: ankhanhquach
- Created: 2023-10-18T10:40:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-18T10:58:47.000Z (over 1 year ago)
- Last Synced: 2024-11-06T07:17:00.764Z (3 months ago)
- Topics: k-nn, machine-learning, r
- Language: R
- Homepage:
- Size: 205 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Universal Bank Loan Prediction: k-NN Model
This repository contains the machine learning project that employs k-NN classification to predict if a Universal Bank customer will accept a personal loan offer.
## Table of Contents
1. [Submission Instructions](#submission-instructions)
2. [Data Description](#data-description)
3. [Scenario](#scenario)
4. [Tasks](#tasks)## Submission Instructions
- Answers should be written as text or comments within the R codes.
- Compile R scripts to html/word/pdf for submission.
- Shortcut: `Ctrl + Shift + K` then select "html".
- Submit the html file via Canvas before the deadline.## Data Description
- Dataset: `Universalbank.csv`.
- Contains data on 5000 bank customers.
- Includes demographics, bank relationship details, and past loan campaign responses.
- Key metric: Only 9.6% accepted the last personal loan offer.## Scenario
Universal Bank seeks to convert its liability customers to personal loan customers. With a previous campaign seeing a 9% conversion rate, the bank aims to optimize its strategy using k-NN predictions for better-targeted campaigns.> "Do the right thing; and do it right." - Master Yeoda.
## Tasks
1. **Data Handling**
- Import and split data: 60% training and 40% validation.
a. Check variable data types.
b. Set up kNN with relevant variables.
2. **k-NN Modelling**
- Exclude ID and ZIP code predictors.
- Factorize categorical variables.
- Test with k values: 3, 5, and 7. Select the best k.
3. **Model Assessment**
- Predict on the validation set using optimal k.
a. Visualize with an ROC curve.
b. Gauge model efficacy.
4. **Sample Prediction**
- Predict loan acceptance for a specific customer profile provided.