MyNixOS website logo
Description

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) <doi:10.1007/s10489-020-01893-z>), Coot Bird Optimization (CBO) (Naruei & Keynia (2021) <doi:10.1016/j.eswa.2021.115352>), and their hybrid (AOCBO), as well as several others such as Harris Hawks Optimization (HHO) (Heidari et al. (2019) <doi:10.1016/j.future.2019.02.028>), Gray Wolf Optimizer (GWO) (Mirjalili et al. (2014) <doi:10.1016/j.advengsoft.2013.12.007>), Ant Lion Optimization (ALO) (Mirjalili (2015) <doi:10.1016/j.advengsoft.2015.01.010>), and Enhanced Harris Hawk Optimization with Coot Bird Optimization (EHHOCBO) (Cui et al. (2023) <doi:10.32604/cmes.2023.026019>). 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) <doi:10.1016/j.procs.2020.12.003> and Liu et al. (2018) <doi:10.1155/2018/6076475>.

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.
Metadata

Version

0.1.0

License

Unknown

Platforms (76)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows