forega-package: Floating-Point Genetic Algorithms with Statistical Forecast...

Description Details Author(s) References Examples

Description

forega performs a floating-point genetic algorithm search with a statistical forecasting operator that generates offspring which probably will be generated in future generations. Use of this operator enhances the search capabilities of floating-point genetic algorithms because offspring generated by usual genetic operators rapidly forecasted before performing more generations.

Details

Package: forega
Type: Package
Version: 1.0.3
Date: 2017-11-23
License: GPL (>= 2)

Author(s)

Mehmet Hakan Satman

Maintainer: Mehmet Hakan Satman <mhsatman@istanbul.edu.tr>

References

A paper about this package is under consideration

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Required package forega
require("forega")

set.seed(12345)

# This function has the global minimum at x_1 = pi and x_2 = exp(1)
f <- function (x){
	return( (x[1]-pi)^2 + (x[2]-2.71828)^2 )
}

# Performing a floating-point genetic algorithm search with forecast probability of 0.10
res <- forecasting_ga(evalFunc=f, chsize=2, minv=rep(-10.0,2),
                      maxv=rep(10.0,2), crossprob=0.80, mutationprob=0.01, 
                      popsize=100, maxiter=1000, MinimumForecastLength=20, 
                      ForecastFunction=ForecastArima, elitism=2, forecastprob=0.01)

# Show the first chromosome of the returned population matrix
print(res[1,])

forega documentation built on Nov. 23, 2017, 5:05 p.m.