Description Details Author(s) References Examples

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.

Package: | forega |

Type: | Package |

Version: | 1.0 |

Date: | 2016-01-02 |

License: | GPL (>= 2) |

Mehmet Hakan Satman

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

A paper about this package is under consideration

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,])
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.