Journal Software, Hardware and Information Technology
Vol 5 No 2 (2025)

Perbandingan Kinerja Model Pembelajaran Mesin Random Forest dan K-Nearest Neighbor (KNN) untuk Prediksi Risiko Kredit pada Layanan Pinjaman Online

Prayudani, Santi (Unknown)
Sibarani, Yous (Unknown)
Salam, Azrizal (Unknown)
Lubis, Arif Ridho (Unknown)



Article Info

Publish Date
30 Jun 2025

Abstract

This study aims to compare the performance of two popular machine learning algorithms, Random Forest and K-Nearest Neighbor (KNN), in predicting creditworthiness in online lending systems. The research uses the publicly available Loan Approval Prediction Dataset from Kaggle, which contains borrower profiles such as employment status, number of dependents, annual income, loan amount, loan term, and credit score. Data preprocessing included cleaning, handling missing values, outlier removal, and transformation through normalization and encoding. The dataset was divided into 80% training data and 20% testing data. Random Forest was configured with 100 decision trees and unlimited depth, while KNN used an optimal k value of 5 determined by grid search. Model performance was evaluated using accuracy, precision, recall, and F1-score. The results showed that Random Forest outperformed KNN with consistently higher values (97%) across all metrics, demonstrating strong stability and superior pattern recognition capabilities. KNN, with an accuracy of 89%, still showed good performance and can be considered a lightweight alternative for simpler applications.

Copyrights © 2025






Journal Info

Abbrev

shift

Publisher

Subject

Computer Science & IT

Description

Journal Software, Hardware, and Information Technology (SHIFT) is an academic journal published in January and June by State Islamic University Alauddin of Makassar and managed by Department of Information System, Faculty of Science and Technology. The journal publish scholarly articles on the scope ...