Bukit, M Iqbal Fahilla
Unknown Affiliation

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Comparison of KNN and SVM Performance in 2024 Election Results Sentiment Analysis Bukit, M Iqbal Fahilla; Lubis, Andre Hasudungan
Journal of Artificial Intelligence and Software Engineering Vol 5, No 3 (2025): September
Publisher : Politeknik Negeri Lhokseumawe

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.30811/jaise.v5i3.7659

Abstract

This study compares the performance of the K-Nearest Neighbor (KNN) and Support Vector Machine (SVM) algorithms in sentiment analysis related to the 2024 election results using data from social media. The dataset used consists of 506 public opinion entries categorized into three sentiment labels: positive, negative, and neutral. The data processing involved preprocessing steps such as case folding, tokenization, stopword removal, and stemming, then represented using the Term Frequency–Inverse Document Frequency (TF-IDF) method. The test results showed that both algorithms were able to classify with an accuracy of over 70%. The KNN algorithm produced an accuracy of 75.49%, precision of 71.36%, recall of 75.49%, and an F1-score of 72.88%, while the SVM algorithm showed slightly better performance with an accuracy of 77.45%, precision of 70.59%, recall of 77.45%, and F1-score of 72.15%. Based on the confusion matrix analysis, both models have a high ability to classify positive sentiments, but still face obstacles in recognizing negative and neutral sentiments due to the imbalance in data distribution. Overall, this study indicates that SVM is more suitable for election sentiment analysis on high-dimensional text data.