Performance Comparison of Gradient-based Optimizer for Classification of Movie Genres

Authors

  • Mohamad Khoirun Najib Department of Mathematics, IPB University, Bogor 16680, Indonesia https://orcid.org/0000-0002-4372-4661
  • Ade Irawan Department of Mathematics, IPB University, Bogor 16680, Indonesia
  • Fitra Nuvus Salsabilla Department of Mathematics, IPB University, Bogor 16680, Indonesia
  • Sri Nurdiati Department of Mathematics, IPB University, Bogor 16680, Indonesia

DOI:

https://doi.org/10.21776/ub.ijma.2025.003.01.1

Keywords:

embedding, long short term memory, optimizers, sequencing, text analysis, tokenization

Abstract

In this digital era, artificial intelligence has become very popular due to its very wide scope of application. Various models and methods in artificial intelligence are developed with their respective purposes. However, each model and method certainly requires a reliable optimizer in the training process. Many optimizers have been developed and are increasingly reliable lately. In this article, we classify the synopsis texts of several movies into nine different genre classes, leveraging Natural Language Processing (NLP) with Long Short Term Memory (LSTM) and Embedding to build models. Models are trained using several optimizers, including stochastic gradient descent (SGD), AdaGrad, AdaDelta, RMSProp, Adam, AdaMax, Nadam, and AdamW. Meanwhile, various metrics are used to evaluate the model, such as accuracy, recall, precision, and F1-score. The results show that the model structure with embedding, lstm, double dense layer, and dropout 0.5 returns satisfactory accuracy. Optimizers based on Adaptive moments provide better results when compared to classical methods, such as stochastic gradient descent. AdamW outperforms other optimizers as indicated by its accuracy on validation data of 89.48%. Slightly behind it are several other optimizers such as Adam, RMSProp, and Nadam. Moreover, the genres that have the highest metric values are the drama and thriller genres, based on the recall, precision and F1-score values. Meanwhile, the horror, adventure and romance genres have low recall, precision and F1-score values. Moreover, by applying Random Over Sampling (ROS) to balance the genre dataset, the model’s testing accuracy improved to 98.1%, enhancing performance across all genres, including underrepresented ones. Additional testing showed the model’s ability to generalize well to unseen data, confirming its robustness and adaptability.

References

I. H. Sarker, Machine Learning: Algorithms, Real-World Applications and Research Directions, SN Comput. Sci., 2(3) (2021) 160, doi: 10.1007/s42979-021-00592-x.

M. A. Bansal, D. R. Sharma, and D. M. Kathuria, A Systematic Review on Data Scarcity Problem in Deep Learning: Solution and Applications, ACM Comput. Surv., 54(10s) (2022) 1–29, doi: 10.1145/3502287.

Y. J. Mao, H. J. Lim, M. Ni, W. H. Yan, D. W. C. Wong, and J. C. W. Cheung, Breast Tumour Classification Using Ultrasound Elastography with Machine Learning: A Systematic Scoping Review, Cancers (Basel)., 14(2) (2022), doi: 10.3390/cancers14020367.

S. Saeedi, S. Rezayi, H. Keshavarz, and S. R. Niakan Kalhori, MRI-based brain tumor detection using convolutional deep learning methods and chosen machine learning techniques, BMC Med. Inform. Decis. Mak., 23(1) (2023), doi: 10.1186/s12911-023-02114-6.

R. N. Alifah, M. K. Najib, S. Nurdiati, A. P. Sari, K. Herlambang, D. T. Ginting, and S. N. Sya’adah, Perbandingan Metode Tree Based Classification untuk Masalah Klasifikasi Data Body Mass Index. Indonesian Journal of Mathematics and Natural Sciences, 47(1) (2024) 49-65.

N. Nasir, A. Kansal, O. Alshaltone, F. Barneih, M. Sameer, A. Shanableh, and A. Al-Shamma’a, Water quality classification using machine learning algorithms, J. Water Process Eng., 48 (2022), doi: 10.1016/j.jwpe.2022.102920.

Y. Aydın, Ü. Işıkdağ, G. Bekdaş, S. M. Nigdeli, and Z. W. Geem, Use of Machine Learning Techniques in Soil Classification, Sustain., 15(3) (2023), doi: 10.3390/su15032374.

L. Hallee and B. B. Khomtchouk, Machine learning classifiers predict key genomic and evolutionary traits across the kingdoms of life, Sci. Rep., 13(1) (2023) 2088, doi: 10.1038/s41598-023-28965-7.

S. Rezaei, M. Kahani, B. Behkamal, and A. Jalayer, Early multi-class ensemble-based fake news detection using content features, Soc. Netw. Anal. Min., 13(1) (2023), doi: 10.1007/s13278-022-01019-y.

