Public Opinion Sentiment Analysis of News Trends Using the Random Forest Algorithm

Authors

  • Iqbal Danuraga Universitras Indo Global Mandiri
  • Rudi Heriansyah Universitras Indo Global Mandiri
  • Lastri Widya Astuti Universitras Indo Global Mandiri

DOI:

https://doi.org/10.53697/jkomitek.v5i2.3007

Keywords:

Sentiment Analysis, Machine Learning, Social Media, Opinion Mining, Random Forest

Abstract

The digital era has fundamentally changed news consumption patterns, with social media becoming the primary platform for information access used by 54% of Americans and 44% of Indonesians. This transformation creates significant challenges for researchers and communication practitioners in understanding public sentiment towards news in the digital era. This study aims to analyze public opinion sentiment towards news trends using the Random Forest algorithm. This study uses an experimental quantitative approach to analyze public opinion sentiment towards political news trends using the Random Forest algorithm. The study population consists of Twitter posts discussing political news topics from 2020 to 2025, with a sample of 1000 tweets selected through purposive sampling. The research instruments include hardware (AMD Ryzen 3 processor, 4GB RAM) and software (Python, Google Collaboratory), with data analysis techniques involving comprehensive preprocessing (cleaning, case folding, tokenization, stemming, stopword removal), TF-IDF transformation, and Random Forest implementation. The results show that the Random Forest model achieved an optimal accuracy of 81% at a 90:10 data split, with an accuracy range of 77-81% across various data split scenarios. This study concludes that Random Forest can be effectively implemented as a public sentiment monitoring instrument for governments, media, and public organizations, although larger datasets and multiple social media platforms are needed for better generalization..

References

Aufar, M. (2020). Sentiment Analysis on Youtube Social Media Using Decision Tree and Random Forest Algorithm: A Case Study. 2020 International Conference on Data Science and Its Applications Icodsa 2020, https://doi.org/10.1109/ICoDSA50139.2020.9213078

Campbell, S. W. (2025). Social (media) psychology of the "news-finds-me" perception. Journal of Computer-Mediated Communication, 30(5), zmaf010.https://doi.org/10.1093/jcmc/zmaf010

Chen, T. (2021). Monitoring and recognizing enterprise public opinion from high-risk users based on user portrait and random forest algorithm. Axioms, 10(2), ISSN 2075-1680, https://doi.org/10.3390/axioms10020106

Creswell, J. W., & Creswell, J. D. (2023). Research design: Qualitative, quantitative, and mixed methods approaches (6th ed.). SAGE Publications.

Digital News Report. (2025). Reuters Institute Digital News Report 2025. Reuters Institute for the Study of Journalism, University of Oxford.

Emzir. (2012). Educational research methodology: Quantitative and qualitative (Revised Edition). Rajawali Pers.

Firdaus, AA, Berlilana, & Tahyudin, I. (2024). Application of sentiment analysis as an innovative approach to policy making: A review. Journal of Research and Application of Informatics Students, 5(6), 813-820.

Hadi, W., Putra, TD, & Oktafiani, D. (2025). Sentiment analysis of Lazada Indonesia product reviews using Random Forest Classifier. Innovative: Journal Of Social Science Research, 5(1), 2348-2357.

Jumaryadi, Y., Meiyanti, R., Fajriah, R., Mahsyar, AN, & Anggraeni, PS (2025). Implementation of the Random Forest algorithm for sentiment analysis of user reviews of the Merdeka Mengajar application. Bulletin of Computer Science Research, 5(4), 813-820.

Kim, R. M., & Anderson, A. (2025). The agenda-setting function of social media. In Proceedings of the ACM Web Conference 2025 (WWW '25), April 28-May 2, 2025, Sydney, NSW, Australia.

Muliana, AS, Ramadhan, S., & Pratama, D. (2024). Analysis of public sentiment on election results using Naïve Bayes to social media data from Indonesian netizens. Journal of Applied Data Sciences, 5(2), 145-156.

Musthafa, A., Berlilana, & Tahyudin, I. (2025). Utilization of machine learning in analyzing sentiment towards the TAPERA program on the digital platform X. MALCOM: Indonesian Journal of Machine Learning and Computer Science, 5(2), 456-467.

Natarajan, R. (2022). Intelligent gravitational search random forest algorithm for fake news detection. International Journal of Modern Physics C, 33(6), ISSN 0129-1831, https://doi.org/10.1142/S012918312250084X

Pratama, MRS (2025). Sentiment analysis on Twitter social media regarding law enforcement in Indonesia in 2024 using the Support Vector Machine (SVM) method. Global Research and Innovation Journal, 1(3), 43-51.

Risnanda, R., Alfifa, AN, & Wibowo, S. (2025). The role of mass media in shaping public opinion through the hashtag phenomenon #kaburajadulu. Journal of Education and Teaching Review, 8(2), 5201-5215.

Samsir, S., Ritonga, WA, Aditya, R., & Watrianthos, R. (2024). Machine learning-driven sentiment analysis of social media data in the 2024 US Presidential Race. Bulletin of Information Technology, 5(4), 326-332.

Semary, N.A., Fadl, A., Essa, E., & Gad, A.G. (2024). Enhancing machine learning-based sentiment analysis through advanced feature extraction methods. PLOS ONE, 19(2), e0294968.https://doi.org/10.1371/journal.pone.0294968

Sihombing, E., Nasution, H., & Siregar, I. (2024). Comparison of machine learning algorithms in public sentiment analysis: A case study of 2024 Indonesian presidential election. International Journal of Science, Technology & Management, 5(5), 1408-1418.

Sudaryono. (2021). Quantitative, qualitative, and mixed method research methodology (4th Edition). Rajawali Pers.

Sugiyono. (2021). Quantitative, qualitative, and R&D research methods (2nd Edition, 3rd Printing). Alfabeta.

Tahyudin, I., Berlilana, & Prastyo, PA (2024). Sentiment analysis of Indonesian ministries' social media. Jurnal Sosioteknologi, 23(2), 287-302.

Downloads

Published

2025-09-23

How to Cite

Danuraga, I., Heriansyah, R., & Astuti, L. (2025). Public Opinion Sentiment Analysis of News Trends Using the Random Forest Algorithm. Jurnal Komputer, Informasi Dan Teknologi, 5(2), 20. https://doi.org/10.53697/jkomitek.v5i2.3007

Issue

Section

Articles

Similar Articles

<< < 2 3 4 5 6 7 8 9 10 11 > >> 

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