SBOAtools is an R package developed for the Secretary Bird Optimization Algorithm (SBOA). The package supports both general-purpose continuous optimization and single-hidden-layer multilayer perceptron (MLP) training.
It is intended for researchers working in metaheuristic optimization, computational intelligence, and neural network training. The package allows users to apply SBOA either as a standalone optimizer or as a training algorithm for feed-forward neural networks.
sboa()sboa_mlp()predict()plot()print()During development, the package can be installed from the local source using:
devtools::install()Then load the package with:
library(SBOAtools)You can also install the development version from GitHub:
install.packages("remotes")
remotes::install_github("burakdilber/SBOAtools")sboa()Performs general-purpose continuous optimization using the Secretary Bird Optimization Algorithm.
sboa_mlp()Trains a single-hidden-layer multilayer perceptron using the Secretary Bird Optimization Algorithm.
library(SBOAtools)
sphere <- function(x) sum(x^2)
res <- sboa(
fn = sphere,
lower = rep(-10, 5),
upper = rep(10, 5),
n_agents = 10,
max_iter = 20,
seed = 123
)
print(res)
plot(res)
res$value
res$parlibrary(SBOAtools)
set.seed(123)
X_train <- matrix(runif(40), nrow = 10, ncol = 4)
y_train <- matrix(runif(10), nrow = 10, ncol = 1)
fit_mlp <- sboa_mlp(
X_train = X_train,
y_train = y_train,
hidden_dim = 3,
n_agents = 10,
max_iter = 20,
lower = -1,
upper = 1,
seed = 123
)
print(fit_mlp)
plot(fit_mlp)
pred <- predict(fit_mlp, X_train)
predsboa()The sboa() function returns an object of class
"sboa" containing:
par: best solution foundvalue: best objective function valueconvergence: convergence curve over iterationspopulation: final population matrixfitness: final fitness values of the populationcall: matched function callsboa_mlp()The sboa_mlp() function returns an object of class
"sboa_mlp" containing:
par: optimized neural network parametersvalue: best objective function valueconvergence: convergence curve over iterationsinput_dim: number of input variableshidden_dim: number of hidden neuronsoutput_dim: number of output variablesx_min: minimum values used for input normalizationx_max: maximum values used for input normalizationy_min: minimum values used for output
normalizationy_max: maximum values used for output
normalizationfitted: fitted values on the original scalemetrics: training performance metricscall: matched function callThe current version of the package supports:
Possible future improvements include:
Fu, W., Wang, K., Liu, J., et al. (2024). Secretary Bird Optimization Algorithm. Artificial Intelligence Review. https://doi.org/10.1007/s10462-024-10729-y
Dilber, B., & Ozdemir, A. F. (2026). A novel approach to training feed-forward multi-layer perceptrons with recently proposed secretary bird optimization algorithm. Neural Computing and Applications. https://doi.org/10.1007/s00521-026-11874-x
MIT License