## 3 Methodology
### Proposed Method  
Figure 1 depicts the overall conceptual model of OCATC, divided into three phases. Preprocessing procedures are used to prepare the dataset in the initial phase (as discussed in Section 1). The features from the collection are then extracted using TF-IDF. Using 10-fold cross-validation, the extracted features from the dataset are partitioned into different sets in the second stage. After that, the training set is used by PSO during the search for the best configuration. At this phase, PSO generates a set of random solutions where each one of them represents one configuration. The quality of each configuration is evaluated by computing its objective, which is defined based on the accuracy of the classification and the number of selected features. Then, the best personal solution and best global solution to update the solutions in the next iterations in the next step are determined. The process of updating the quality of the solution is repeated until the stopping conditions are met. In the third phase, the testing set assesses the best solution that represents the best configuration. The OCATC phases are discussed in the following. Phase 1: Data preparation. OCATC receives the raw dataset as input to the preprocessing module that applies tokenization, normalization, stop word removal, and stemming technique to prepare the raw dataset. Then, the dataset is represented into the numerical vectors using the TF-IDF approach. Phase 2: Optimal Select configuration using PSO. PSO is used to determine the best configuration from a set of feature selection methods, classifiers, and the number of selected features where this method contains the following steps. (a) Initialization step  
The PSO starts by constructing a set of \(N\) solutions/configurations \(X\) using the following Equation:  
\[X_{ij}=floor(LB_{j}+rand\times(UB_{j}-LB_{j})),j=1,2\ldots,J \tag{14}\]  
where \(LB_{j}\) and \(UB_{j}\) represent the lower and upper boundaries of the \(j\)th dimension of the current solution \(X_{i}\). In this study, we set \(J=3\), since only three elements (dimension) are selected to construct the configuration, the first dimension is a classifier, the second dimension is the feature selection method. In contrast, the last dimension is the number of selected features. Therefore, the value of the lower boundary at the first dimension is one \(LB_{1}=1\) (also for the second dimension \(LB_{2}=1\)), while the third dimension is set to zeros (\(LB_{3}=0\)). The \(UB_{1}=N_{C},UB_{2}=N_{FS}\) and \(UB_{3}=D\), where \(N_{C}\), \(N_{FS}\), and \(D\) are the number of classifiers, feature selection methods, and dimensions of the given dataset, respectively. For further clarification, the representation of each solution is listed in Table 2 where we consider \(N_{C}=4\), \(N_{FS}=6\) and the dimension for the given dataset is \(D=1500\). From Table 2, it can see that the first configuration \(X_{1}\) uses the second classifier and the fourth feature selection method, and 1000 features. The second configuration \(X_{2}\) uses the third classifier, second feature selection method, and 500 features. In the third configuration, \(X_{3}\) uses the first classifier, the fifth feature selection method, and selects 20 features. (b) Updating step  
In this step, the fitness function of each solution is computed using the following Equation:  
\[Fit=\alpha\ \times\ Y_{X_{i}1}+(1-\alpha)\times\ \frac{X_{i3}}{D} \tag{15}\]  
where \(Y_{X_{i1}}\) represents the accuracy of the used classifier in \(X_{i1}\), \(\alpha\) is a random number that balances between the accuracy and the number of selected features. (c) Best Solution Approach step  
This step finds the best personal solution \(Pb_{i}\) and the global best solution \(Gb\) (best configuration). Then, the set of solutions \(X\) is updated using the Equations (12) and (13)  
Figure 1: General Framework of OCATC.