I am using optimx with BFGS method and differ initial points. I have objerved that it converges on points that they are not optima. Does anybody can explain to me how that problem is faced up? Thanks in advance for your time.
Asked
Active
Viewed 80 times
1

Erwin Kalvelagen
- 15,677
- 2
- 14
- 39

Christina
- 11
- 1
-
Is the problem convex? – Erwin Kalvelagen Jul 16 '16 at 01:40
-
Yes it is. One of the functions I tested was Bohachevsky on 2 dimensions: http://www.sfu.ca/~ssurjano/boha.html. – Christina Jul 17 '16 at 17:03
-
Make sure you provide exact and correct gradients. – Erwin Kalvelagen Jul 17 '16 at 17:15
-
In the optimx I have written: gr= grad and at the begging of the code I define the grad as following: grad <- function(xx){ x1 <- xx[1] x2 <- xx[2] gg <- as.vector(rep(0, 2)) gg[1] <-2.82743*sin(3*pi*x1) #dif.f.x1 gg[2] <- 5.02655*sin(4*pi*x2) #dif.f.x2 return(gg) } I did the same wth Hessian – Christina Jul 18 '16 at 13:33
-
Sorry, these functions are not convex. You need a global solver for this. – Erwin Kalvelagen Jul 18 '16 at 23:39
-
Could you please explain what do yoy mean by "global solver" – Christina Jul 19 '16 at 16:47
-
A global solver is a solver that does not converge to a local optimum but seeks global optimal solutions, – Erwin Kalvelagen Jul 19 '16 at 17:14
-
Ok. Is optimx used only for local optimum? – Christina Jul 19 '16 at 18:08
-
I believe the solvers mentioned in the optimx docs are all local solvers, i.e. they converge to a local optimal solution.. – Erwin Kalvelagen Jul 19 '16 at 18:51
-
What are you suggested to use instead of optimx? – Christina Jul 19 '16 at 21:08
-
There are quite a few good global solvers. E.g. [baron](http://archimedes.cheme.cmu.edu/?q=baron), [couenne](https://projects.coin-or.org/Couenne), [Antigone](http://helios.princeton.edu/ANTIGONE/), and Lindo Global. Some of them you can try out on [NEOS](https://neos-server.org/neos/). Also some of them don't support trig functions. – Erwin Kalvelagen Jul 19 '16 at 22:48