Dear R user fellows, I would like to ask you about the package 'rgenoud' which is a genetic optimization tool. I ran the function 'genoud' with two variables to be minimized by the following command. result<-genoud(fn,nvars=2,starting.values=c(0.5,0), pop.size=1000, max.generations=10, wait.generations=3) Then, I had the following error message. Error in solve.default(Djl) : system is computationally singular: reciprocal condition number = 0 Can anyone give me some tip on how to fix the problem? Thank you for your great help in advance. Best Regards, Wonsang You ----- -- Wonsang You Special Lab Non-Invasive Brain Imaging Leibniz Institute for Neurobiology http://www.ifn-magdeburg.de -- View this message in context: http://r.789695.n4.nabble.com/How-to-fix-error-in-the-package-rgenoud-tp2993489p2993489.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]]
I have to make correction in my error message which I introduced in my original message. Sorry for my mistake. Finally, I had the following error message after running the function ' genoud'. Error in optim(foo.vals, fn = fn1, gr = gr1, method = optim.method, control = control) : non-finite finite-difference value [1] When I execute 'traceback()' to trace where the error occured, I got the following results. Unfortunately, I could not figure out what was the problem from the above information. 6: optim(foo.vals, fn = fn1, gr = gr1, method = optim.method, control control) 5: function (foo.vals) { ret <- optim(foo.vals, fn = fn1, gr = gr1, method = optim.method, control = control) return(c(ret$value, ret$par)) }(c(0.220878697173384, -13.3643173824871)) 4: .Call("rgenoud", as.function(fn1), new.env(), as.integer(nvars), as.integer(pop.size), as.integer(max.generations), as.integer(wait.generations), as.integer(nStartingValues), as.real(starting.values), as.vector(P), as.matrix(Domains), as.integer(max), as.integer(gradient.check), as.integer(boundary.enforcement), as.double(solution.tolerance), as.integer(BFGS), as.integer(data.type.int), as.integer(provide.seeds), as.integer(unif.seed), as.integer(int.seed), as.integer(print.level), as.integer(share.type), as.integer(instance.number), as.integer(MemoryMatrix), as.integer(debug), as.character(output.path), as.integer(output.type), as.character(project.path), as.integer(hard.generation.limit), as.function(genoud.optim.wrapper101), as.integer(lexical), as.function(fnLexicalSort), as.function(fnMemoryMatrixEvaluate), as.integer(UserGradient), as.function(gr1func), as.real(P9mix), as.integer(BFGSburnin), as.integer(transform), PACKAGE = "rgenoud") 3: genoud(Qmin, nvars = 2, starting.values = InitVal, max.generations = 10, wait.generations = 3, n = n, yper = yper, pertype = pertype) at wFGN.R#75 On 13 October 2010 13:03, Wonsang You <you@ifn-magdeburg.de> wrote:> Dear R user fellows, > > I would like to ask you about the package 'rgenoud' which is a genetic > optimization tool. > I ran the function 'genoud' with two variables to be minimized by the > following command. > > result<-genoud(fn,nvars=2,starting.values=c(0.5,0), > > pop.size=1000, max.generations=10, wait.generations=3) > > > Then, I had the following error message. > > Error in solve.default(Djl) : > > system is computationally singular: reciprocal condition number = 0 > > > Can anyone give me some tip on how to fix the problem? Thank you for your > great help in advance. > > Best Regards, > Wonsang You >----- Wonsang You Leibniz Institute for Neurobiology -- View this message in context: http://r.789695.n4.nabble.com/Re-How-to-fix-error-in-the-package-rgenoud-tp2993614p2993614.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]]
I have to make correction in my error message which I introduced in my original message. Sorry for my mistake. Finally, I had the following error message after running the function 'genoud'. Error in optim(foo.vals, fn = fn1, gr = gr1, method = optim.method, control = control) : non-finite finite-difference value [1] When I execute 'traceback()' to trace where the error occured, I got the following results. Unfortunately, I could not figure out what was the problem from the above information. 6: optim(foo.vals, fn = fn1, gr = gr1, method = optim.method, control control) 5: function (foo.vals) { ret <- optim(foo.vals, fn = fn1, gr = gr1, method = optim.method, control = control) return(c(ret$value, ret$par)) }(c(0.220878697173384, -13.3643173824871)) 4: .Call("rgenoud", as.function(fn1), new.env(), as.integer(nvars), as.integer(pop.size), as.integer(max.generations), as.integer(wait.generations), as.integer(nStartingValues), as.real(starting.values), as.vector(P), as.matrix(Domains), as.integer(max), as.integer(gradient.check), as.integer(boundary.enforcement), as.double(solution.tolerance), as.integer(BFGS), as.integer(data.type.int), as.integer(provide.seeds), as.integer(unif.seed), as.integer(int.seed), as.integer(print.level), as.integer(share.type), as.integer(instance.number), as.integer(MemoryMatrix), as.integer(debug), as.character(output.path), as.integer(output.type), as.character(project.path), as.integer(hard.generation.limit), as.function(genoud.optim.wrapper101), as.integer(lexical), as.function(fnLexicalSort), as.function(fnMemoryMatrixEvaluate), as.integer(UserGradient), as.function(gr1func), as.real(P9mix), as.integer(BFGSburnin), as.integer(transform), PACKAGE = "rgenoud") 3: genoud(Qmin, nvars = 2, starting.values = InitVal, max.generations = 10, wait.generations = 3, n = n, yper = yper, pertype = pertype) at wFGN.R#75 ----- Wonsang You Leibniz Institute for Neurobiology -- View this message in context: http://r.789695.n4.nabble.com/How-to-fix-error-in-the-package-rgenoud-tp2993489p2993619.html Sent from the R help mailing list archive at Nabble.com.