Using Sparrow Search Algorithm for tuning hyperparameters of hybrid machine learning models
摘要
In predictive modeling, hyperparameter tuning plays a critical role in improving model accuracy and generalization. Traditional methods of hyperparameter tuning can be computationally expensive and often fail to achieve optimal performance. The problem lies in effectively balancing model performance and computational cost, which remains a challenge, especially when dealing with complex datasets like testability prediction. This study addresses the need for an efficient and robust method to optimize hyperparameters and improve machine learning (ML) models’ performance. It explores the optimization of predictive modeling by applying an innovative approach of Sparrow Search Algorithm (SSA) for hyperparameter tuning in various ML models. Specifically, it integrates SSA with six hybrid models, including SSA-Bagging, SSA-Random Forest, SSA-Gradient Boosting, SSA-Extra Trees, SSA-Adaboost, and SSA-XGBoost, and evaluates their performance on the Testability Prediction Dataset. Thus, SSA is used to enhance the hybrid models’ performance by selecting the best set of hyperparameters. The employed hybrid models are evaluated using a variety of error metrics, including coefficient of determination (R2), Nash–Sutcliffe efficiency (NSE), normalized 10% index, root mean squared error (RMSE), relative absolute error (RAE), and mean absolute error (MAE), across both training and testing datasets. The results indicate that the SSA-Bagging model outperforms the others, showing the highest accuracy and the lowest error rates, making it the most reliable model in the comparison. Specifically, SSA-Bagging achieved the highest R2 of 0.9989 and NSE of 0.9974, along with the lowest RMSE = 0.0154 and MAE = 0.0126 in testing, demonstrating its strength in making accurate predictions. Conversely, SSA-ET performed the worst, suggesting its limited applicability in this context with its lowest R2 of 0.9590 and highest RMSE of 0.0648. The performance of SSA-Bagging is also compared with that of other advanced optimizers, in which SSA-Bagging again reveals its strength of prediction. This comparison highlights the efficiency of SSA-Bagging for hyperparameter optimization tasks and provides valuable insights into the selection of suitable models and areas for future algorithmic improvements.