jaya {Jaya} | R Documentation |
Jaya Algorithm, a gradient-free optimization algorithm. Maximization of a function using Jaya Algorithm (JA). A population based method which repeatedly modifies a population of individual solutions. Capable of solving both constrained and unconstrained optimization problems. Does not contain any hyperparameters.
Description
Jaya Algorithm, a gradient-free optimization algorithm. Maximization of a function using Jaya Algorithm (JA). A population based method which repeatedly modifies a population of individual solutions. Capable of solving both constrained and unconstrained optimization problems. Does not contain any hyperparameters.
Usage
jaya(fun, lower, upper, popSize = 50, maxiter, n_var, seed = NULL,
suggestions = data.frame(), opt = "minimize")
Arguments
fun |
as a function to be optimized |
lower |
as a vector of lower bounds for the vaiables in the function |
upper |
as a vector of upper bounds for the vaiables in the function |
popSize |
as population size |
maxiter |
as number of iterations to run for finding optimum solution |
n_var |
as number of variables used in the function to optimize |
seed |
as an integer vector containing the random number generator state |
suggestions |
as a data frame of solutions string to be included in the initial population |
opt |
as a string either "maximize" or "minimize" the function |
Examples
# Test Function to minimize
square <- function(x){return((x[1]^2)+(x[2]^2))}
jaya(fun = square, lower = c(-100,-100), upper = c(100,100), maxiter = 10, n_var = 2)