# Towards AI-Generated Essay Classification Using Numerical Text Representation
## 5 Experiments and Results
### Results of Classification
For distilBERT sentence embeddings, the lowest and highest accuracies were 93.78% and 96.63%, respectively. TF-IDF weights and parameterized TF-IDF weights achieved the highest accuracy with logistic regression. However, for Bag of Words, the fastText model (both Skip-gram and continuous Bag of Words), and MiniLM embeddings, the best performance was with the XGBoost classifier. Similarly, for distilBERT sentence embeddings, the highest accuracy was achieved with logistic regression, but the precision and specificity were higher for the XGBoost classifier. This indicates that, despite slightly lower accuracy, XGBoost better detected the positive class in the test set and made fewer errors regarding negative cases. \begin{table}
\begin{tabular}{l l c c c c c c} \hline \hline
**Embedding Technique** & **Classifiers** & **Accuracy** & **Precision** & **Recall** & **Specificity** & **F1-Score** & **MCC** \\ \hline \multirow{4}{*}{ Bag of Words} & Logistic Regression & 99.05 & 99.33 & **98.76** & 99.34 & **99.05** & **98.10** \\  & Random Forest & 97.90 & 99.25 & 96.52 & 99.27 & 97.87 & 95.83 \\  & XGBoost & **98.96** & **99.54** & 98.38 & **99.54** & 98.95 & 97.93 \\  & LightGBM & 98.63 & 99.08 & 98.17 & 99.09 & 98.62 & 97.26 \\ \hline TF-IDF & Logistic Regression & **99.82** & **99.35** & **98.28** & **99.36** & **98.82** & **97.65** \\  & Random Forest & 97.78 & 99.22 & 96.32 & 99.25 & 97.75 & 95.60 \\  & XGBoost & 98.78 & 99.31 & 98.24 & 99.31 & 98.77 & 97.56 \\  & LightGBM & 98.55 & 99.10 & 97.99 & 99.11 & 98.54 & 97.10 \\ \hline \multirow{2}{*}{ Parameterized TF-IDF} & Logistic Regression & **98.98** & **99.54** & **98.42** & **99.54** & **98.98** & **97.97** \\  & Random Forest & 97.72 & 99.06 & 96.36 & 99.09 & 97.69 & 95.48 \\  & XGBoost & 98.78 & 99.24 & 98.31 & 99.25 & 98.77 & 97.56 \\  & LightGBM & 98.51 & 99.05 & 97.96 & 99.06 & 98.51 & 97.03 \\ \hline fastText (Skip-gram) & Logistic Regression & 97.80 & 98.76 & 96.82 & 98.79 & 97.78 & 95.63 \\  & Random Forest & 98.03 & 98.91 & 97.14 & 98.93 & 98.02 & 96.08 \\  & XGBoost & **98.91** & **99.42** & **98.40** & **99.43** & **98.91** & **97.83** \\  & LightGBM & 98.83 & 99.35 & 98.31 & 99.36 & 98.83 & 97.67 \\ \hline fastText (Continuous Bag of Words) & Logistic Regression & 97.87 & 98.49 & 97.23 & 98.51 & 97.86 & 95.75 \\  & Random Forest & 96.59 & 97.62 & 95.52 & 97.67 & 96.55 & 93.21 \\  & XGBoost & **98.17** & **98.75** & **97.58** & **98.77** & **98.16** & **96.35** \\  & LightGBM & 97.98 & 98.68 & 97.26 & 98.70 & 97.96 & 95.96 \\ \hline fastText (Pretrained Model) & Logistic Regression & 89.88 & 91.56 & 87.85 & 91.90 & 89.67 & 79.83 \\  & Random Forest & 95.41 & 96.14 & 94.62 & 96.20 & 95.38 & 90.84 \\  & XGBoost & **97.42** & **98.16** & **96.69** & **98.17** & **97.42** & **94.87** \\  & LightGBM & 96.87 & 97.45 & 96.25 & 97.48 & 96.85 & 93.74 \\ \hline Sentence Embeddings MiniLM & Logistic Regression & 95.73 & 96.23 & 95.20 & 96.27 & 95.71 & 91.47 \\  & Random Forest & 95.06 & 96.55 & 93.46 & 96.66 & 94.98 & 90.17 \\  & XGBoost & **96.47** & **97.17** & **95.72** & **97.21** & **96.44** & **92.94** \\  & LightGBM & 96.13 & 96.84 & 95.38 & 96.89 & 96.11 & 92.28 \\ \hline Sentence Embeddings distilBERT & Logistic Regression & **96.63** & 96.70 & **96.55** & 96.71 & **96.62** & **93.25** \\  & Random Forest & 93.78 & 95.29 & 92.11 & 95.45 & 93.67 & 87.61 \\  & XGBoost & 96.24 & **97.31** & 95.11 & **97.37** & 96.19 & 92.50 \\  & LightGBM & 95.60 & 96.39 & 94.74 & 96.46 & 95.56 & 91.21 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Comparison of metrics for various embeddings and classifiers.