Scientific Journal of Informatics
Vol. 10 No. 2 (2025): Jurnal Ilmiah Informatika

PERBANDINGAN ALGORITMA K-NEAREST NEIGHBOUR DAN NAÏVE BAYES UNTUK MENDETEKSI PENIPUAN KARTU KREDIT

Fauzan Firdaus (Universitas Ibrahimy Sukorejo)
Ahmad Homaidi (Universitas Ibrahimy)
Jarot Dwi Prasetyo (Universitas Ibrahimy)
Hermanto Hermanto (Universitas Ibrahimy)
Ach. Zubairi (Universitas Ibrahimy)
Lukman Fakih Lidimilah (Universitas Ibrahimy)



Article Info

Publish Date
14 Jan 2026

Abstract

Credit card fraud is a serious problem in the financial industry that continues to increase with the development of digital transaction technology. This study aims to compare the performance of the K-Nearest Neighbour (KNN) and Naive Bayes algorithms in detecting credit card fraud by considering various evaluation metrics evaluation metrics, including not only accuracy but also precision, recall, and F1-score. The dataset used was sourced from Kaggle, comprising a total of 10,000 transaction records, which included financial transaction attributes and user behaviour. The research process included data pre-processing, attribute selection, data normalisation, and the application of both algorithms using RapidMiner software. The test results showed that the KNN algorithm produced an accuracy of 98.43%, a precision of 98.53%, and a recall of 99.90%, while Naive Bayes obtained an accuracy 98.20% accuracy, 99.69% precision, and 98.48% recall. Although KNN showed slightly superior performance in detecting fraudulent transactions, the T-Test statistical test showed that the difference in performance between the two algorithms was not statistically significant. KNN has an advantage in recognising complex patterns, but requires greater computational time, while Naive Bayes is more efficient in terms of speed. This study concludes that the selection of a fraud detection algorithm needs to consider the trade-off between accuracy and computational efficiency according to system requirements.

Copyrights © 2025






Journal Info

Abbrev

JIMI

Publisher

Subject

Computer Science & IT

Description

Topics cover the following areas (but are not limited to): 1. Information Technology (IT) a. Software engineering b. Game c. Information Retrieval d. Computer network e. Telecommunication f. Internet g. Wireless technology h. Network security i. Multimedia technology j. Mobile Computing k. ...