[R] optimized value worse than starting Value

Ravi Varadhan rvaradhan at jhmi.edu
Wed Sep 8 18:09:31 CEST 2010


"Numerical optimisations are best done using as many methods as possible"

See the "optimx" package:

http://cran.r-project.org/web/packages/optimx/index.html

Ravi.

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Barry Rowlingson
Sent: Wednesday, September 08, 2010 10:27 AM
To: Michael Bernsteiner
Cc: r-help at r-project.org
Subject: Re: [R] optimized value worse than starting Value

On Wed, Sep 8, 2010 at 1:35 PM, Michael Bernsteiner
<dethlef1 at hotmail.com> wrote:
>
> Dear all,
>
> I'm optimizing a relatively simple function. Using optimize the optimized
parameter value is worse than the starting.
> why?
>
> f<-function(delta,P,U){
>    minimiz<-P+delta*U
>    x<-minimiz[1]
>    y<-minimiz[2]
>    z<-100*(y-x^2)^2+(1-x)^2
>    return(z)
> }

 This looks familiar. Is this some 1-d version of the Rosenbrock
Banana Function?

 http://en.wikipedia.org/wiki/Rosenbrock_function

 It's designed to be hard to find the minimum. In the real world one
would hope that things would not have such a pathological behaviour.

 Numerical optimisations are best done using as many methods as
possible - see optimise, nlm, optim, nlminb and the whole shelf of
library books devoted to it.

Barry

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list