# Classification of Bugs in Cloud Computing Applications Using Machine Learning Techniques
## 4 Result and Analysis  
Four classifiers which have been used in this research for classification with different vectorization techniques and experimental setups are:  
* Naive Bayes
* Decision tree
* Random forest
* Logistic regression  
Aside from the comparative analysis of classifiers, seven experiments, which are listed below, were performed:  
* Three vectorization techniques (Bag-of-words, TF-IDF and Wfigord2 vec). * Parameter tuning using Randomized SearchCV (for both BOW and TF-IDF). * Comparative analysis of four models based on Accuracy, Precision, Recall, and F1-score. The dataset was divided into a training and test dataset with an 80/20 split, meaning that 80% of the total dataset was used for training and 20% for testing. The random state of 42 is used to randomize the 80/20 picked records. These four metrics are commonly used to evaluate the performance of classification models. In order to achieve the best accuracy within the given dataset, it is important to optimize the model's parameters and features to improve the precision, recall, and F1 score as well. A high accuracy alone may not indicate good performance if the precision, recall, or F1 score are low. Therefore, it is important to evaluate all four metrics to assess the overall performance of the model. [22]. Our main goal is to achieve the best accuracy within the given dataset with four stable parameters [23]. The four parameters, Accuracy, Precision, F1 score, and Recall, are formulated as:  
\[\text{Accuracy}=(\text{TP}+\text{TN})/(\text{TP}+\text{TN}+\text{FP}+\text{ FN}) \tag{5}\]  
\[\text{Precision}=\text{TP}/(\text{TP}+\text{FP}) \tag{6}\]  
\[\text{Recall}=\text{TP}/(\text{TP}+\text{FN}) \tag{7}\]  
\[\text{F1 score}=2\times(\text{Precision}\times\text{Recall})/(\text{Precision}+\text{Recall}) \tag{8}\]  
A group of supervised learning algorithms known as Naive Bayes methods utilize [PERSON] theorem with the \"naive\" assumption that each pair of features is conditionally independent given the value of the class variable [24]. As this is a multi-class classification problem, Multinomial Naives are imported from the sklearn library and incorporated with all the enlisted experiments. The results of all the experiments are concluded in Table 3.  
From Table 3, it can be concluded that Naive Bayes outperformed BOW with tuned hyper-parameters. The achieved training and test accuracy was 97.14 and 88.18%, respectively. Figure 15 is the confusion matrix of Naive Bayes with the BOW-tuned parameters model, while Figure 16 is the classification report of the respective model. \begin{table}
\begin{tabular}{c c c c c c c} \hline
**Sr\#** & **Dataset** & **BOW** & **TF-IDF** & **Word2 vec** & **PT—BOW** & **PT—TFIDF** \\ \hline \multirow{3}{*}{1} & \multirow{3}{*}{Imbalance} & Train: 86.43 & Train: 81.42 & Train: 98.47 & Train: 64.98 & Train: 66.19 \\  & & Test: 66.66 & Test: 65.28 & Test: 34.16 & Test: 65.13 & Test: 66.19 \\ \cline{1-1} \cline{3-6}  & & Train: 91.66 & Train: 91.89 & Train: 92.11 & Train: 93.34  
Figure 16 shows that the precision of all classes lies between the range of 73 and 95%, whereas class 4 and 5 has 100% recall, which are comparatively good scores. The F1 score shows that the model is not biased and the trained model is generalized, and it is not doing overfitting or underfitting. All classes contributed almost equally in training [25]. Figure 16: Classification Report of Naive Bayes. Figure 15: Confusion matrix of Naive Bayes. A broad predictive modelling tool called decision tree analysis has many applications. Decision trees are often built using an algorithmic method that finds ways to divide a data set depending on several criteria. The decision tree classifier used in this research work is imported from the sklearn trees library, and then the model was built bypassing the training dataset and labels.