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