# Effective Detection of Malicious Uniform Resource Locator (URLs) Using Deep-Learning Techniques
## 4 Result and Discussion
### Performance Evaluation on Other Datasets
#### 4.6.1 Kaggle Dataset  
The Kaggle platform is a well-known community center for experts and hobbyists in data science, machine learning, and artificial intelligence. Kaggle datasets are collections of data that are shared and hosted on the network. These datasets are publicly available for educational, research, and competitive purposes and are contributed to by a variety of entities, including Kaggle itself, organizations, and individual users. Numerous fields are covered by Kaggle datasets, including financial forecasting, sentiment analysis, image classification, virus detection, and fraud detection. They are simple to utilize in data analysis and machine learning models since they are available in common forms such as CSV, Excel, JSON, image files, and audio files. We downloaded a dataset of 632,503 URLs, which comprised both benign and malicious URLs. The benign samples have 316,252 URLs and the malicious samples have 316,251 URLs [24]. Out of 632,503 URL samples, we used 15% of the dataset, which resulted in 94, 875 samples. We used this dataset to assess our proposed model and we obtained 99.69% accuracy and a loss of 0.016. This indicates that the proposed model is capable of accurately classifying the malicious and legitimate links as shown in Table 7.  
Figure 13 visualizes the confusion matrix of the performance of a binary classifier in predicting two classes: benign and malicious. Each cell in the matrix represents the number of instances where the model made a specific prediction, providing insight into its accuracy. In the top-left corner, we saw 9441 TNs, indicating that the model correctly classified 9441 benign samples. Similarly, the bottom-right corner shows 9475 TPs, meaning that 9475 malicious samples were correctly identified. The misclassification rates are impressively low. The top-right corner displays 15 FPs, which are benign samples incorrectly predicted as malicious. On the other hand, the bottom-left corner shows just 44 FNs, representing malicious samples incorrectly classified as benign. These low misclassification \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Class and Metrics** & **Precision** & **Recall** & **F1-score** & **Support** \\ \hline
0 & 0.99 & 0.98 & 0.99 & 8881 \\
1 & 0.98 & 0.99 & 0.98 & 8563 \\ Accuracy & & & 0.99 & 17,444 \\ Macro average & 0.99 & 0.99 & 0.99 & 17,444 \\ Weighted average & 0.99 & 0.99 & 0.99 & 17,444 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: The classification report for the proposed model. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Metrics** & **Loss** & **Accuracy (\%)** & **Precision (\%)** & **Recall (\%)** & **F1-Score (\%)** \\ \hline Training set & 0.0172 & 99.66 & 99.81 & 99.52 & 99.69 \\ Testing set & 0.0167 & 99.69 & 99.84 & 99.54 & 99.69 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Performance of the proposed model on the Kaggle dataset. rates highlight the precision and sensitivity of the model, ensuring that both benign and malicious samples were accurately identified in most cases. Overall, the classifier demonstrates better performance with minimal errors. This is critical in high-stakes applications like malicious detection, where false negatives (missed malicious) could compromise security, and false positives (misclassified benign samples) could lead to unnecessary actions. The balance between true positives, true negatives, and minimal misclassifications reflects the robustness and reliability of the classifier in handling this binary classification task. The ROC curve, shown in Figure 14, illustrates the performance of the binary classifier in differentiating between two classes. The FPR was 0.002. The TPR, shown on the y-axis, is the percentage of real positive samples that the classifier correctly detected. Additionally, there is a dashed diagonal line on the graph where the TPR and FPR are equal at all points, acting as the baseline for random prediction.