One more thing: trying to defend R's honor, I've run optimx instead of
optim (after dividing the IV by its max - same as for optim). I did
not use L-BFGS-B with lower bounds anymore. Instead, I've used
Nelder-Mead (no bounds).
First, it was faster: for a loop across 10 different IVs BFGS took
6.14
Just to provide some closure:
I ended up dividing the IV by its max so that the input vector (IV) is
now between zero and one. I still used optim:
myopt - optim(fn=myfunc, par=c(1,1), method=L-BFGS-B, lower=c(0,0))
I was able to get great fit, in 3 cases out of 10 I've beaten Excel
Solver, but in
Actually, Interval Analysis can be used to find _all_ optima (including the
global optimum) within a starting box. It's not particularly well-known in
statistical circles.
See this (for example):
Ben Bolker bbolker at gmail.com writes:
Simulated annealing and other stochastic global optimization
methods are also possible solutions, although they may or may not
work better than the many-starting-points solution -- it depends
on the problem, and pretty much everything has to be
Hans W Borchers hwborchers at googlemail.com writes:
Ben Bolker bbolker at gmail.com writes:
Simulated annealing and other stochastic global optimization
methods are also possible solutions, although they may or may not
work better than the many-starting-points solution -- it
I won't requote all the other msgs, but the latest (and possibly a bit glitchy)
version of
optimx on R-forge
1) finds that some methods wander into domains where the user function fails
try() (new
optimx runs try() around all function calls). This includes L-BFGS-B
2) reports that the scaling
Hi Dimitri,
Your problem has little to do with local versus global optimum. You can
convince yourself that the solution you got is not even a local optimum by
checking the gradient at the solution.
The main issue is that your objective function is not differentiable
everywhere. So, you have
Thank you very much to everyone who replied!
As I mentioned - I am not a mathematician, so sorry for stupid
comments/questions.
I intuitively understand what you mean by scaling. While the solution
space for the first parameter (.alpha) is relatively compact (probably
between 0 and 2), the second
Some tips:
1) Excel did not, as far as I can determine, find a solution. No point seems to
satisfy
the KKT conditions (there is a function kktc in optfntools on R-forge project
optimizer.
It is called by optimx).
2) Scaling of the input vector is a good idea given the seeming wide range of
Hello!
I am trying to create an R optimization routine for a task that's
currently being done using Excel (lots of tables, formulas, and
Solver).
However, otpim seems to be finding a local minimum.
Example data, functions, and comparison with the solution found in
Excel are below.
I am not
Just to add:
I also experimented with the starting parameters (par) under optim,
especially with the second one. I tried 1, 10, 100, 1000, etc.
When I tried 100,000,000 then I got a somewhat better solution (but
still not as good as in Excel). However, under message it said:
ERROR:
Refer to the CRAN Optimization task view, please. That is a much more
appropriate place to begin than posting a query here.
All numerical optimizers only produce local optima.
-- Bert
On Thu, Nov 10, 2011 at 11:24 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Just to add:
Bert,
that's exactly where I started. I found optim in the first paragraph
under General Purpose Continuous Solvers and used bounded BFGS for a
constrained optimization for a situation with more than 1 parameters.
Again, not being an engineer / mathematician - would greatly
appreciate any
On 11/11/11 08:55, Dimitri Liakhovitski wrote:
Bert,
that's exactly where I started. I found optim in the first paragraph
under General Purpose Continuous Solvers and used bounded BFGS for a
constrained optimization for a situation with more than 1 parameters.
Again, not being an engineer /
Rolf Turner rolf.turner at xtra.co.nz writes:
On 11/11/11 08:55, Dimitri Liakhovitski wrote:
Bert,
that's exactly where I started. I found optim in the first paragraph
under General Purpose Continuous Solvers and used bounded BFGS for a
constrained optimization for a situation with
15 matches
Mail list logo