[R] convergence=0 in optim and nlminb is real?
Prof J C Nash (U30A)
nashjc at uottawa.ca
Tue Dec 17 14:27:36 CET 2013
If you run all methods in package optimx, you will see results all over
the western hemisphere. I suspect a problem with some nasty
computational issues. Possibly the replacement of the function with Inf
when any eigenvalues < 0 or nu < 0 is one source of this.
Note that Hessian eigenvalues are not used to determine convergence in
optimization methods. If they did, nobody would ever get promoted from
junior lecturer who was under 100 if they needed to do this, because
determining the Hessian from just the function requires two levels of
approximate derivatives.
If you want to get this problem reliably solved, I think you will need to
1) sort out a way to avoid the Inf values -- can you constrain the
parameters away from such areas, or at least not use Inf. This messes up
the gradient computation and hence the optimizers and also the final
Hessian.
2) work out an analytic gradient function.
JN
> Date: Mon, 16 Dec 2013 16:09:46 +0100
> From: Adelchi Azzalini <azzalini at stat.unipd.it>
> To: r-help at r-project.org
> Subject: [R] convergence=0 in optim and nlminb is real?
> Message-ID: <20131216160946.91858ff279db26bd65e187bc at stat.unipd.it>
> Content-Type: text/plain; charset=US-ASCII
>
> It must be the case that this issue has already been rised before,
> but I did not manage to find it in past posting.
>
> In some cases, optim() and nlminb() declare a successful convergence,
> but the corresponding Hessian is not positive-definite. A simplified
> version of the original problem is given in the code which for
> readability is placed below this text. The example is built making use
> of package 'sn', but this is only required to set-up the example: the
> question is about the outcome of the optimizers. At the end of the run,
> a certain point is declared to correspont to a minimum since
> 'convergence=0' is reported, but the eigenvalues of the (numerically
> evaluated) Hessian matrix at that point are not all positive.
>
> Any views on the cause of the problem? (i) the point does not
> correspong to a real minimum, (ii) it does dive a minimum but the
> Hessian matrix is wrong, (iii) the eigenvalues are not right.
> ...and, in case, how to get the real solution.
>
>
> Adelchi Azzalini
More information about the R-help
mailing list