Optimization of the K-Nearest Neighbors (KNN) Algorithm in Imbalanced Dataset Classification Using the SMOTE Technique

The naturalization of players for Indonesia's national football team has sparked diverse reactions on Twitter, ranging from support to opposition. This situation poses challenges for sentiment analysis, particularly in interpreting public opinion on the policy. A significant challenge arises from the imbalance in sentiment classes, with neutral sentiments outweighing positive and negative ones. This research investigates the effect of class imbalance on sentiment analysis accuracy by employing the KNN algorithm enhanced with the SMOTE technique. A quantitative approach is used, adopting an experimental method aligned with the KDD process stages. The findings reveal that the KNN algorithm without SMOTE achieved an accuracy of 54.77%, with a Precision of 0.65, Recall of 0.57, and F1-Score of 0.44. However, integrating SMOTE with the KNN algorithm significantly improved the outcomes, boosting accuracy to 81.49%, with a Precision of 0.87, Recall of 0.80, and F1-Score of 0.80. These results demonstrate that oversampling techniques like SMOTE are highly effective in mitigating class imbalance and enhancing classification performance, especially for underrepresented classes. This study underscores the efficacy of SMOTE as a solution for addressing class imbalance in sentiment analysis tasks.

Authors

Institutions

Publication Details

Journal
Journal of Artificial Intelligence and Engineering Applications (JAIEA)
Published
2025-02-15
DOI
https://doi.org/10.59934/jaiea.v4i2.756
Citations
1
Primary Topic
Data Mining and Machine Learning Applications
Type
article
Field-Weighted Citation Impact
3.25
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Optimization of the K-Nearest Neighbors (KNN) Algorithm in Imbalanced Dataset Classification Using the SMOTE Technique

Ahmad Faqih, Kaslani, Aulia Risyda Fauzi
1 citations
Journal of Artificial Intelligence and Engineering Applications (JAIEA)
Data Mining and Machine Learning Applications
3.25
article

Optimization of the K-Nearest Neighbors (KNN) Algorithm in Imbalanced Dataset Classification Using the SMOTE Technique

Ahmad Faqih, Kaslani, Aulia Risyda Fauzi
article en
1 citations

Abstract

The naturalization of players for Indonesia's national football team has sparked diverse reactions on Twitter, ranging from support to opposition. This situation poses challenges for sentiment analysis, particularly in interpreting public opinion on the policy. A significant challenge arises from the imbalance in sentiment classes, with neutral sentiments outweighing positive and negative ones. This research investigates the effect of class imbalance on sentiment analysis accuracy by employing the KNN algorithm enhanced with the SMOTE technique. A quantitative approach is used, adopting an experimental method aligned with the KDD process stages. The findings reveal that the KNN algorithm without SMOTE achieved an accuracy of 54.77%, with a Precision of 0.65, Recall of 0.57, and F1-Score of 0.44. However, integrating SMOTE with the KNN algorithm significantly improved the outcomes, boosting accuracy to 81.49%, with a Precision of 0.87, Recall of 0.80, and F1-Score of 0.80. These results demonstrate that oversampling techniques like SMOTE are highly effective in mitigating class imbalance and enhancing classification performance, especially for underrepresented classes. This study underscores the efficacy of SMOTE as a solution for addressing class imbalance in sentiment analysis tasks.

Journal of Artificial Intelligence and Engineering Applications (JAIEA)Vol. 4(2)
Institute of Biology of Komi Scientific Centre (RU)
Peace, Justice and strong institutions
Openalex Percentile: Top 11%
Data Mining and Machine Learning Applications
3.25
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.