Hyperparameter Optimization of Ensemble Models for Spam Email Detection
Unsolicited emails, popularly referred to as spam, have remained one of the biggest threats to cybersecurity globally. More than half of the emails sent in 2021 were spam, resulting in huge financial losses. The tenacity and perpetual presence of the adversary, the spammer, has necessitated the need...
Main Authors: | , |
---|---|
Format: | Article |
Language: | English |
Published: |
MDPI AG
2023-02-01
|
Series: | Applied Sciences |
Subjects: | |
Online Access: | https://www.mdpi.com/2076-3417/13/3/1971 |
_version_ | 1797625017970720768 |
---|---|
author | Temidayo Oluwatosin Omotehinwa David Opeoluwa Oyewola |
author_facet | Temidayo Oluwatosin Omotehinwa David Opeoluwa Oyewola |
author_sort | Temidayo Oluwatosin Omotehinwa |
collection | DOAJ |
description | Unsolicited emails, popularly referred to as spam, have remained one of the biggest threats to cybersecurity globally. More than half of the emails sent in 2021 were spam, resulting in huge financial losses. The tenacity and perpetual presence of the adversary, the spammer, has necessitated the need for improved efforts at filtering spam. This study, therefore, developed baseline models of random forest and extreme gradient boost (XGBoost) ensemble algorithms for the detection and classification of spam emails using the Enron1 dataset. The developed ensemble models were then optimized using the grid-search cross-validation technique to search the hyperparameter space for optimal hyperparameter values. The performance of the baseline (un-tuned) and the tuned models of both algorithms were evaluated and compared. The impact of hyperparameter tuning on both models was also examined. The findings of the experimental study revealed that the hyperparameter tuning improved the performance of both models when compared with the baseline models. The tuned RF and XGBoost models achieved an accuracy of 97.78% and 98.09%, a sensitivity of 98.44% and 98.84%, and an F1 score of 97.85% and 98.16%, respectively. The XGBoost model outperformed the random forest model. The developed XGBoost model is effective and efficient for spam email detection. |
first_indexed | 2024-03-11T09:50:53Z |
format | Article |
id | doaj.art-401def87246247c6a9901bcd2bc90d35 |
institution | Directory Open Access Journal |
issn | 2076-3417 |
language | English |
last_indexed | 2024-03-11T09:50:53Z |
publishDate | 2023-02-01 |
publisher | MDPI AG |
record_format | Article |
series | Applied Sciences |
spelling | doaj.art-401def87246247c6a9901bcd2bc90d352023-11-16T16:12:55ZengMDPI AGApplied Sciences2076-34172023-02-01133197110.3390/app13031971Hyperparameter Optimization of Ensemble Models for Spam Email DetectionTemidayo Oluwatosin Omotehinwa0David Opeoluwa Oyewola1Department of Mathematics and Computer Science, Federal University of Health Sciences, Otukpo P.M.B. 145, NigeriaDepartment of Mathematics and Statistics, Federal University Kashere, Gombe P.M.B. 0182, NigeriaUnsolicited emails, popularly referred to as spam, have remained one of the biggest threats to cybersecurity globally. More than half of the emails sent in 2021 were spam, resulting in huge financial losses. The tenacity and perpetual presence of the adversary, the spammer, has necessitated the need for improved efforts at filtering spam. This study, therefore, developed baseline models of random forest and extreme gradient boost (XGBoost) ensemble algorithms for the detection and classification of spam emails using the Enron1 dataset. The developed ensemble models were then optimized using the grid-search cross-validation technique to search the hyperparameter space for optimal hyperparameter values. The performance of the baseline (un-tuned) and the tuned models of both algorithms were evaluated and compared. The impact of hyperparameter tuning on both models was also examined. The findings of the experimental study revealed that the hyperparameter tuning improved the performance of both models when compared with the baseline models. The tuned RF and XGBoost models achieved an accuracy of 97.78% and 98.09%, a sensitivity of 98.44% and 98.84%, and an F1 score of 97.85% and 98.16%, respectively. The XGBoost model outperformed the random forest model. The developed XGBoost model is effective and efficient for spam email detection.https://www.mdpi.com/2076-3417/13/3/1971spam detectionspam emailsrandom forestXGBoostensemblehyperparameter |
spellingShingle | Temidayo Oluwatosin Omotehinwa David Opeoluwa Oyewola Hyperparameter Optimization of Ensemble Models for Spam Email Detection Applied Sciences spam detection spam emails random forest XGBoost ensemble hyperparameter |
title | Hyperparameter Optimization of Ensemble Models for Spam Email Detection |
title_full | Hyperparameter Optimization of Ensemble Models for Spam Email Detection |
title_fullStr | Hyperparameter Optimization of Ensemble Models for Spam Email Detection |
title_full_unstemmed | Hyperparameter Optimization of Ensemble Models for Spam Email Detection |
title_short | Hyperparameter Optimization of Ensemble Models for Spam Email Detection |
title_sort | hyperparameter optimization of ensemble models for spam email detection |
topic | spam detection spam emails random forest XGBoost ensemble hyperparameter |
url | https://www.mdpi.com/2076-3417/13/3/1971 |
work_keys_str_mv | AT temidayooluwatosinomotehinwa hyperparameteroptimizationofensemblemodelsforspamemaildetection AT davidopeoluwaoyewola hyperparameteroptimizationofensemblemodelsforspamemaildetection |