M. Aljabri, R. Zagrouba, A. Shaahid, F. Alnasser, A. Saleh, and D. M. Alomari, Machine learning-based social media bot detection: a comprehensive literature review, Soc. Netw. Anal. Min., 13(1) (2023), doi: 10.1007/s13278-022-01020-5.

Q. Liu, A. Tang, Z. Huang, L. Sun, and X. Han, Discussion on the tree-based machine learning model in the study of landslide susceptibility, Nat. Hazards, 113(2) (2022) 887–911, doi: 10.1007/s11069-022-05329-4.

O. Coskun and A. Aldemir, Machine learning network suitable for accurate rapid seismic risk estimation of masonry building stocks, Nat. Hazards, 115(1) (2023) 261–287, doi: 10.1007/s11069-022-05553-y.

S. Priya, R. Priyatharshini, R. Shruthi, V. Pooja, and R. S. Swarna, Early detection of Parkinson’s disease using data mining techniques from multimodal clinical data, in Advanced Machine Vision Paradigms for Medical Image Analysis, (2020) 213–228, doi: 10.1016/B978-0-12-819295-5.00008-1.

R. Feldman and J. Sanger, The Text Mining Handbook, (2006).

A. Reshamwala, D. Mishra, and P. Pawar, Review on natural language processing, IRACST Eng. Sci. Technol. An Int. J., 3(1) (2013) 113–116.

P. M. Mah, I. Skalna, and J. Muzam, Natural Language Processing and Artificial Intelligence for Enterprise Management in the Era of Industry 4.0, Appl. Sci., 12(18) (2022), doi:10.3390/app12189207.

V. Battu, V. Batchu, R. R. Reddy, M. K. Reddy, and R. Mamidi, Predicting the genre and rating of a movie based on its synopsis, in Proceedings of the 32nd Pacific Asia Conference on Language, Information and Computation, PACLIC 2018, (2018), pp. 52–62.

S. Sun, Z. Cao, H. Zhu, and J. Zhao, A Survey of Optimization Methods from a Machine Learning Perspective, IEEE Trans. Cybern., 50(8) (2020) 3668-3681, doi:10.1109/TCYB.2019.2950779.

P. R. Sihombing and I. F. Yuliati, Penerapan Metode Machine Learning dalam Klasifikasi Risiko Kejadian Berat Badan Lahir Rendah di Indonesia, MATRIK J. Manajemen, Tek. Inform. dan Rekayasa Komput., 20(2) (2021) 417–426, doi: 10.30812/matrik.v20i2.1174.

C. Darujati and A. B. Gumelar, Pemanfaatan Teknik Supervised untuk Klasifikasi Teks Bahasa Indonesia, J. LINK, 16 (2012) 1–8.

K. Anam, Aplikasi Agen Cerdas Untuk Pembelajaran Pemprograman Berorientasi Objek Berbasis Natural Language Processing (NLP), in Seminar Nasional Sains dan Teknologi Terapan V, (2017).

N. Munasatya and S. Novianto, Natural Language Processing untuk Sentimen Analisis Presiden Jokowi Menggunakan Multi Layer Perceptron, Techno.Com, 19(3) (2020) 237–244, doi:10.33633/tc.v19i3.3630.

J. Suciadi, Studi Analisis Metode-Metode Parsing dan Interpretasi Semantik Pada Natural Language Processing, J. Inform., 2(1) (2001) 13–22.

M. Y. Aldean, M. D. Hilmawan, R. Indriyati, and J. Lasama, Analisa Relevansi Tweet terhadap Hashtag dengan Metode Logistic Regression, Centive, 2(1) (2019) 32–38..

A. Indriani, Analisa Perbandingan Metode Naïve Bayes Classifier Dan K-Nearest Neighbor Terhadap Klasifikasi Data, Sebatik, 24(1) (2020) 1–7, doi: 10.46984/sebatik.v24i1.909.

I. Zulfa and E. Winarko, Sentimen Analisis Tweet Berbahasa Indonesia Dengan Deep Belief Network, IJCCS Indonesian J. Comput. Cybern. Syst., 11(2) (2017) 187, doi: 10.22146/ijccs.24716.

T. Widjaja and A. Gunawan, Deteksi Plagiarisme pada Kode Bahasa Pemrograman Java menggunakan XGBoost, J. Infra, 10(2) (2020).

F. Amin, Sistem Temu Kembali Informasi dengan Pemeringkatan Metode Vector Space Model, Dinamik, 18(2) (2013) 122–129.

G. T. Pangestu and M. Rosyda, Sentiment Analysis Tweet Pilkada 2020 Saat Pandemik COVID-19 di Media Sosial Twitter Menggunakan Metode 1D Convolutional Neural Network, J. Media Inform. Budidarma, 6(2) (2022) 1017, doi: 10.30865/mib.v6i2.3765.

