A Sentiment Analysis of Public Perception Toward Pets in Public Spaces Using Logistic Regression and Word Embedding

Authors

  • Dennita Noor Febianty University Amikom Yogyakarta
  • Majid Rahardi University Amikom Yogyakarta

DOI:

https://doi.org/10.30871/jaic.v9i4.10245

Keywords:

Logistic Regression, Pet in Public Space, Sentiment Analysis, Word Embeddings

Abstract

Addressing the complex social debate over pets in public areas, this study assesses public sentiment by analyzing a dataset of YouTube comments. We employed a machine learning pipeline beginning with data collection via the YouTube API, followed by rigorous text preprocessing and SMOTE-based class balancing for the training data. For classification, a Logistic Regression model was trained on contextual features generated by Word Embeddings (Word2Vec) and optimized through hyperparameter tuning. The final model proved highly effective, yielding a test accuracy of 92.74% with F1-scores of 0.84 for the negative class and 0.95 for the positive class. Ultimately, this research establishes an effective approach to measuring public opinion on social issues in Indonesia, providing actionable insights for public space administrators and policymakers.

Downloads

Download data is not yet available.

References

[1] A. A. B. B. Anggawirya, C. I. A. C. Utari, and I. P. A. J. Wiguna, “Ketidaktaatan Terhadap Penggunaan Ruang Publik Ditinjau dari Theory of Planned Behavior (ToPB) di Kota Denpasar. Studi Kasus : Taman Kota Lumintang,” J. Arsit. Lansek., vol. 10, no. 1, p. 133, 2024, doi: 10.24843/jal.2024.v10.i01.p15.

[2] C. Andrew, A. Budiyantara, and I. Lewenusa, “Analisis Sentimen Komentar Pengguna YouTube Untuk Ponsel Di Indonesua Berbasis Web,” Sci. J. Ilm. Sains dan Teknol., vol. 3 No. 2, pp. 175–188, 2024, [Online]. Available: https://jurnal.kolibi.org/index.php/scientica/article/view/4212

[3] F. Aprilia, R. A. Anggraini, and Y. D. Putri, “Prediksi Kelulusan Siswa dengan Algoritma Pembelajaran Mesin: Aplikasi Regresi Linear dan Logistik pada Faktor-Faktor Pendidikan,” ROUTERS J. Sist. dan Teknol. Inf., vol. 3, no. 1, pp. 55–64, 2025, doi: 10.25181/rt.v3i1.3897.

[4] T. Mikolov, K. Chen, G. Corrado, and J. Dean, “Efficient estimation of word representations in vector space,” 1st Int. Conf. Learn. Represent. ICLR 2013 - Work. Track Proc., pp. 1–12, 2013.

[5] M. F. Yulianto, F. M. Hana, and A. Prihandono, “Penerapan Algoritma Naïve Bayes dalam Analisis Sentimen terhadap Mobil Listrik,” vol. 22, no. 1, pp. 109–115, 2025, doi: 10.47065/bit.v5i2.2029.

[6] T. Muhayat, A. Fauzi, and J. Indra, “Analisis Sentimen Terhadap Komentar Video Youtube Menggunakan Support Vector Machines,” Progresif J. Ilm. Komput., vol. 19, no. 1, p. 231, Feb. 2023, doi: 10.35889/progresif.v19i1.1060.

[7] I. Yanti and E. Utami, “Sentiment Analysis Of Indonesia ’ S Capital Relocation Using Word2vec And Long Short-Term Memory Method Analisis Sentimen Pemindahan Ibu Kota Indonesia Menggunakan Word Embedding Word2vec Dan Metode Long Short-Term,” J. Tek. Inform., vol. 6, no. 1, pp. 149–157, 2025, doi: https://doi.org/10.52436/1.jutif.2025.6.1.2712.

[8] S. Al-Saqqa and A. Awajan, “The Use of Word2vec Model in Sentiment Analysis,” in Proceedings of the 2019 International Conference on Artificial Intelligence, Robotics and Control, New York, NY, USA: ACM, Dec. 2019, pp. 39–43. doi: 10.1145/3388218.3388229.

[9] Badriyah, T. Chamidy, and Suhartono, “Application of SMOTE in Sentiment Analysis of MyXL User Reviews on Google Play Store,” JISKA (Jurnal Inform. Sunan Kalijaga), vol. 10, no. 1, pp. 74–86, Jan. 2025, doi: 10.14421/jiska.2025.10.1.74-86.

[10] F. M. Syah Putra, S. Rakasiwi, and N. Ariyanto, “Twitter Sentiment Classification towards Telecommunication Provider Users in Indonesia,” J. Appl. Informatics Comput., vol. 9, no. 2, pp. 314–321, 2025, doi: 10.30871/jaic.v9i2.9143.

