Klasifikasi Tingkat Stress dari Data Berbentuk Teks dengan Menggunakan Algoritma Support Vector Machine (SVM) dan Random Forest

Penulis

  • Naufal Fathirachman Mahing Universitas Brawijaya, Malang
  • Alifi Lazuardi Gunawan Universitas Brawijaya, Malang
  • Ahmad Foresta Azhar Zen Universitas Brawijaya, Malang
  • Fitra Abdurrachman Bachtiar Universitas Brawijaya, Malang
  • Satrio Agung Wicaksono Universitas Brawijaya, Malang

DOI:

https://doi.org/10.25126/jtiik.1078010

Kata Kunci:

stres, SVM, random forest, klasifikasi teks, word affect intensities

Abstrak

Stres merupakan keadaan dimana seseorang merasakan adanya tekanan yang berlebih pada dirinya. Pemantauan tingkat stres menjadi hal yang penting bagi manusia. Tingkat stres yang tinggi dapat menimbulkan dampak negatif terhadap kesehatan manusia. Deteksi dini stres menjadi sesuatu yang sangat penting untuk dilakukan. Salah satu cara mengetahui tingkat stres seseorang adalah melalui analisis teks. Penelitian ini dilakukan untuk melakukan klasifikasi tingkat stres berdasarkan data berupa teks menggunakan algoritma Support Vector Machine (SVM) dan Random Forest. Pada penelitian ini melakukan perbandingan beberapa metode transformasi. Transformasi yang dilakukan pada penelitian ini menggunakan TF-IDF, CountVectorizer, NRCLex, dan Word Affect Intensities. Data yang digunakan dalam penelitian ini berupa sebuat teks berbahasa Inggris yang diambil dari media sosial Twitter. Total data yang digunakan yaitu 8439 data. Pelatihan model baik untuk Support Vector Machine dan Random Forest menggunakan 6751 data. Sedangkan untuk pengujian menggunakan 1688 data. Hasil penelitian menunjukkan bahwa algoritma SVM dengan pembobotan menggunakan TF-IDF memiliki performa yang paling baik dibandingkan dengan algoritma Random Forest dan metode transformasi lainnya yang digunakan dalam penelitian. Model algoritma SVM dengan transformasi TF-IDF yang dibangun berhasil mendapatkan akurasi sebesar 84%. Model ini mendapatkan akurasi yang lebih tinggi dibanding model Random Forest yang memperoleh akurasi tinggi sebesar 80% dengan menggunakan transformasi CountVectorizer.

 

Abstract

Stress is a condition where a person feels excessive pressure on himself. Monitoring stress levels is important for humans. High levels of stress can have a negative impact on human health. Early detection of stress is something that is very important to do. One way to find out someone's stress level is through text analysis.This research was conducted to classify stress levels based on text data using the Support Vector Machine (SVM) and Random Forest algorithms. This research compares several transformation methods. The transformation performed in this study uses TF-IDF, CountVectorizer, NRCLex, and Word Affect Intensities. The data used in this research is an English text taken from Twitter social media. The total data used is 8439 data. Model training for both Support Vector Machine and Random Forest uses 6751 data. While for testing using 1688 data. The results showed that the SVM algorithm with weighting using TF-IDF had the best performance compared to the Random Forest algorithm and other transformation methods used in the study. The SVM algorithm model with TF-IDF transformation that was built managed to get an accuracy of 84%. This model obtained a higher accuracy than the Random Forest model which obtained a high accuracy of 80% using the CountVectorizer transformation.

Downloads

Download data is not yet available.

Referensi

BIAU, G. & SCORNET, E., 2016. A Random Forest Guided Tour. TEST, p. 197–227.

HASTIE, T., TIBSHIRANI, R. & FRIEDMAN, J. H., 2009. The Elements Of Statistical Learning: Data Mining, Inference, and Prediction. New York, Springer series in statistics.

JADHAV, S. et al., 2019. Text Based Stress Detection Techniques Analysis Using Social Media. 5th International Conference On Computing, Communication, Control And Automation (ICCUBEA), pp. 1-5.

KWOK, T.-Y., 1996. Automatic Text Categorization Using Support Vector Machine. s.l., s.n.

LIAW, A. AND WIENER, M., 2002. Classification and Regression by Random Forest. The Newsletter of the R Project, 2, pp.18–22.

MUÑOZ, S. & IGLESIAS, C. A., 2022. A text classification approach to detect psychological stress combining a lexicon-based feature framework with distributional representations. Information Processing & Managemen, 59(5).

N, V. VAPNIK, 1995. The Nature of Statistical Learning Theory. New York: Springer Verlag.

NIJHAWAN, T., ATTIGERI, G. & ANANTHAKRISHNA, T., 2022. Stress Detection Using Natural Language Processing and Machine Learning Over Social Interactions. Journal of Big Data, IX(1), p. 33.

NUGROHO, A. S., WITARTO, A. B. & HANDOKO, D., 2003. Support Vector Machine, Teori dan Aplikasinya dalam Bioinformatika1. [Online].

PERANGIN-ANGIN, D.J. & BACHTIAR, F.A., 2021. Classification of Stress in Office Work Activities Using Extreme Learning Machine Algorithm and One-way ANOVA F-Test Feature Selection. 2021 4th International Seminar on Research of Information Technology and Intelligent Systems, ISRITI 2021, pp.503–508. https://doi.org/10.1109/ISRITI54043.2021.9702802.

PILLAI, R. G., THELWALL, M. & ORASAN, C., 2018. Detection of Stress and Relaxation Magnitudes for Tweets. Republic and Canton of Geneva, CHE: International World Wide Web Conferences Steering Committee, p. 1677–1684.

RASTOGI, A., LIU, Q. & CAMBRIA, E., 2022. Stress detection from social media articles: New dataset benchmark and analytical study. 2022 International Joint Conference on Neural Networks (IJCNN). IEEE. pp.1–8.

RISA, D.F., PRADANA, F. AND BACHTIAR, F.A., 2021. Implementasi Metode Naive Bayes untuk Mendeteksi Stres Siswa Berdasarkan Tweet pada Sistem Monitoring Stres. Jurnal Teknologi Informasi dan Ilmu Komputer (JTIIK), 8(6).

SAPUTRA, R., ISTANTO, H., BACHTIAR, F. A., RIDOK, A., (2022). Pengaruh Word Affect Intensities Terhadap Deteksi Ulasan Palsu. Jurnal Teknologi Informasi Dan Ilmu Komputer, 9(2), 427–434. https://doi.org/10.25126/JTIIK.2022925652

STRIMPEL, O. B. R., 1997. Computer graphics. McGraw-Hill Encyclopedia of Science and Technology, Volume IV, pp. 279-283.

Diterbitkan

29-12-2023

Cara Mengutip

Klasifikasi Tingkat Stress dari Data Berbentuk Teks dengan Menggunakan Algoritma Support Vector Machine (SVM) dan Random Forest. (2023). Jurnal Teknologi Informasi Dan Ilmu Komputer, 10(7), 1527-1536. https://doi.org/10.25126/jtiik.1078010