Analisis Sentimen Pengguna Twitter Terhadap Bus Listrik Menggunakan Naïve Bayes
DOI:
https://doi.org/10.30865/mib.v8i2.7030Keywords:
Sentiment Analysis, Twitter, Electric Bus, Naïve Bayes, HyperparametersAbstract
Twitter sentiment analysis is one method of identifying and classifying opinions into positive or negative sentiment in tweets. One of the topics that is being widely discussed on Twitter and has received various opinions for and against is electric buses. All of these opinions are still random and their sentiments have not been classified so sentiment classification needs to be carried out.Naïve Bayes can be used to classify sentiment and is easy to implement. The aim of this research is to classify whether sentiment regarding electric buses leads to positive sentiment or negative sentiment using Naïve Bayes and calculate the accuracy obtained. Several steps were taken, namely data collection, preprocessing, lexicon labeling, word weighting, naïve Bayes classification, and confusion matrix evaluation. The results of this stage from 4 trials of different data sharing ratios showed that the highest sentiment was positive sentiment which reached 77.31% with 22.69% negative sentiment at a data sharing ratio of 6:4 with the evaluation results using the confusion matrix obtaining an accuracy of 74.4%. After naïve Bayes was optimized with hyperparameter tuning, the accuracy increased to 78%. At a data sharing ratio of 9:1, the accuracy obtained after optimization shows a decrease to 71.5%, whereas initially Naïve Bayes obtained an accuracy of 75.6%, this shows that the data split ratio can influence the accuracy obtained by the classification model.References
R. Z. Akbar, I. Haryanto, dan G. D. Haryadi, “ANALISIS STABILITAS BELOK BUS LISTRIK MEDIUM DENGAN VARIASI KECEPATAN DAN KONDISI JALAN,†J. Tek. MESIN, vol. 9, no. 2, Art. no. 2, Apr 2021.
W. Y. UTOMO, “ANALISIS RISIKO BAHAYA BUS LISTRIK TERHADAP PENGGUNA JALAN (STUDI KASUS BUS LISTRIK TRANSJAKARTA),†diploma, POLITEKNIK KESELAMATAN TRANSPORTASI JALAN, 2022. [Daring]. Tersedia pada: http://eprints.pktj.ac.id/531/
N. R. Indraswari dan Y. I. Kurniawan, “APLIKASI PREDIKSI USIA KELAHIRAN DENGAN METODE NAIVE BAYES,†Simetris J. Tek. Mesin Elektro Dan Ilmu Komput., vol. 9, no. 1, Art. no. 1, Apr 2018, doi: 10.24176/simet.v9i1.1827.
F. S. Pattiiha dan H. Hendry, “Perbandingan Metode K-NN, Naïve Bayes, Decision Tree untuk Analisis Sentimen Tweet Twitter Terkait Opini Terhadap PT PAL Indonesia,†JURIKOM J. Ris. Komput., vol. 9, no. 2, Art. no. 2, Apr 2022, doi: 10.30865/jurikom.v9i2.4016.
A. Santoso, A. Nugroho, dan A. S. Sunge, “Analisis Sentimen Tentang Mobil Listrik Dengan Metode Support Vector Machine Dan Feature Selection Particle Swarm Optimization,†J. Pract. Comput. Sci., vol. 2, no. 1, hlm. 24–31, Jul 2022, doi: 10.37366/jpcs.v2i1.1084.
D. Darwis, N. Siskawati, dan Z. Abidin, “PENERAPAN ALGORITMA NAIVE BAYES UNTUK ANALISIS SENTIMEN REVIEW DATA TWITTER BMKG NASIONAL,†J. Tekno Kompak, vol. 15, no. 1, Art. no. 1, Feb 2021, doi: 10.33365/jtk.v15i1.744.
R. Azhar, A. Surahman, dan C. Juliane, “Analisis Sentimen Terhadap Cryptocurrency Berbasis Python TextBlob Menggunakan Algoritma Naïve Bayes,†J-SAKTI J. Sains Komput. Dan Inform., vol. 6, no. 1, Art. no. 1, Mar 2022.
I. B. G. Sarasvananda, D. Selivan, M. L. Radhitya, dan I. N. T. A. Putra, “Analisis Sentimen Pada Pembelajaran Daring Di Indonesia Melalui Twitter Menggunakan Naïve Bayes Classifier,†SINTECH Sci. Inf. Technol. J., vol. 5, no. 2, hlm. 227–233, Okt 2022, doi: 10.31598/sintechjournal.v5i2.1241.
J. A. Nurcahyo dan T. B. Sasongko, “Hyperparameter Tuning Algoritma Supervised Learning untuk Klasifikasi Keluarga Penerima Bantuan Pangan Beras,†Indones. J. Comput. Sci., vol. 12, no. 3, Art. no. 3, Jul 2023, doi: 10.33022/ijcs.v12i3.3254.
I. Priyadarshini dan C. Cotton, “A novel LSTM–CNN–grid search-based deep neural network for sentiment analysis,†J. Supercomput., vol. 77, no. 12, hlm. 13911–13932, Des 2021, doi: 10.1007/s11227-021-03838-w.
Z. M. E. Darmawan dan A. F. Dianta, “Implementasi Optimasi Hyperparameter GridSearchCV Pada Sistem Prediksi Serangan Jantung Menggunakan SVM,†2023.
N. M. A. J. Astari, D. G. H. Divayana, dan G. Indrawan, “Analisis Sentimen Dokumen Twitter Mengenai Dampak Virus Corona Menggunakan Metode Naive Bayes Classifier,†J. Sist. Dan Inform. JSI, vol. 15, no. 1, Art. no. 1, Nov 2020, doi: 10.30864/jsi.v15i1.332.
J. W. Simanullang, A. Adiwijaya, dan S. Al Faraby, “Klasifikasi Sentimen Pada Movie Review Dengan Metode Multinomial Naive Bayes,†EProceedings Eng., vol. 4, no. 2, 2018.
F. V. Sari dan A. Wibowo, “Analisis Sentimen Pelanggan Toko Online Jd.Id Menggunakan Metode Naïve Bayes Classifier Berbasis Konversi Ikon Emosi,†J. SIMETRIS, vol. 10, no. 2, hlm. 681–686, 2019.
J. A. Septian, T. M. Fachrudin, dan A. Nugroho, “Analisis Sentimen Pengguna Twitter Terhadap Polemik Persepakbolaan Indonesia Menggunakan Pembobotan TF-IDF dan K-Nearest Neighbor,†INSYST J. Intell. Syst. Comput., vol. 1, no. 1, Art. no. 1, Agu 2019, doi: 10.52985/insyst.v1i1.36.
R. K. Septiani, S. Anggraeni, dan S. D. Saraswati, “Klasifikasi Sentimen Terhadap Ibu Kota Nusantara (IKN) pada Media Sosial Menggunakan Naive Bayes,†TEKNIKA, vol. 16, no. 2, Art. no. 2, Sep 2022, doi: 10.5281/zenodo.7535887.
“What Is Sentiment Analysis (Opinion Mining)? | Definition from TechTarget,†Business Analytics. Diakses: 9 Oktober 2023. [Daring]. Tersedia pada: https://www.techtarget.com/searchbusinessanalytics/definition/opinion-mining-sentiment-mining
ferdi dan V. Ayumi, “ANALISA SENTIMEN MENGENAI KENAIKAN HARGA BBM MENGGUNAKAN METODE NAÃVE BAYES DAN SUPPORT VECTOR MACHINE,†JSAI J. Sci. Appl. Inform., vol. 6, no. 1, Art. no. 1, Feb 2023, doi: 10.36085/jsai.v6i1.4628.
A. Rahman, W. Wiranto, dan A. Doewes, “Online news classification using multinomial naive bayes,†ITSMART J. Teknol. Dan Inf., vol. 6, no. 1, hlm. 32–38, 2017.
D. Putra, A. Wibowo, dan U. B. Luhur, “Prediksi Keputusan Minat Penjurusan Siswa SMA Yadika 5 Menggunakan Algoritma Naïve Bayes,†vol. 2, 2020.
S. Setiawan, “Membicarakan Precision, Recall, dan F1-Score,†Medium. Diakses: 14 September 2023. [Daring]. Tersedia pada: https://stevkarta.medium.com/membicarakan-precision-recall-dan-f1-score-e96d81910354
“Emoji to Text Indonesia.†Diakses: 20 Juli 2023. [Daring]. Tersedia pada: https://www.kaggle.com/datasets/yasirabd/emoji-to-text-indonesia
N. Aliyah Salsabila, Y. Ardhito Winatmoko, A. Akbar Septiandri, dan A. Jamal, “Colloquial Indonesian Lexicon,†dalam 2018 International Conference on Asian Language Processing (IALP), Bandung, Indonesia: IEEE, Nov 2018, hlm. 226–229. doi: 10.1109/IALP.2018.8629151.
F. Koto dan G. Y. Rahmaningtyas, “Inset lexicon: Evaluation of a word list for Indonesian sentiment analysis in microblogs,†dalam 2017 International Conference on Asian Language Processing (IALP), Singapore: IEEE, Des 2017, hlm. 391–394. doi: 10.1109/IALP.2017.8300625.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution 4.0 International License
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).