[11] A. A. Syam, G. Hardy M, A. Salim, D. F. Surianto, and M. Fajar B, “Analisis Teknik Preprocessing Pada Sentimen Masyarakat Terkait Konflik Israel-Palestina Menggunakan Support Vector Machine,” JIPI (Jurnal Ilm. Penelit. dan Pembelajaran Inform., vol. 9, no. 3, pp. 1464–1472, 2024, doi: 10.29100/jipi.v9i3.5527.

[12] M. U. Albab, Y. K. P., and M. N. Fawaiq, “Optimization of the Stemming Technique on Text Preprocessing President 3 Periods Topic,” J. Transform., vol. 20, no. 2, pp. 1–12, 2023, doi: 10.26623/transformatika.v20i2.5374.

[13] S. Firman Sodiq, W. Desena, and A. Wibowo, “Penerapan Algoritma Stemming Nazief & Adriani Pada Proses Klasterisasi Berita Berdasarkan Tematik Pada Laman (Web) Direktorat Jenderal HAM Menggunakan Rapidminer,” Syntax J. Inform., vol. 11, no. 02, pp. 10–21, 2022, doi: 10.35706/syji.v11i02.7192.

[14] S. J. Angelina, A. Bijaksana, P. Negara, and H. Muhardi, “Analisis Pengaruh Penerapan Stopword Removal Pada Performa Klasifikasi Sentimen Tweet Bahasa Indonesia,” JUARA (Jurnal Apl. dan Ris. Inform., vol. 02, no. 1, pp. 165–173, 2023, doi: 10.26418/juara.v2i1.69680.

[15] L. Ardiani, H. Sujaini, and T. Tursina, “Implementasi Sentiment Analysis Tanggapan Masyarakat Terhadap Pembangunan di Kota Pontianak,” J. Sist. dan Teknol. Inf., vol. 8, no. 2, p. 183, 2020, doi: 10.26418/justin.v8i2.36776.

[16] M. Z. P. Anugrah, M. F. A. , Muhammad Lutfi, and A. P. S. Mahri, “Sistem Analisis Sentimen Ulasan Produk Berbahasa Indonesia Menggunakan Metode Lexicon Dengan Visualisasi Interaktif,” Kohesi J. Multidisiplin Saintek, vol. 8, no. No 12, 2025.

[17] I. K. Dharmendra, I. M. Agus, W. Putra, and Y. P. Atmojo, “Evaluasi Efektivitas SMOTE dan Random Under Sampling pada Klasifikasi Emosi Tweet,” Informatics Educ. Prof. J. Informatics, vol. 9, no. 2, pp. 192–193, 2024.

[18] N. L. P. C. Savitri, R. A. Rahman, R. Venyutzky, and N. A. Rakhmawati, “Analisis Klasifikasi Sentimen Terhadap Sekolah Daring pada Twitter Menggunakan Supervised Machine Learning,” J. Tek. Inform. dan Sist. Inf., vol. 7, no. 1, Apr. 2021, doi: 10.28932/jutisi.v7i1.3216.

[19] J. Informatika, F. Sains, U. Jenderal, and A. Yani, “Klasifikasi Cuaca Jawa Barat menggunakan Ensemble Learning pada Data Meteorologi Weather Classification in West Java using Ensemble Learning on,” vol. 14, pp. 2028–2044, 2025.

[20] R. L. Atimi and Enda Esyudha Pratama, “Implementasi Model Klasifikasi Sentimen Pada Review Produk Lazada Indonesia,” J. Sains dan Inform., vol. 8, no. 1, pp. 88–96, 2022, doi: 10.34128/jsi.v8i1.419.

[21] A. I. Kamil, O. N. Pratiwi, and D. Witarsyah, “Analisis Sentimen dan Pemodelan Topik terhadap Aplikasi Pembelajaran Online pada Platform Google Play,” JIPI (Jurnal Ilm. Penelit. dan Pembelajaran Inform., vol. 10, no. 2, pp. 836–849, 2025, doi: 10.29100/jipi.v10i2.6023.

[22] A. A. Aliero, B. S. Adebayo, H. O. Aliyu, A. G. Tafida, B. U. Kangiwa, and N. M. Dankolo, “Systematic Review on Text Normalization Techniques and its Approach to Non-Standard Words,” Int. J. Comput. Appl., vol. 185, no. 33, pp. 44–55, 2023, doi: 10.5120/ijca2023923106.

Downloads

Published

2025-08-08

How to Cite

[1]
D. N. Febianty and M. Rahardi, “A Sentiment Analysis of Public Perception Toward Pets in Public Spaces Using Logistic Regression and Word Embedding”, JAIC, vol. 9, no. 4, pp. 1846–1851, Aug. 2025.

Issue

Section

Articles

Most read articles by the same author(s)

1 2 3 > >> 

Similar Articles

1 2 3 4 5 > >> 

You may also start an advanced similarity search for this article.