M. Ihsan, Benny Sukma Negara, and Surya Agustian, LSTM (Long Short Term Memory) for Sentiment COVID-19 Vaccine Classification on Twitter, Digit. Zo. J. Teknol. Inf. dan Komun., 13(1) (2022) 79–89, doi: 10.31849/digitalzone.v13i1.9950.

A. F. Iskandar, D. Irwan, and T. H. Sinaga, Sistem Deteksi Wawasan Moral Bersosial Media: Analisis Komentar Tidak Sesuai Pada Instagram, J. Educ. Technol. Civ. Lit., 2(1) (2021) 16–21.

A. W. Z. Nasution, M. A. Bijaksana, and S. Al Faraby, Analisis dan Implementasi Perhitungan Semantics Similarity Pada Ayat Al-Quran Dengan Pendekatan Word Alignment Berdasarkan Support Vector Regression, e-Proceeding Eng., 4(2) (2017) 3156–3165.

A. Nurdin, B. A. S. Aji, A. Bustamin, and Z Abidin, Perbandingan Kinerja Word Embedding Word2Vec, Glove, dan Fasttext pada Klasifikasi Teks, Jurnal Teknokompak, 14(2) (2020) 74-79.

A. Kumaidi, R. Raafi’udin, and I. P. Solihin, Pengujian Algoritma Long Short Term Memory untuk Prediksi Kualitas Udara dan Suhu Kota Bandung, Jurnal telematika, 15(1) (2020) 13-18.

M. A. Amrustian, W. Widayat, and A. M. Wirawan, Analisis Sentimen Evaluasi Terhadap Pengajaran Dosen di Perguruan Tinggi Menggunakan Metode LSTM, Jurnal Media Informasi Budidarma, 6(1) (2022) 535-541.

L. Wiranda and M. Sadikin, Penerapan Long Short Term Memory pada data Time Series untuk Meprediksi Penjualan Produk PT. Metiska Farma, Jurnal Nasional Pendidikan Teknik Informatika, 8(3) (2019) 184-196.

Z. I. Botev, D. P. Kroese, R. Y. Rubinstein, and P. L’Ecuyer, The cross-entropy method for optimization, In Handbook of statistics, 31 (2013) 35-59.

S. Nurdiati, M. K. Najib, F. Bukhari, R. Revina, and F. N. Salsabila, Performance Comparison of Gradient-Based Convolutional Neural Network Optimizers for Facial Expression Recognition, BAREKENG: Jurnal Ilmu Matematika dan Terapan, 16(3) (2022) 927-938.

I. Markoulidakis, G. Kopsiaftis, I. Rallis, and I. Georgoulas, Multi-Class Confusion Matrix Reduction method and its application on Net Promoter Score classification problem, ACM Int. Conf. Proceeding Ser., 9(4) (2021) 412–419, doi: 10.1145/3453892.3461323.

S. Nurdiati, M. K. Najib, F. Bukhari, M. R. Ardhana, S. Rahmah, and T. P. Blante. Perbandingan AlexNet dan VGG untuk Pengenalan Ekspresi Wajah pada Dataset Kelas Komputasi Lanjut. Techno. Com, 21(3) (2022) 500-510.

I. F. Hawari, M. K. Najib, S. Nurdiati, Y. F. Y. Marpaung, N. Kusumawati, M. Nurfadila, K. R. Sijabat, B. F. Hernawan. Pengaruh Teknik Oversampling pada Algoritma Machine Learning dalam Klasifikasi Body Mass Index (BMI). Jurnal Riset dan Aplikasi Matematika (JRAM), 8(1) (2024) 51-68.

L. B. Cesar, M. Á. Manso-Callejo, and C. I. Cira, BERT (Bidirectional Encoder Representations from Transformers) for missing data imputation in solar irradiance time series. Engineering Proceedings, 39(1) (2023) 26.

N. Raveendhran and N. Krishnan. A novel hybrid SMOTE oversampling approach for balancing class distribution on social media text. Bulletin of Electrical Engineering and Informatics, 14(1) (2025) 638-46.

H. Dai, Z. Liu, W. Liao, X. Huang, Y. Cao, Z. Wu, L. Zhao, S. Xu, F. Zeng, W. Liu, and N. Liu. Auggpt: Leveraging chatgpt for text data augmentation. IEEE Transactions on Big Data (2025).

Downloads

Published

2025-04-10

How to Cite

Performance Comparison of Gradient-based Optimizer for Classification of Movie Genres. (2025). Indonesian Journal of Mathematics and Applications, 3(1), 1-18. https://doi.org/10.21776/ub.ijma.2025.003.01.1

Similar Articles

1-10 of 21

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