# Towards a Hybrid Security Framework for Phishing Awareness Education and Defense
## 12 Architecture Performance Comparisons
### Class Imbalance  
Oversampling and under-sampling are approaches used to handle class imbalance concerns in the context of machine learning and classification tasks, with the main objective of enhancing model accuracy. When working with datasets where one class considerably outnumbers the other, skewing model performance, these techniques are helpful.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline
**Activation Function** & **Accuracy** & **Precision** & **Recall** & **F1 Score** & **Confusion Matrix** & **Execution Time (s)** \\ \hline ReLU & 0.94699 & 0.96456 & 0.94187 & 0.95308 & [66,853 & 3236] & 936.976 \\  & & & & & [5435 & 88,076] & \\ \hline Softmax & 0.92949 & 0.93394 & 0.94337 & 0.93863 & [63,850 & 239] & 865.938 \\  & & & & & [5295 & 88,216] & \\ \hline Leaky ReLU & 0.94577 & 0.96861 & 0.93543 & 0.95173 & [67,255 & 2834] & 740.610 \\  & & & & & [6038 & 87,473] & 901.384 \\ \hline PReLU & 0.94328 & 0.96450 & 0.93519 & 0.94962 & [66,871 & 3218] & 901.384 \\  & & & & & [6060 & 87,451] & \\ \hline ThresholdedReLU & 0.88110 & 0.86350 & 0.94067 & 0.90043 & [56,185 & 13,904] & 673.648 \\  & & & & & [5548 & 87,963] & **800.498** \\ \hline
**ELU** & **0.94795** & **0.97006** & **0.93788** & **0.95370** & **[67,383** & **2706]** & **800.498** \\ \hline \end{tabular}
\end{table}
Table 7: Performance Comparisons among different Activation Functions.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline
**Optimizer** & **Accuracy** & **Precision** & **Recall** & **F1 Score** & **Confusion Matrix** & **Execution Time (s)** \\ \hline SGD & 0.93629 & 0.94017 & 0.94892 & 0.94453 & [64,443 & 5646] & 841.052 \\  & & & & & [4776 & 88,735] & 821.842 \\ \hline Nadam & 0.94665 & 0.96549 & 0.94027 & 0.95271 & [5885 & 87,926] & 821.842 \\ \hline
**Adam** & **0.94795** & **0.97006** & **0.93788** & **0.95370** & **[67,383** & **2706]** & **800.498** \\  & & & & & [**5808** & **87,703]** & **800.498** \\ \hline \end{tabular}
\end{table}
Table 8: Performance Comparisons among different Optimizers.  
Class imbalance happens when there are disproportionately more instances of one class than the other. This frequently leads to the model in binary classification having a high bias towards the dominant class. As a result, the model may not perform well for the minority class, producing predictions with low accuracy, poor generalization, and bias.  
By raising the proportion of members of the minority class, oversampling is a method for balancing the distribution of classes. The oversampling technique known as Synthetic Minority Over-Sampling (SMOTE) was applied. The class distribution is balanced by creating synthetic samples for the minority class. On the other hand, by choosing a subset of examples at random, under-sampling is a strategy that lowers the number of instances in the majority class. The imbalanced-learn library was used to balance the data. The imbalanced data may still have higher accuracy as compared to the oversampled and under-sampled data. This could be because noise can be introduced in the dataset by oversampling or under-sampling. In our example, under-sampling or oversampling does not have much impact on the results compared to the original dataset that was used, as illustrated in Table 10.