[R] optim() does SANN, why not genetic algorithm (genoud)
Ajay Narottam Shah
ajayshah at mayin.org
Thu Jun 9 11:13:13 CEST 2005
It is a very nice touch that optim() offers SANN (simulated annealing)
as a random search algorithm.
The R community already has genoud - an implementation of a genetic
algorithm for search.
Wouldn't it be neat if optim() would additionally offer method="GA"
where it internally uses code from genoud?
I glanced at the code and I find the work is all being done in
res <- .Internal(optim(par, fn1, gr1, method, con, lower, upper))
Should we do it as:
if (method == "GA") {
# insert genoud calls here.
} else {
res <- .Internal(optim(par, fn1, gr1, method, con, lower, upper))
}
Who wrote optim, and who maintains it?
--
Ajay Shah Consultant
ajayshah at mayin.org Department of Economic Affairs
http://www.mayin.org/ajayshah Ministry of Finance, New Delhi
More information about the R-help
mailing list