Transfer Learning for Sentiment Analysis Using BERT Based Supervised Fine-Tuning
<p>Representative mechanism of Bangla-BERT to CNN-BiLSTM in sentiment analysis. First, BERT accepts tokens for embedding, and then passes through the CNN layer for the extract information. Next, LSTM aids to create a sequence from the extracted information after FNN makes a decision by calculating loss.</p> "> Figure 2
<p>Whole workflow of sentiment analysis. The first phase is data collecting and then labelling, Secondly, the data have been pre-processed and the last phase is decision-making by modeling.</p> "> Figure 3
<p>Snapshot of the text annotation tool.</p> "> Figure 4
<p>CBOW and Skip−Gram architecture.</p> "> Figure 5
<p>The memory cell of the LSTM layer.</p> ">
Abstract
:1. Introduction
- This work has ensured the hybrid integrated model such as CNN-BiLSTM, and it has been used in combination with monolingual BERT to address the issue of sentiment analysis in Bangla;
- We compared Word2vec, GloVe, FastText, and BERT, where we demonstrated how transformer architecture exceeds all prior state-of-the-art approaches and becomes the new state-of-the-art model with proper fine-tuning;
- To do this, we developed a Bangla pre-trained BERT model for transfer learning (Huggingface: Kowsher/bangla-bert).
2. Related Work
3. Methodology
3.1. Data Source
3.2. Data Collection
3.3. Data Preprocessing
3.3.1. Missing Value Check
3.3.2. Noise Removal
3.3.3. Spelling Correction
3.3.4. Feature Extraction
4. Encoding Algorithm
4.1. Word2Vec
4.2. GloVe
4.3. FastText
4.4. BERT
5. Classification Algorithms
5.1. Convolutional Neural Networks (CNN)
5.1.1. Convolution Layer
5.1.2. Batch Normalization
5.2. Max Pooling Layer
5.3. Bidirectional Long Short-Term Memory Model
5.4. One-Dimensional CNN-BiLSTM Proposed Method
6. Experiment
6.1. Prediction and Performance Analysis
6.2. Comparison to Other Methods
- •
- Hate Speech detection is one of the applications of sentiment analysis. To perform hate speech detection, Ref. [59] have used this dataset. The dataset contains five types of hate speech categories that include 35,000 statements in total. These are Political, Religious, Gender abusive, Geopolitical, and Personal. The total words present in the dataset are 672,109. They evaluated the hate speech detection dataset with BengFastText, Glove, and word2vec.In Table 7, we have incorporated the result of hate speech detection [59] and have performed a model averaging ensemble (MAE) on BengFastText, Glove, and word2vec. Their BengFastText shows the best F1 score of 0.891 in MAE, which is 1.3% better than the Multichannel Convolutional- LSTM (MC-LSTM) classifier. The Glove has an F1 score of 0.837 with MAE, which shows a 1.6% improvement over the MC-LSTM method. Word2vec showed the best result with a gradient boost classifier of 0.810, more influential than the MAE classifier result. Bangla-BERT significantly outperforms all of these, achieving a 0.941 F1 score. It exceeds BengFastText(MAE) by 0.05, giving a boost of 5%.
- •
- The Sentiment Analysis in the SAIL Dataset [60] contains tweets generated from the Shared Task on Sentiment Analysis in Indian Languages (SAIL) 2015. The dataset’s training, development, and test sets include 1000, 500, and 500 tweets, respectively.
- •
- The ABSA dataset [61] was created to facilitate aspect-based sentiment analysis tasks in Bangla. The dataset is divided into two sections: cricket and restaurant.
- •
- The third dataset, the BengFastText dataset [59], was compiled from various sources, including newspapers, broadcast media, textbooks, websites, and social media. The original dataset contains 320,000 records that can be used for sentiment analysis. However, just a tiny portion of it is publicly accessible. For example, there are 8420 postings in the public version and the test set.
- •
- On the other hand, the YouTube Comments Dataset [62] was created by collecting opinions from different YouTube videos. Three-class, five-class, and emotion labels were used to label the dataset. The 2796 comments were divided into train, development, and test sets.
- •
- The final dataset for this comparison research is Social Media Posts (CogniSenti Dataset). It contains tweets and posts from Facebook and Twitter.
7. Conclusions and Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Kowsher, M.; Afrin, F.; Sanjid, Z.I. Machine Learning and Deep Learning-Based Computing Pipelines for Bangla Sentiment Analysis. In Proceedings of the International Joint Conference on Advances in Computational Intelligence, Online, 23–24 October 2021; pp. 343–354. [Google Scholar]
- Kowsher, M.; Tahabilder, A.; Sanjid, M.Z.I.; Prottasha, N.J.; Sarker, M.M.H. Knowledge-base optimization to reduce the response time of bangla chatbot. In Proceedings of the 2020 Joint 9th International Conference on Informatics, Electronics & Vision (ICIEV) and 2020 4th International Conference on Imaging, Vision & Pattern Recognition (icIVPR), Kitakyushu, Japan, 26–29 August 2020; pp. 1–6. [Google Scholar]
- Rogers, A.; Kovaleva, O.; Rumshisky, A. A primer in bertology: What we know about how bert works. Trans. Assoc. Comput. Linguist. 2020, 8, 842–866. [Google Scholar] [CrossRef]
- Devlin, J.; Chang, M.W.; Lee, K.; Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv 2018, arXiv:1810.04805. [Google Scholar]
- Libovickỳ, J.; Rosa, R.; Fraser, A. How language-neutral is multilingual BERT? arXiv 2019, arXiv:1911.03310. [Google Scholar]
- Kowsher, M.; Uddin, M.J.; Tahabilder, A.; Amin, M.R.; Shahriar, M.F.; Sobuj, M.S.I. BanglaLM: Data Mining based Bangla Corpus for Language Model Research. In Proceedings of the 2021 Third International Conference on Inventive Research in Computing Applications (ICIRCA), Coimbatore, India, 2–4 September 2021; pp. 1435–1438. [Google Scholar]
- Dashtipour, K.; Gogate, M.; Li, J.; Jiang, F.; Kong, B.; Hussain, A. A hybrid Persian sentiment analysis framework: Integrating dependency grammar based rules and deep neural networks. Neurocomputing 2020, 380, 1–10. [Google Scholar] [CrossRef] [Green Version]
- Kennedy, A.; Inkpen, D. Sentiment classification of movie reviews using contextual valence shifters. Comput. Intell. 2006, 22, 110–125. [Google Scholar] [CrossRef] [Green Version]
- Cui, H.; Mittal, V.; Datar, M. Comparative Experiments on Sentiment Classification for Online Product Reviews; Association for the Advancement of Artificial Intelligence: Palo Alto, CA, USA, 2006; Volume 6, p. 30. [Google Scholar]
- Kouloumpis, E.; Wilson, T.; Moore, J. Twitter sentiment analysis: The good the bad and the omg! In Proceedings of the 5th International AAAI Conference on Weblogs and Social Media. Barcelona, Spain, 17–21 July 2011; Volume 5, pp. 538–541. [Google Scholar]
- Krishna, A.; Akhilesh, V.; Aich, A.; Hegde, C. Sentiment analysis of restaurant reviews using machine learning techniques. In Emerging Research in Electronics, Computer Science and Technology; Springer: Berlin/Heidelberg, Germany, 2019; pp. 687–696. [Google Scholar]
- Singla, Z.; Randhawa, S.; Jain, S. Sentiment analysis of customer product reviews using machine learning. In Proceedings of the 2017 International Conference on Intelligent Computing and Control (I2C2), Coimbatore, India, 23–24 June 2017; pp. 1–5. [Google Scholar]
- Souza, M.; Vieira, R. Sentiment analysis on twitter data for portuguese language. In Proceedings of the International Conference on Computational Processing of the Portuguese Language, Coimbra, Portugal, 17–20 April 2012; pp. 241–247. [Google Scholar]
- Ombabi, A.H.; Ouarda, W.; Alimi, A.M. Deep learning CNN–LSTM framework for Arabic sentiment analysis using textual information shared in social networks. Soc. Netw. Anal. Min. 2020, 10, 53. [Google Scholar] [CrossRef]
- Mathews, D.M.; Abraham, S. Social data sentiment analysis of a multilingual dataset: A case study with malayalam and english. In Proceedings of the International Conference on Advanced Informatics for Computing Research, Shimla, India, 15–16 June 2019; pp. 70–78. [Google Scholar]
- Chowdhury, R.R.; Hossain, M.S.; Hossain, S.; Andersson, K. Analyzing sentiment of movie reviews in bangla by applying machine learning techniques. In Proceedings of the 2019 International Conference on Bangla Speech and Language Processing (ICBSLP), Sylhet, Bangladesh, 27–28 September 2019; pp. 1–6. [Google Scholar]
- Paul, A.K.; Shill, P.C. Sentiment mining from bangla data using mutual information. In Proceedings of the 2nd International Conference on Electrical, Computer & Telecommunication Engineering (ICECTE), Rajshahi, Bangladesh, 8–10 December 2016; pp. 1–4. [Google Scholar]
- Hossain, E.; Sharif, O.; Moshiul Hoque, M. Sentiment polarity detection on bengali book reviews using multinomial naive bayes. In Progress in Advanced Computing and Intelligent Engineering; Springer: Berlin/Heidelberg, Germany, 2021; pp. 281–292. [Google Scholar]
- Mahtab, S.A.; Islam, N.; Rahaman, M.M. Sentiment analysis on bangladesh cricket with support vector machine. In Proceedings of the 2018 International Conference on Bangla Speech and Language Processing (ICBSLP), Sylhet, Bangladesh, 21–22 September 2018; pp. 1–4. [Google Scholar]
- Chowdhury, S.; Chowdhury, W. Performing sentiment analysis in Bangla microblog posts. In Proceedings of the 2014 International Conference on Informatics, Electronics & Vision (ICIEV), Dhaka, Bangladesh, 23–24 May 2014; pp. 1–6. [Google Scholar]
- Peters, M.E.; Neumann, M.; Iyyer, M.; Gardner, M.; Clark, C.; Lee, K.; Zettlemoyer, L. Deep contextualized word representations. arXiv 2018, arXiv:1802.05365x. [Google Scholar]
- Brown, T.B.; Mann, B.; Ryder, N.; Subbiah, M.; Kaplan, J.; Dhariwal, P.; Neelakantan, A.; Shyam, P.; Sastry, G.; Askell, A.; et al. Language models are few-shot learners. arXiv 2020, arXiv:2005.14165. [Google Scholar]
- Qiu, X.; Sun, T.; Xu, Y.; Shao, Y.; Dai, N.; Huang, X. Pre-trained models for natural language processing: A survey. arXiv 2020, arXiv:2003.08271. [Google Scholar] [CrossRef]
- Dai, X.; Karimi, S.; Hachey, B.; Paris, C. Cost-effective selection of pretraining data: A case study of pretraining BERT on social media. arXiv 2020, arXiv:2010.01150. [Google Scholar]
- Antoun, W.; Baly, F.; Hajj, H. Arabert: Transformer-based model for arabic language understanding. arXiv 2020, arXiv:2003.00104. [Google Scholar]
- Farahani, M.; Gharachorloo, M.; Farahani, M.; Manthouri, M. Parsbert: Transformer-based model for persian language understanding. Neural Process. Lett. 2021, 53, 3831–3847. [Google Scholar] [CrossRef]
- de Vries, W.; van Cranenburgh, A.; Bisazza, A.; Caselli, T.; van Noord, G.; Nissim, M. Bertje: A dutch bert model. arXiv 2019, arXiv:1912.09582. [Google Scholar]
- Masala, M.; Ruseti, S.; Dascalu, M. Robert–a romanian bert model. In Proceedings of the 28th International Conference on Computational Linguistics, Barcelona, Spain, 8–13 December 2020; pp. 6626–6637. [Google Scholar]
- Kuratov, Y.; Arkhipov, M. Adaptation of deep bidirectional multilingual transformers for russian language. arXiv 2019, arXiv:1905.07213. [Google Scholar]
- Cui, Y.; Che, W.; Liu, T.; Qin, B.; Yang, Z.; Wang, S.; Hu, G. Pre-training with whole word masking for chinese bert. arXiv 2019, arXiv:1906.08101. [Google Scholar] [CrossRef]
- Kowsher, M.; Sobuj, M.S.I.; Shahriar, M.F.; Prottasha, N.J.; Arefin, M.S.; Dhar, P.K.; Koshiba, T. An Enhanced Neural Word Embedding Model for Transfer Learning. Appl. Sci. 2022, 12, 2848. [Google Scholar] [CrossRef]
- Kowsher, M.; Uddin, M.J.; Tahabilder, A.; Prottasha, N.J.; Ahmed, M.; Alam, K.R.; Sultana, T. BnVec: Towards the Development of Word Embedding for Bangla Language Processing. Int. J. Eng. Technol. 2021, 10, 95–102. [Google Scholar] [CrossRef]
- Hohman, F.; Wongsuphasawat, K.; Kery, M.B.; Patel, K. Understanding and visualizing data iteration in machine learning. In Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems, Online, 25–30 April 2020; pp. 1–13. [Google Scholar]
- Mridha, M.F.; Banik, M.; Ali, M.N.Y.; Huda, M.N.; Rahman, C.M.; Das, J.K. Formation of Bangla Word Dictionary Compatible with UNL Structure. In Proceedings of the 4th International Conference on Software, Knowledge, Information Management and Applications (SKIMA), Paro, Bhutan, 25–27 August 2010; p. 49. [Google Scholar]
- Misra, J. AutoNLP: NLP feature recommendations for text analytics applications. arXiv 2020, arXiv:2002.03056. [Google Scholar]
- Gupta, S.; Kanchinadam, T.; Conathan, D.; Fung, G. Task-optimized word embeddings for text classification representations. Front. Appl. Math. Stat. 2020, 5, 67. [Google Scholar] [CrossRef] [Green Version]
- Grohe, M. word2vec, node2vec, graph2vec, x2vec: Towards a theory of vector embeddings of structured data. In Proceedings of the 39th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, Portland, OR, USA, 14–19 June 2020; pp. 1–16. [Google Scholar]
- Shobana, J.; Murali, M. Improving feature engineering by fine tuning the parameters of Skip gram model. Mater. Today Proc. 2021, in press. [Google Scholar] [CrossRef]
- Choudhari, P.; Veenadhari, S. Sentiment Classification of Online Mobile Reviews Using Combination of Word2vec and Bag-of-Centroids. In Machine Learning and Information Processing; Springer: Berlin/Heidelberg, Germany, 2020; pp. 69–80. [Google Scholar]
- Sakketou, F.; Ampazis, N. A constrained optimization algorithm for learning GloVe embeddings with semantic lexicons. Knowl. Based Syst. 2020, 195, 105628. [Google Scholar] [CrossRef]
- Selva Birunda, S.; Kanniga Devi, R. A Review on Word Embedding Techniques for Text Classification. In Innovative Data Communication Technologies and Application; Springer: Berlin/Heidelberg, Germany, 2021; pp. 267–281. [Google Scholar]
- Mikolov, T.; Chen, K.; Corrado, G.; Dean, J. Efficient estimation of word representations in vector space. arXiv 2013, arXiv:1301.3781. [Google Scholar]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. In Proceedings of the Advances in Neural Information Processing Systems 30 (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017; pp. 5998–6008. [Google Scholar]
- Rush, A.M. The annotated transformer. In Proceedings of the Workshop for NLP Open Source Software (NLP-OSS), Melbourne, Australia, July 2018; pp. 52–60. [Google Scholar]
- Schmidhuber, J. Deep Learning in Neural Networks: An Overview. Neural Netw. 2015, 61, 85–117. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- LeCun, Y.; Boser, B.; Denker, J.S.; Henderson, D.; Howard, R.E.; Hubbard, W.; Jackel, L.D. Backpropagation Applied to Handwritten Zip Code Recognition. Neural Comput. 1989, 1, 541–551. [Google Scholar] [CrossRef]
- Acharya, U.R.; Oh, S.L.; Hagiwara, Y.; Tan, J.H.; Adam, M.; Gertych, A.; Tan, R.S. A deep convolutional neural network model to classify heartbeats. Comput. Biol. Med. 2017, 89, 389–396. [Google Scholar] [CrossRef] [PubMed]
- Dmitrievich, I.A. Deep Learning in Information Analysis of Electrocardiogram Signals for Disease Diagnostics. Bachelor’s Thesis, Moscow Institute of Physics and Technology (State University), Moscow, Russia, 2015; p. 20. [Google Scholar]
- Zubair, M.; Kim, J.; Yoon, C. An Automated ECG Beat Classification System Using Convolutional Neural Networks. In Proceedings of the 2016 6th International Conference on IT Convergence and Security (ICITCS), Prague, Czech Republic, 26–29 September 2016; pp. 1–5. [Google Scholar] [CrossRef]
- Pourbabaee, B.; Roshtkhari, M.J.; Khorasani, K. Deep Convolutional Neural Networks and Learning ECG Features for Screening Paroxysmal Atrial Fibrillation Patients. IEEE Trans. Syst. Man Cybern. Syst. 2018, 48, 2095–2104. [Google Scholar] [CrossRef]
- Gers, F.A.; Schmidhuber, J.; Cummins, F. Learning to forget: Continual prediction with LSTM. In Proceedings of the 1999 9th International Conference on Artificial Neural Networks ICANN 99. (Conf. Publ. No. 470), Edinburgh, UK, 7–10 September 1999; Volume 2, pp. 850–855. [Google Scholar] [CrossRef]
- Kowsher, M.; Tahabilder, A.; Sanjid, M.Z.I.; Prottasha, N.J.; Uddin, M.S.; Hossain, M.A.; Jilani, M.A.K. LSTM-ANN & BiLSTM-ANN: Hybrid deep learning models for enhanced classification accuracy. Procedia Comput. Sci. 2021, 193, 131–140. [Google Scholar]
- Yildirim, Ö. A novel wavelet sequence based on deep bidirectional LSTM network model for ECG signal classification. Comput. Biol. Med. 2018, 96, 189–202. [Google Scholar] [CrossRef]
- Graves, A.; Schmidhuber, J. Framewise phoneme classification with bidirectional LSTM and other neural network architectures. Neural Netw. 2005, 18, 602–610. [Google Scholar] [CrossRef]
- De Baets, L.; Ruyssinck, J.; Peiffer, T.; Decruyenaere, J.; De Turck, F.; Ongenae, F.; Dhaene, T. Positive blood culture detection in time series data using a BiLSTM network. arXiv 2016, arXiv:1612.00962. [Google Scholar]
- Khan Mamun, M.M.R.; Alouani, A.T. FA-1D-CNN Implementation to Improve Diagnosis of Heart Disease Risk Level. In Proceedings of the 6th World Congress on Electrical Engineering and Computer Systems and Sciences (EECSS’20), Virtual Conference, 13–15 August 2020. [Google Scholar] [CrossRef]
- Kulkarni, A.; Mandhane, M.; Likhitkar, M.; Kshirsagar, G.; Joshi, R. L3cubemahasent: A marathi tweet-based sentiment analysis dataset. arXiv 2021, arXiv:2103.11408. [Google Scholar]
- Nguyen, Q.T.; Nguyen, T.L.; Luong, N.H.; Ngo, Q.H. Fine-tuning bert for sentiment analysis of vietnamese reviews. In Proceedings of the 7th NAFOSTED Conference on Information and Computer Science (NICS), Hochiminh, Vietnam, 26–27 September 2020; pp. 302–307. [Google Scholar]
- Karim, M.R.; Chakravarthi, B.R.; McCrae, J.P.; Cochez, M. Classification benchmarks for under-resourced bengali language based on multichannel convolutional-lstm network. In Proceedings of the IEEE 7th International Conference on Data Science and Advanced Analytics (DSAA), Sydney, Australia, 6–9 October 2020; pp. 390–399. [Google Scholar]
- Patra, B.G.; Das, D.; Das, A.; Prasath, R. Shared task on sentiment analysis in indian languages (sail) tweets-an overview. In Proceedings of the International Conference on Mining Intelligence and Knowledge Exploration, Hyderabad, India, 9–11 December 2015; pp. 650–655. [Google Scholar]
- Rahman, M.; Kumar Dey, E. Datasets for aspect-based sentiment analysis in bangla and its baseline evaluation. Data 2018, 3, 15. [Google Scholar] [CrossRef] [Green Version]
- Tripto, N.I.; Ali, M.E. Detecting multilabel sentiment and emotions from bangla youtube comments. In Proceedings of the 2018 International Conference on Bangla Speech and Language Processing (ICBSLP), Sylhet, Bangladesh, 21–22 September 2018; pp. 1–6. [Google Scholar]
Text | Sentiment |
---|---|
জয় বাংলা কাপ! আর মার্চ মাস স্বাধীনতার মাস এমন একটি চমৎকার আইডিয়া যিনি নিয়ে এসেছেন তাকে স্যালুট (Joy Bangla Cup! And March is the month of independence. Salute to the one who came up with such a wonderful idea) | Positve |
ক্লিনিকের মালিককে হোয়াইটওয়াশ করা দরকার (The owner of the clinic needs to be whitewashed) | Negative |
কি বলব, দুই দিকেই সমস্যা আছে (What can I say, there are problems on both sides) | Negative |
একটি সুন্দর সামাজিক পেজ পেইজে লাইক দিয়ে সাথেই থাকুন (A Beautiful social page. Stay by liking the page) | Positive |
Processing | Text |
---|---|
Original | আমরা কাজ করবো কিভাবে! Document তৈরী করতে আমাদের সবাইকে কি করতে হবে ? ৫-৬ জন আমরা,কঠিন হবে | ( How we work! What do we all have to do to create the document? 5-6 of us, it will be difficult ) |
Removing Punctuation | আমরা কাজ করবো কিভাবে Document তৈরী করতে আমাদের সবাইকে কি করতে হবে ৫ ৬ জন আমরা কঠিন হবে ( We will work on how to create a document We five six person will be difficult ) |
Removing Digits | আমরা কাজ করবো কিভাবে Document তৈরী করতে আমাদের সবাইকে কি করতে হবে জন আমরা কঠিন হবে ( We will work out how to create a document what we all have to do John we will be difficult ) |
Removing Non-Bangla Character | আমরা কাজ করবো কিভাবে তৈরী করতে আমাদের সবাইকে কি করতে হবে জন আমরা কঠিন হবে ( We will work hard to create what we all need to do ) |
Removing Emoticons | আমরা কাজ করবো কিভাবে তৈরী করতে আমাদের সবাইকে কি করতে হবে জন আমরা কঠিন হবে ( We will work hard to create what we all need to do ) |
Removing Stopwords | কাজ করবো কিভাবে তৈরী জন আমরা কঠিন হবে ( How will we work We will be difficult ) |
Algorithms | Accuracy | Precision | Recall | F1 Score | ROC AUC | Kappa |
---|---|---|---|---|---|---|
SVM | 0.8383 | 0.8791 | 0.7786 | 0.8287 | 0.8789 | 0.7111 |
Random Forest Tree | 0.8184 | 0.8780 | 0.7239 | 0.8008 | 0.8984 | 0.6613 |
Logistic Regression | 0.8025 | 0.8829 | 0.7026 | 0.7927 | 0.8831 | 0.6915 |
Naive Bayes | 0.7816 | 0.8686 | 0.6418 | 0.7552 | 0.7776 | 0.4875 |
KNN | 0.7946 | 0.8689 | 0.6001 | 0.7342 | 0.8444 | 0.7131 |
LDA | 0.8138 | 0.8538 | 0.7739 | 0.8137 | 0.8438 | 0.6837 |
Decision Trees | 0.8061 | 0.8526 | 0.6582 | 0.7559 | 0.8561 | 0.7259 |
LSTM | 0.8281 | 0.8614 | 0.7352 | 0.7983 | 0.8284 | 0.7583 |
CNN | 0.8188 | 0.8438 | 0.7706 | 0.8074 | 0.8999 | 0.7374 |
Impact Learning | 0.8235 | 0.9114 | 0.7283 | 0.8197 | 0.8939 | 0.7697 |
ANN | 0.7684 | 0.8426 | 0.7221 | 0.7829 | 0.8213 | 0.7129 |
CNN-BiLSTM | 0.8493 | 0.9350 | 0.7248 | 0.8299 | 0.8131 | 0.6523 |
Algorithms | Accuracy | Precision | Recall | F1 Score | ROC AUC | Kappa |
---|---|---|---|---|---|---|
SVM | 0.8483 | 0.8991 | 0.7586 | 0.8287 | 0.8989 | 0.7911 |
Random Forest Tree | 0.8381 | 0.8280 | 0.8148 | 0.8201 | 0.8999 | 0.6813 |
Logistic Regression | 0.8025 | 0.8829 | 0.7014 | 0.7927 | 0.8831 | 0.6915 |
Naive Bayes | 0.7816 | 0.8616 | 0.6418 | 0.7552 | 0.7776 | 0.4875 |
KNN | 0.7664 | 0.8480 | 0.6402 | 0.7442 | 0.8344 | 0.7101 |
LDA | 0.8638 | 0.8838 | 0.7836 | 0.8337 | 0.9138 | 0.7172 |
Decision Trees | 0.8461 | 0.8521 | 0.8005 | 0.8259 | 0.9061 | 0.7825 |
ANN | 0.8381 | 0.8914 | 0.7096 | 0.7999 | 0.8884 | 0.7683 |
LSTM | 0.8288 | 0.8431 | 0.7937 | 0.8174 | 0.8799 | 0.7474 |
CNN-BiLSTM | 0.8835 | 0.9114 | 0.8098 | 0.8597 | 0.9319 | 0.7897 |
CNN | 0.7684 | 0.8426 | 0.7262 | 0.7829 | 0.8213 | 0.7129 |
Impact Learning | 0.8551 | 0.8738 | 0.7748 | 0.8249 | 0.8395 | 0.6523 |
Algorithms | Accuracy | Precision | Recall | F1 Score | ROC AUC | Kappa |
---|---|---|---|---|---|---|
SVM | 0.8252 | 0.8791 | 0.7492 | 0.8125 | 0.8789 | 0.7572 |
Random Forest Tree | 0.8084 | 0.8282 | 0.7567 | 0.7908 | 0.8236 | 0.6613 |
Logistic Regression | 0.7493 | 0.7923 | 0.6198 | 0.7035 | 0.7723 | 0.6915 |
Naive Bayes | 0.7620 | 0.7826 | 0.6993 | 0.7402 | 0.8676 | 0.6237 |
KNN | 0.7969 | 0.8592 | 0.6412 | 0.7492 | 0.8302 | 0.7294 |
LDA | 0.8329 | 0.8523 | 0.7809 | 0.8147 | 0.8421 | 0.7837 |
Decision Trees | 0.8293 | 0.8191 | 0.7639 | 0.7893 | 0.8419 | 0.7392 |
ANN | 0.8181 | 0.8712 | 0.7494 | 0.8083 | 0.8329 | 0.7883 |
LSTM | 0.8089 | 0.8330 | 0.7698 | 0.7974 | 0.8949 | 0.7371 |
Impact Learning | 0.8262 | 0.8923 | 0.7786 | 0.8337 | 0.8925 | 0.7797 |
CNN | 0.7884 | 0.8220 | 0.6253 | 0.7229 | 0.8113 | 0.7629 |
CNN-BiLSTM | 0.8453 | 0.9649 | 0.7048 | 0.8349 | 0.8135 | 0.6323 |
Algorithms | Accuracy | Precision | Recall | F1 Score | ROC AUC | Kappa |
---|---|---|---|---|---|---|
SVM | 0.9283 | 0.9391 | 0.9282 | 0.9287 | 0.9389 | 0.92111 |
Random Forest Tree | 0.9184 | 0.9380 | 0.8948 | 0.9108 | 0.9284 | 0.93613 |
Logistic Regression | 0.9025 | 0.8982 | 0.8725 | 0.8827 | 0.8831 | 0.86915 |
Naive Bayes | 0.8781 | 0.8821 | 0.8641 | 0.8755 | 0.8777 | 0.7487 |
KNN | 0.8794 | 0.8868 | 0.8235 | 0.8534 | 0.8844 | 0.7931 |
LDA | 0.9013 | 0.8853 | 0.8544 | 0.8713 | 0.8683 | 0.7683 |
Decision Trees | 0.9006 | 0.8952 | 0.8389 | 0.8655 | 0.8956 | 0.8725 |
ANN | 0.9120 | 0.9067 | 0.8954 | 0.8998 | 0.8958 | 0.9063 |
CNN | 0.9108 | 0.9243 | 0.9001 | 0.9077 | 0.9349 | 0.9527 |
Impact Learning | 0.8833 | 0.8931 | 0.8651 | 0.8770 | 0.8994 | 0.8061 |
LSTM | 0.9148 | 0.9159 | 0.8692 | 0.8918 | 0.8881 | 0.8762 |
CNN-BiLSTM | 0.9415 | 0.9423 | 0.9294 | 0.9304 | 0.9473 | 0.9222 |
Method | Classifier | Precision | Recall | F1 |
---|---|---|---|---|
BengFastText | MC-LSTM | 0.881 | 0.883 | 0.882 |
BengFastText | MAE | 0.894 | 0.896 | 0.891 |
GloVe | MC-LSTM | 0.827 | 0.822 | 0.824 |
GloVe | MAE | 0.831 | 0.834 | 0.837 |
Word2vec | GBT | 0.806 | 0.815 | 0.810 |
Word2vec | MAE | 0.79 | 0.800 | 0.790 |
Bangla-BERT | CNN-BiLSTM | 0.946 | 0.949 | 0.941 |
Dataset | RF | SVM | CNN-W2V | CNN-GLOVE | Fast-Text | BERT | Bangla-BERT |
---|---|---|---|---|---|---|---|
ABSA cricket | 0.662 | 0.636 | 0.679 | 0.696 | 0.688 | 0.682 | 0.698 |
ABSA Restaurant | 0.407 | 0.498 | 0.391 | 0.491 | 0.519 | 0.581 | 0.701 |
SAIL | 0.546 | 0.552 | 0.557 | 0.595 | 0.532 | 0.566 | 0.604 |
BengFastText | 0.612 | 0.613 | 0.663 | 0.657 | 0.661 | 0.674 | 0.672 |
Youtube comments | 0.586 | 0.605 | 0.669 | 0.663 | 0.658 | 0.729 | 0.741 |
CogniSenti | 0.545 | 0.584 | 0.604 | 0.587 | 0.614 | 0.686 | 0.681 |
Avg. | 0.560 | 0.581 | 0.594 | 0.615 | 0.612 | 0.653 | 0.683 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Prottasha, N.J.; Sami, A.A.; Kowsher, M.; Murad, S.A.; Bairagi, A.K.; Masud, M.; Baz, M. Transfer Learning for Sentiment Analysis Using BERT Based Supervised Fine-Tuning. Sensors 2022, 22, 4157. https://doi.org/10.3390/s22114157
Prottasha NJ, Sami AA, Kowsher M, Murad SA, Bairagi AK, Masud M, Baz M. Transfer Learning for Sentiment Analysis Using BERT Based Supervised Fine-Tuning. Sensors. 2022; 22(11):4157. https://doi.org/10.3390/s22114157
Chicago/Turabian StyleProttasha, Nusrat Jahan, Abdullah As Sami, Md Kowsher, Saydul Akbar Murad, Anupam Kumar Bairagi, Mehedi Masud, and Mohammed Baz. 2022. "Transfer Learning for Sentiment Analysis Using BERT Based Supervised Fine-Tuning" Sensors 22, no. 11: 4157. https://doi.org/10.3390/s22114157
APA StyleProttasha, N. J., Sami, A. A., Kowsher, M., Murad, S. A., Bairagi, A. K., Masud, M., & Baz, M. (2022). Transfer Learning for Sentiment Analysis Using BERT Based Supervised Fine-Tuning. Sensors, 22(11), 4157. https://doi.org/10.3390/s22114157