## 3 Proposed Methodology
### Algorithm Flow of TextCNN + RoBERTa and RNN_Bert_Based
The experimental results of the proposed algorithm model and the comparison model on the SST-2 dataset, which is a benchmark dataset for sentiment analysis tasks, were comprehensively depicted and analyzed in Figure 10. The figure illustrates performance metrics of accuracy, highlighting the effectiveness and efficiency of the proposed model compared to the baseline or comparison model. The visual representation in Figure 10 also provides insight into the robustness of the models across different sentiment categories, further emphasizing the improvements or limitations observed during the experiments. The model accuracy of our proposed method, RNN_Bert_based, along with other leading models such as XLNet, TextCNN + RoBERTa, ALBERT, and KNN_Bert_based has been rigorously experimented on, and its results have been meticulously captured, analyzed, and documented for a comprehensive and in-depth comparison. The experimental results demonstrated the effectiveness and potential of the proposed RNN_Bert_based model in addressing the complexity of sentiment analysis and classification tasks. This points out the way for advancements in our proposed model in NLP and machine learning research. Based on the results obtained from the evaluation metrics for Bert, XLNet, TextCNN + RoBERTa, ALBERT, KNN_Bert_based, and the proposed RNN_Bert_based, it is evident that the proposed RNN_Bert_based achieved the highest performance accuracy across all metrics. RNN_Bert_based can achieve an accuracy of 94.8%, KNN_Bert_based can achieve an accuracy of 92.31%, TextCNN + RoBERTa can achieve an accuracy of 94.00%, ALBERT can achieve an accuracy of 91.92%, Bert can achieve an accuracy of 92.15%, and XLNet showed a slightly lower accuracy of 84.16%, among other methods. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Number** & **Parameter** & **Value** \\ \hline
1 & Max\_length & 256 \\
2 & Batch\_size & 16 \\
3 & Learning\_rate & \(2\times 10^{-5}\) \\
4 & Dropout & 0.5 \\
5 & Epoch & 5 \\
6 & Activation Function & ReLU \\
7 & Patience & 1 \\
8 & max\_seq\_len & 50 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameter settings value for the model. The subsequent experimental results present a detailed comparison of precision, recall, and F1 score metrics for each model when evaluated against the proposed RNN_Bert_based method. This comprehensive analysis demonstrates that the RNN_Bert_based model not only outperforms traditional models in terms of these key performance indicators but also highlights its potential to significantly enhance the field of NLP and machine learning research. The results demonstrate that the proposed model effectively captures and leverages the intricate patterns within the data, resulting in substantial improvements in model accuracy and generalization. Consequently, the model offers a robust solution for various NLP tasks. This development highlights the significance of integrating RNN architectures with Bert-based embeddings to advance current methodologies in this work. This improvement is evident in its ability to achieve the highest performance across all metrics, boasting the RNN_Bert_based model's precision, recall, and F1 score to reach the value of 94.80%. Additionally, comparing with other models, TextCNN + RoBERTa follows closely with a precision of 94.10%, recall of 94.0%, and F1 score of 94.0%. KNN_Bert_based also performs well with a precision of 92.10%, recall of 92.40%, and F1 score of 92.10%. ALBERT and Bert exhibit slightly lower but still notable performance, with ALBERT achieving a precision of 91.70%, recall of 91.80%, and F1 score of 91.70%, and Bert attaining a precision of 92.00%, recall of 92.30%, and F1 score of 92.00%. However, XLNet trails behind the others with a precision of 83.60%, recall of 83.60%, and F1 score of 83.95%. Figure 11 shows a comparison of the RNN_Bert_based model's precision with other methods.