Support Vector Regression with Metaheuristic Algorithms
Optimization
Provides a hybrid modeling framework combining Support Vector Regression (SVR) with metaheuristic optimization algorithms, including the Archimedes Optimization Algorithm (AO) (Hashim et al. (2021) ), Coot Bird Optimization (CBO) (Naruei & Keynia (2021) ), and their hybrid (AOCBO), as well as several others such as Harris Hawks Optimization (HHO) (Heidari et al. (2019) ), Gray Wolf Optimizer (GWO) (Mirjalili et al. (2014) ), Ant Lion Optimization (ALO) (Mirjalili (2015) ), and Enhanced Harris Hawk Optimization with Coot Bird Optimization (EHHOCBO) (Cui et al. (2023) ). The package enables automatic tuning of SVR hyperparameters (cost, gamma, and epsilon) to enhance prediction performance. Suitable for regression tasks in domains such as renewable energy forecasting and hourly data prediction. For more details about implementation and parameter bounds see: Setiawan et al. (2021) and Liu et al. (2018) .
metaSVR: Support Vector Regression with Metaheuristic Algorithms Optimization
metaSVR is an R Package to integrates Support Vector Regression (SVR)
with various metaheuristic algorithms for automated hyperparameter
tuning which is: cost, gamma, and epsilon.
This package can be used to do prediction using SVR for either small or
big dataset and to do task where required optimal performance, such as
forecasting renewable energy production, forecasting air pollutant, or
modelling any regression that involve nonlinear patterns.
Features
Features provided in this package include:
- Hybrid of SVR with several metaheuristic algorithms such as:
- Archimedes Optimization (AO)
- Coot Bird Optimization (CBO)
- Combined Archimedes Optimization with Coot Bird Optimization (AOCBO)
- Harris Hawks Optimization (HHO)
- Grey Wolf Optimizer (GWO)
- Ant Lion Optimization (ALO)
- Enhanced Harris Hawks Optimization with Coot Bird Optimization
(EHHOCBO)
- SVR can be customized by kernel:
radial, polynomial, or sigmoid
- Multiple objective functions supported:
sMAPE, MAPE, RMSE, MAE
- Flexible hyperparameter search space for
cost, gamma, and
epsilon
- Built-in support for min-max normalization and automatic
denormalization
- Outputs include best parameter set, iteration history, time used, and
evaluation metrics
Dependencies
Features provided in this package include:
- e1071 (for Support Vector Regression Modelling and Kernel)
- stats (for prediction and generate random number)
- hms (for calculating optimization duration)
Installation
You can install the development version of metaSVR from
GitHub with:
# install.packages("devtools")
devtools::install_github("rechtianaputri/metaSVR")
Example
Here is a simple usage example of metaSVR using synthetic data:
library(metaSVR)
#Generate synthetic data
set.seed(123)
x <- matrix(rnorm(100), ncol = 2)
y <- x[,1] * 3 + rnorm(50)
# Run SVR Hybird with AOCBO
result <- svrHybrid(x_train = x[1:40,], y_train = y[1:40],
x_test = x[41:50,], y_test = y[41:50],
kernel = "radial", optimizer = "AOCBO",
objective = "SMAPE", is.y.normalize = FALSE,
max_iter = 100, N = 40)
# Access Results
result$best_params # show the best parameter result
result$total_iter # show total iteration to optimize
result$model # SVR model optimizing by metaheuristic algorithms
result$time # Time used to generate optimization
Documentation
Each metaheuristic is implemented as a standalone optimizer, used by
each optimization to improve SVR. For full documentation see the help
files:
?svrHybrid
?AO
?CBO
?AOCBO
?loss_calculate
Authors and Contributors
This package was developed by:
- Rechtiana Putri Arini
- Robert Kurniawan
- I Nyoman Setiawan
- Zulhan Andika Asyraf
Citation
To cite the metaSVR package, please use:
citation("metaSVR")
#>
#> To cite package 'metaSVR' in publications use:
#>
#> Arini RP, Kurniawan R, Setiawan IN, Asyraf ZA (2025). _metaSVR:
#> Support Vector Regression with Metaheuristic Algorithms
#> Optimization_. R package version 0.1.0,
#> <https://github.com/rechtianaputri/metaSVR>.
#>
#> Arini RP, Kurniawan R, Setiawan IN, Asyraf ZA (2025). _metaSVR:
#> Support Vector Regression with Metaheuristic Algorithms
#> Optimization_. R package version 0.1.0,
#> <https://github.com/rechtianaputri/metaSVR>.
#>
#> To see these entries in BibTeX format, use 'print(<citation>,
#> bibtex=TRUE)', 'toBibtex(.)', or set
#> 'options(citation.bibtex.max=999)'.
References
- Setiawan, I. N., Kurniawan, R., Yuniarto, B., Caraka, R. E., &
Pardamean, B. (2021). Parameter Optimization of Support Vector
Regression Using Harris Hawks Optimization. Procedia Computer Science,
196, 175–182.
- Mirjalili, S. (2015). The Ant Lion Optimizer. Advances in Engineering
Software, 83, 80-98.
- Hashim, F. A., Hussain, K., Houssein, E. H., Mabrouk, M. S., &
Al-Atabany, W. (2021). Archimedes Optimization Algorithm: A New
Metaheuristic Algorithm for Solving Optimization Problems. Applied
Intelligence, 51(3), 1531–1551.
- Naruei, I., & Keynia, F. (2021). A New Optimization Method Based on
COOT Bird Natural Life Model. Expert Systems with Applications, 183.
- Cui, H., Guo, Y., Xiao, Y., Wang, Y., Li, J., Zhang, Y., & Zhang, H.
(2023). Enhanced Harris Hawks Optimization Integrated with Coot Bird
Optimization for Solving Continuous Numerical Optimization Problems.
CMES - Computer Modeling in Engineering and Sciences, 137(2),
1635–1675.
- Mirjalili, S., Mirjalili, S. M., & Lewis, A. (2014). Grey wolf
optimizer. Advances in engineering software, 69, 46-61.
- Heidari, A. A., Mirjalili, S., Faris, H., Aljarah, I., Mafarja, M., &
Chen, H. (2019). Harris hawks optimization: Algorithm and
applications. Future generation computer systems, 97, 849-872.
- Liu, H.-H., Chang, L.-C., Li, C.-W., & Yang, C.-H. (2018). Particle
Swarm Optimization-Based Support Vector Regression for Tourist
Arrivals Forecasting. Computational Intelligence and Neuroscience,
2018, 1–13.