## 2 Materials and Methods
### Conventional Approach  
The conventional approach to classifying text makes use of all the extracted features of the text corpus to predict the given category. This can be represented mathematically as  
\[\hat{y}\triangleq f(X) \tag{1}\]  
where \(X\) is a vector of the text features, \(\hat{y}\) is the predicted value of the text category, and \(f(. )\) is a function defining the prediction process. Different conventional models are used to implement this prediction process. These include Naive Bayes (NB), Support Vector Machine (SVM), Deep Neural Networks (DNN), Bidirectional Encoder Representations from Transformers (BERT), and Recurrent Neural Networks (RNN). Figure 1 represents the conventional text classification using NB. Considering a news corpus with a feature vector \(X=(x_{1},x_{2},\ldots,x_{n})\) and category set \(y=\{y_{1},y_{2},\ldots,y_{m}\}\), where the elements of \(y\) are mutually exclusive. Using a conventional probabilistic learning model such as NB, the text classification can be expressed based on the Bayes rule as follows:  
\[\hat{y}=P(y|x_{1},x_{2},\ldots,x_{n})=\frac{P(y)P(x_{1},x_{2},\ldots,x_{n}|y)} {P(x_{1},x_{2},\ldots,x_{n})} \tag{2}\]  
where \(n\) is the number of features in \(X\), \(P(y)\) is the prior distribution of the category \(y\), \(\hat{y}\) is the posterior distribution of the category \(y\), \(P(X|y)\) is the likelihood of the category \(y\) given all text features in \(X\) (i.e., probability of \(X\) given \(y\)), and \(P(x_{1},x_{2},\ldots,x_{n})=P(X)\) is the marginal distribution of the text features (also called evidence). Figure 1: Text classification using Naive Bayes. The final predicted category (or class) \(\hat{y}_{k}\) of \(y\) is defined by the class \(y_{k}\) with the maximum probability over all categories. \[\hat{y}_{k}=\operatorname*{arg\,max}_{k\in\{1,2,\dots,m\}}\left(\frac{P(y_{k})P (x_{1},x_{2},\dots,x_{n}|y_{k})}{P(x_{1},x_{2},\dots,x_{n})}\right) \tag{3}\]  
where \(m\) is the number of categories in \(y\), \(y=\{y_{1},y_{2},\dots,y_{m}\}\), and \(P(y_{k})\) is the probability of a given category \(y_{k}\) of \(y\). Given that \(P(x_{1},x_{2},\dots,x_{n})\) is independent on \(y\), then  
\[\hat{y}_{k}\propto\operatorname*{arg\,max}_{k\in\{1,2,\dots,m\}}(P(y_{k})P(x_ {1},x_{2},\dots,x_{n}|y_{k})) \tag{4}\]  
In this way, \(P(x_{1},x_{2},\dots,x_{n})\) is considered as a normalizing factor that depends only on \(X\), and, thus, will be a constant if the values of all the features of \(X\) are known. The learning process based on this Bayesian inference model is then defined as an update operation that aims to maximize the predicted distribution \(\hat{y}\) over the cumulative instances of \(X\) and \(y\). \[\max(\hat{y})=\operatorname*{arg\,max}_{j\in\{1,2,\dots,l\}}\left(\frac{P(y^{( j)})P(X^{(j)}|y^{(j)})}{P(X^{(j)})}\right) \tag{5}\]  
where \(j\) is the numbering of the cumulative instances (also considered here as the learning or update time), and \(l\) is the total instances of \(X\) and \(y\), i.e., the data size. As \(l\) increases, the probability improves [15], but increase in \(l\) will also increase the computational complexity of the learning and inference process. Thus, this model is preferable with a small data size. Nevertheless, unlike data-hungry models, such as deep neural networks that require a large data size to perform well, this Bayesian model does perform well with small data sizes. From this Bayesian inference and learning, NB is defined using the assumption of mutual independence between the features of \(X\) conditioned on the category \(y\).