Inspiration: Jurnal Teknologi Informasi dan Komunikasi
Vol. 15 No. 2 (2025): Inspiration: Jurnal Teknologi Informasi dan Komunikasi

COMPARISON OF RANDOM FOREST AND K-NEAREST NEIGHBOR ALGORITHMS FOR PREDICTION OF CUSTOMER CREDIT RISK BASED ON TRANSACTION HISTORY AND INCOME

Harefa, Kecitaan Harefa (Unknown)



Article Info

Publish Date
29 Dec 2025

Abstract

The increase in the number of credit applications requires financial institutions to have an accurate risk assessment system in order to minimize the potential for bad loans. The main problem that often arises is the difficulty in objectively assessing the level of customer risk based on varied transaction history and income data. To overcome this, this study compared two classification algorithms in machine learning, namely Random Forest and K-Nearest Neighbor (KNN), to predict customer credit risk. The goal is to determine the algorithm that provides the best level of prediction accuracy and stability. The research method includes data collection from the credit risk dataset, the pre-processing stage (data cleaning, encoding, and normalization), the separation of the data into training and testing sets, then model training using both algorithms. Evaluations were conducted based on accuracy, precision, recall, F1-score, and ROC-AUC metrics. The test results showed that the Random Forest algorithm provided superior performance to KNN, with an accuracy rate of around 90%, while KNN only reached around 84%. This shows that Random Forest is more effective at handling data with complex and non-linear variables. In conclusion, the use of the Random Forest method can be the optimal solution for financial institutions in identifying customers' credit risks more accurately and efficiently.

Copyrights © 2025






Journal Info

Abbrev

inspiration

Publisher

Subject

Computer Science & IT

Description

Inspiration: Jurnal Teknologi Informasi dan Komunikasi is a scientific journal that publishes research results in the field of Information and Communication Technology (ICT). The ICT research area that is the focus of this journal can be seen on the Focus and Scope page. Journals are published twice ...