SENTIMENT ANALYSIS OF THREE-PERIOD POLEMICS USING K-NEAREST NEIGHBOR WITH TF-IDF WEIGHTING
Abstract
The issue of changing the presidential term which was originally 2 periods of government into 3 periods raises pros and cons in the community. Many 3-period hashtags have sprung up on social media twitter. So that conducted research on sentiment analysis of presidential election polemics 3 period. The purpose of the study was to produce the value of classification on the issue of presidential election change discourse into 3 periods using the K-NN method and whether the k-NN method proved to be well used for classifying text in the review of presidential election polemics 3 periods. Dataset totaling 1152 data, data is processed using Python and Jupyter Notebook as a text editor. The data is classified into positive reviews and negative reviews, then the data is divided into training data and test data with a ratio of 90:10. Weighting words using TF-IDF and sentiment classification using K-NN method. From the results of classification using the K-NN method obtained the highest accuracy when the value of k=17 and k = 18 with an accuracy of 85.3%. The results of the analysis of public sentiment to review the issue of discourse on the change of presidential term into 3 periods tend to be negative with a percentage of 21.26% positive sentiment and 78.74% negative sentiment.
Downloads
References
Chiny, M., Chihab, M., Chihab, Y., & Bencharef, O. (2021). LSTM, VADER and TF-IDF based Hybrid Sentiment Analysis Model. International Journal of Advanced Computer Science and Applications, 12(7), 265–275. https://doi.org/10.14569/IJACSA.2021.0120730
Darwis, D., Pratiwi, E. S., & Pasaribu, a F. O. (2020). Penerapan Algoritma SVM Untuk Analisis Sentimen Pada Data Twitter Komisi Pemberantasan Korupsi Republik Indonesia. Edutic - Scientific Journal of Informatics Education, 7(1), 1–11. https://doi.org/10.21107/edutic.v7i1.8779
Deviyanto, A., & Wahyudi, M. D. R. (2018). Penerapan Analisis Sentimen Pada Pengguna Twitter Menggunakan Metode K-Nearest Neighbor. JISKA (Jurnal Informatika Sunan Kalijaga), 3(1), 1. https://doi.org/10.14421/jiska.2018.31-01
Duei Putri, D., Nama, G. F., & Sulistiono, W. E. (2022). Analisis Sentimen Kinerja Dewan Perwakilan Rakyat (DPR) Pada Twitter Menggunakan Metode Naive Bayes Classifier. Jurnal Informatika Dan Teknik Elektro Terapan, 10(1), 34–40. https://doi.org/10.23960/jitet.v10i1.2262
Ernawati, S., & Wati, R. (2018). Penerapan Algoritma K-Nearest Neighbors Pada Analisis Sentimen Review Agen Travel. Jurnal Khatulistiwa Informatika, 6(1), 64–69.
Hota, S., & Pathak, S. (2018). KNN classifier based approach for multi-class sentiment analysis of twitter data. International Journal of Engineering and Technology(UAE), 7(3), 1372–1375. https://doi.org/10.14419/ijet.v7i3.12656
Indriati, I., & Ridok, A. (2016). Sentiment Analysis for Review Mobile Applications Using Neighbor Method Weighted K-Nearest Neighbor (Nwknn). Journal of Enviromental Engineering and Sustainable Technology, 3(1), 23–32. https://doi.org/10.21776/ub.jeest.2016.003.01.4
Isnain, A. R., Supriyanto, J., & Kharisma, M. P. (2021). Implementation of K-Nearest Neighbor (K-NN) Algorithm For Public Sentiment Analysis of Online Learning. IJCCS (Indonesian Journal of Computing and Cybernetics Systems), 15(2), 121. https://doi.org/10.22146/ijccs.65176
Liu, M., & Yang, J. (2012). An improvement of TFIDF weighting in text categorization. International Conference on Computer Technology and Science (ICCTS), 47(Iccts), 44–47. https://doi.org/10.7763/IPCSIT.2012.V47.9
Pin, P., Siahaan, J. T. H., Nellya, B., & Bangun, M. (2021). Presiden Indonesia Tiga Periode. Jurnal Darma Agung, 29(2), 267–272.
Puspita, R., & Widodo, A. (2021). Perbandingan Metode KNN, Decision Tree, dan Naïve Bayes Terhadap Analisis Sentimen Pengguna Layanan BPJS. Jurnal Informatika Universitas Pamulang, 5(4), 646. https://doi.org/10.32493/informatika.v5i4.7622
Rauf, M. A. A., & Rado, R. H. (2022). Menakar Peluang Masa Jabatan Presiden 3 Periode Dalam Konfigurasi Politik Hukum. Al-Adalah : Jurnal Hukum Dan Politik Islam, 7, 30–47.
Septian, J. A., Fahrudin, T. M., & Nugroho, A. (2019). Analisis Sentimen Pengguna Twitter TerhadapPolemik PersepakbolaanIndonesiaMenggunakanPembobotan TF-IDF dan K-Nearest Neighbor. Journal of Intelligent Systems and Computation, 43–49. https://t.co/9WloaWpfD5
Tri Romadloni, N., Santoso, I., & Budilaksono, S. (2019). Perbandingan Metode Naive Bayes, KNN, dan Decision Tree Terhadap Analisis Sentimen Transportasi KRL Commuter Line. Jurnal IKRA-ITH Informatika, 3(2), 1–9.


Copyright (c) 2022 Siti Ernawati, Risa Wati

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
An author who publishes in the Jurnal Riset Informatika agrees to the following terms:
- The author retains the copyright and grants the journal the right of first publication of the work simultaneously licensed under the Creative Commons Attribution-NonCommercial 4.0 License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal
- The author is permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) before and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of the published work (See The Effect of Open Access).
Read more about the Creative Commons Attribution-NonCommercial 4.0 Licence here: https://creativecommons.org/licenses/by-nc/4.0/.