# Short Text Sentiment Classification Using Bayesian and Deep Neural Networks

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Related Work

## 3. Bayesian Network and Deep Neural Network Algorithm

#### 3.1. Deep Neural Network Algorithm

#### 3.2. Bayesian Regularization Deep Belief Networks

#### 3.3. Bayesian Regularized Deep Belief Network Model

## 4. Machine Text Emotion Classification Experiment Based on Deep Belief Network

#### 4.1. Experimental Design

#### 4.2. Classification and Calculation

#### 4.3. Experimental

## 5. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Chang, G.; Huo, H. A method of fine-grained short text sentiment analysis based on machine learning. Neural Netw. World
**2018**, 28, 325–344. [Google Scholar] [CrossRef][Green Version] - Sun, X.; Peng, X.; Hu, M. Extended Multi-modality Features and Deep Learning Based Microblog Short Text Sentiment Analysis. Dianzi Yu Xinxi Xuebao/J. Electron. Inf. Technol.
**2017**, 39, 2048–2055. [Google Scholar] [CrossRef] - Joshi, S.; Deshpande, D. Twitter Sentiment Analysis System. Int. J. Comput. Appl.
**2018**, 180, 35–39. [Google Scholar] [CrossRef] - Piryani, R.; Piryani, B.; Singh, V.K.; Pinto, D. Sentiment analysis in Nepali: Exploring machine learning and lexicon-based approaches. J. Intell. Fuzzy Syst.
**2020**, 39, 2201–2212. [Google Scholar] [CrossRef] - Attieh, J.; Tekli, J. Supervised term-category feature weighting for improved text classification. Knowl. Based Syst.
**2023**, 261, 110215. [Google Scholar] [CrossRef] - El Hindi, K.M.; Aljulaidan, R.R.; AlSalman, H. Lazy fine-tuning algorithms for naïve Bayesian text classification. Appl. Soft Comput.
**2020**, 96, 106652. [Google Scholar] [CrossRef] - Jiang, W.; Zhou, K.; Xiong, C.; Guodong, D.; Chubin, O.; Zhang, J. KSCB: A novel unsupervised method for text sentiment analysis. Appl. Intell.
**2023**, 53, 301–311. [Google Scholar] [CrossRef] - Divate, M.S. Sentiment analysis of Marathi news using LSTM. Int. J. Inf. Technol.
**2021**, 13, 2069–2074. [Google Scholar] [CrossRef] - Bhagat, C.; Mane, D. Survey On Text Categorization Using Sentiment Analysis. Int. J. Sci. Technol. Res.
**2019**, 8, 1189–1195. [Google Scholar] - Albayati, A.Q.; Al_Araji, A. Arabic Sentiment Analysis (ASA) Using Deep Learning Approach. Univ. Baghdad Eng. J.
**2020**, 26, 85–93. [Google Scholar] [CrossRef] - Ali, F.; Ali, A.; Imran, M.; Naqvi, R.A.; Siddiqi, M.H.; Kwak, K.-S. Traffic accident detection and condition analysis based on social networking data. Accid. Anal. Prev.
**2021**, 151, 105973. [Google Scholar] [CrossRef] [PubMed] - Rusnachenko, N.; Loukachevitch, N. Attention-Based Neural Networks for Sentiment Attitude Extraction using Distant Supervision. In Proceedings of the 10th International Conference on Web Intelligence, Mining and Semantics, Biarritz, France, 30 June–3 July 2020; pp. 159–168. [Google Scholar] [CrossRef]
- Gallego, F.O.; Corchuelo, R. Torii: An aspect-based sentiment analysis system that can mine conditions. Software
**2020**, 50, 47–64. [Google Scholar] [CrossRef] - Chen, J.; Yan, S.; Wong, K.C. Verbal aggression detection on Twitter comments: Convolutional neural network for short-text sentiment analysis. Neural Comput. Appl.
**2018**, 3, 10809–10818. [Google Scholar] [CrossRef] - Rehman, A.U.; Malik, A.K.; Raza, B. A Hybrid CNN-LSTM Model for Improving Accuracy of Movie Reviews Sentiment Analysis. Multimed. Tools Appl.
**2019**, 78, 26597–26613. [Google Scholar] [CrossRef] - Karthik, E.; Sethukarasi, T. Sarcastic user behavior classification and prediction from social media data using firebug swarm optimization-based long short-term memory. J. Supercomput.
**2021**, 78, 5333–5357. [Google Scholar] [CrossRef] - Wang, X.; Zhang, H.; Xu, Z. Public Sentiments Analysis Based on Fuzzy Logic for Text. Int. J. Softw. Eng. Knowl. Eng.
**2016**, 26, 1341–1360. [Google Scholar] [CrossRef] - Ashok, K.J.; Trueman, T.E.; Cambria, E. A Convolutional Stacked Bidirectional LSTM with a Multiplicative Attention Mechanism for Aspect Category and Sentiment Detection. Cogn. Comput.
**2021**, 13, 1423–1432. [Google Scholar] - Roseline, V.; Chellam, G.H. Sentiment Classification Using PS-POS Embedding with Bilstm-CRF and Attention. Int. J. Future Gener. Commun. Netw.
**2020**, 13, 3520–3526. [Google Scholar] - Han, H.; Bai, X.; Ping, L. Augmented sentiment representation by learning context information. Neural Comput. Appl.
**2019**, 31, 8475–8482. [Google Scholar] [CrossRef] - Sengan, S.P.; Sagar, V.; Khalaf, O.I.; Dhanapal, R. The optimization of reconfigured real-time datasets for improving classification performance of machine learning algorithms. Math. Eng. Sci. Aerosp.
**2021**, 12, 43–54. [Google Scholar] - Roseline, V.; Herenchellam, D. PS-POS Embedding Target Extraction Using CRF and BiLSTM. Int. J. Adv. Sci. Technol.
**2020**, 29, 10984–10995. [Google Scholar] - Bashar, M.A.; Nayak, R.; Luong, K. Progressive domain adaptation for detecting hate speech on social media with small training set and its application to COVID-19 concerned posts. Soc. Netw. Anal. Min.
**2021**, 11, 69. [Google Scholar] [CrossRef] [PubMed] - Huan, J.L.; Sekh, A.A.; Quek, C.; Prasad, D.K. Emotionally charged text classification with deep learning and sentiment semantic. Neural Comput. Appl.
**2021**, 34, 2341–2351. [Google Scholar] [CrossRef] - Yan, Z.; Cao, W.; Ji, J. Social behavior prediction with graph U-Net+. Discov. Internet Things
**2021**, 1, 18. [Google Scholar] [CrossRef] - Brooke, J.; Hammond, A.; Hirst, G. Using models of lexical style to quantify free indirect discourse in modernist fiction. Lit. Linguist. Comput.
**2017**, 32, 234–250. [Google Scholar] [CrossRef][Green Version] - Kumar, M.; Aggarwal, J.; Rani, A.; Stephan, T.; Shankar, A.; Mirjalili, S. Secure video communication using firefly optimization and visual cryptography. Artif. Intell. Rev.
**2021**, 55, 2997–3017. [Google Scholar] [CrossRef] - Lu, H.; Wang, S.S.; Zhou, Q.W.; Zhao, Y.N.; Zhao, B.Y. Damage and control of major poisonous plants in the western grasslands of China? a review. Rangel. J.
**2012**, 34, 329. [Google Scholar] [CrossRef]

