# Deep Learning for Sarcasm Identification in News Headlines
## 5 Results  
In this study, we utilized machine learning techniques to detect sarcastic headlines, including several classifiers such as random forest, multinomial naive Bayes, Bernoulli naive Bayes, decision tree, and support vector. We prepared the data by employing tokenization techniques on a dataset of news headlines and used the Keras tokenizer to convert the headlines into a form suitable for analysis. We created an embedding matrix  
Figure 6: Structure of the GMP-LSTM model. Figure 7: Detailed layered architecture of GMP-LSTM. and constructed a GMP-LSTM model with binary crossentropy as the loss function and the Adam optimizer. This study evaluated the performance of a GMP-LSTM model in detecting sarcastic headlines using various evaluation metrics. The training accuracy score, testing accuracy score, and validation accuracy score was calculated and presented in Table 5. The GMP-LSTM model achieved the highest accuracy of 92%, which outperformed Bernoulli naive Bayes and support vector classifiers. The precision, recall, F1, and accuracy metrics were calculated and presented in Table 6. The results show that the GMP-LSTM model demonstrated high accuracy in predicting both sarcastic and non-sarcsic headlines. Figures 8 and 9 present the relationship between accuracy and loss for the training, validation, and testing sets. These findings highlight the potential of deep learning techniques in text classification and sentiment analysis tasks, particularly in detecting sarcastic headlines. Performance evaluation of different classifiers was conducted using a dataset, and the results are presented in Table 6. The evaluation metrics used included precision, re-call, F1, and accuracy. Precision is a measure of the number of true positive predictions made by the classifier, out of all positive predictions. Recall is a measure of the number of true positive predictions made by the classifier, out of all actual positive instances. F1 is the harmonic mean of precision and recall and is a commonly used overall measure of classifier \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Classifiers** & **Precision** & **Recall** & **F1** & **Accuracy** \\ \hline Decision tree & 71.2407\% & 70.4845\% & 70.8606\% & 74.6462\% \\ Random forest & 87.8693\% & 83.2642\% & 85.5048\% & 80.8162\% \\ Multinomial & 88.8000\% & 73.4013\% & 80.3697\% & 83.5177\% \\ Bernoulli & 84.7538\% & 80.1688\% & 82.3976\% & 84.2549\% \\ Support vector & 82.0578\% & 81.2152\% & 81.2215\% & 84.2245\% \\ LSTM model & 62.3196\% & 78.3671\% & 69.4281\% & 64.8793\% \\
**Proposed GMP-LSTM** & **98.2501\%** & **97.5473\%** & **98.3913\%** & **92.5486\%** \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Performance matrix for applied classifiers. Figure 8: Training and validation accuracy of the GMP-LSTM model. performance. Accuracy is a simple measure of the number of correct predictions made by the classifier, out of all predictions. The results show that the GMP-LSTM model had the highest accuracy of 92.5486%, with high precision, recall, and F1 scores as well. The other classifiers showed varying degrees of accuracy, with the decision tree and random forest classifiers having the lowest accuracy scores of 74.6462% and 80.8162%, respectively. These findings suggest that the GMP-LSTM model is a promising approach for text classification and sentiment analysis tasks. Figure 10 serves as a graphical representation of the performance evaluation of various classifiers based on four key metrics: precision, recall, F1, and accuracy. Each classifier is represented by a separate bar, and the bar's height corresponds to the metric's value for that particular classifier. The graph aids in interpreting and comparing the results, facilitating the identification of the most effective classifier for the given problem. Figure 11 presents the results of manual testing performed on the proposed GMP-LSTM model, which was evaluated on a dataset containing sarcastic and non-sarcastic sentences.