Jurnal Algoritma
Vol 23 No 1 (2026): Jurnal Algoritma

Naïve Bayes Berbasis TF-IDF Meningkatkan Kinerja Klasifikasi Berita Hoaks Program Makan Bergizi Gratis

Putri Wulandari (Universitas Ngudi Waluyo)
Kustiyono (Universitas Ngudi Waluyo)



Article Info

Publish Date
15 Jun 2026

Abstract

The rapid advancement of information technology has led to an increase in the spread of fake news in digital media, which has the potential to influence public opinion; therefore, an automated system is needed to distinguish between fake news and facts. This study aims to classify fake news and facts using a text mining approach with the TF-IDF method for feature extraction and the K-Nearest Neighbor (KNN) and Naïve Bayes algorithms as classification methods. The dataset consists of 1,121 news items obtained from text sources, which underwent preprocessing, word weighting using TF-IDF, and handling of data imbalance using the Synthetic Minority Oversampling Technique (SMOTE), applied to the training data during the cross-validation process to prevent data leakage. Model evaluation was conducted using the metrics accuracy, precision, recall, and F1-score. The results of the study show that the Naïve Bayes algorithm outperforms KNN with an accuracy of 95.74%, precision of 94.98%, recall of 95.23%, and an F1-score of 95.10%, while KNN achieved an accuracy of 48.97%, precision of 68.59%, recall of 62.46%, and an F1-score of 65.32%. Based on these results, it can be concluded that Naïve Bayes is more effective and stable in classifying hoax and factual news based on TF-IDF representation.

Copyrights © 2026






Journal Info

Abbrev

algoritma

Publisher

Subject

Computer Science & IT

Description

Jurnal Algoritma merupakan jurnal yang digunakan untuk mempublikasikan hasil penelitian dalam bidang Teknologi Informasi (TI), Sistem Informasi (SI), dan Rekayasa Perangkat Lunak (RPL), Multimedia (MM), dan Ilmu Komputer (Computer ...