Data Set | Training Set | Test Set | Average Classification Error Rate % |
---|---|---|---|

Iris | 100 | 50 | 1.97 |

Seeds | 150 | 60 | 3.46 |

Perfume Data | 320 | 150 | 2.87 |

Four class | 500 | 200 | 2.59 |

Number of Hidden Layers | Network Structure |
---|---|

2 | X-600-300 |

3 | X-600-300-100 |

5 | X-2000-300-200-100 |

Exact Value | Reconstruction Error 1 | Reconstruction Error 2 | Reconstruction Error 3 | Reconstruction Error 4 | Reconstruction Error 5 | Time (s) | |
---|---|---|---|---|---|---|---|

minimum | 0.8058 | 9.4408 | 0.6078 | 2.4241 | 2.4355 | 1.4961 | 1696.6 |

Imaximum value | 0.8692 | 22.5905 | 10.3566 | 5.2308 | 5.2445 | 4.3040 | 4970.7 |

average value | 0.8303 | 16.0944 | 8.7713 | 3.9798 | 4.1796 | 3.0649 | 3208.9 |

Exact Value | Reconstruction Error 1 | Reconstruction Error 2 | Reconstruction Error 3 | Time (s) | |
---|---|---|---|---|---|

minimum | 0.8116 | 7.3175 | 2.7168 | 1.3974 | 166.3 |

maximum value | 0.8700 | 26.5429 | 6.2811 | 4.4129 | 1503.6 |

average value | 0.8301 | 15.9288 | 4.9615 | 2.9398 | 763.4 |

Exact Value | Reconstruction Error 1 | Reconstruction Error 2 | Time (s) | |
---|---|---|---|---|

minimum | 0.8000 | 7.3296 | 2.7044 | 142.2 |

maximum value | 0.8700 | 26.5921 | 9.5712 | 1117.5 |

average value | 0.8327 | 16.1251 | 5.0907 | 717.4 |

Exact Value | Time (s) | |
---|---|---|

minimum | 0.8133 | 45.35 |

maximum value | 0.8641 | 1117.5 |

average value | 0.8333 | 322.3 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 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

**MDPI and ACS Style**

Shi, Z.; Fan, C. Short Text Sentiment Classification Using Bayesian and Deep Neural Networks. *Electronics* **2023**, *12*, 1589.
https://doi.org/10.3390/electronics12071589

**AMA Style**

Shi Z, Fan C. Short Text Sentiment Classification Using Bayesian and Deep Neural Networks. *Electronics*. 2023; 12(7):1589.
https://doi.org/10.3390/electronics12071589

**Chicago/Turabian Style**

Shi, Zhan, and Chongjun Fan. 2023. "Short Text Sentiment Classification Using Bayesian and Deep Neural Networks" *Electronics* 12, no. 7: 1589.
https://doi.org/10.3390/electronics12071589