[R] Optimisation does not optimise!

Stephen Clark gysc at leeds.ac.uk
Mon Jul 15 09:46:44 CEST 2013


Thanks for this guidance. 

In light of your advice I have reduced the titanic to a dingy by reducing the size of my sample to just 100 instances, making this an optimisation of 100 parameters. I am, however, seeing similar output when I output the function value at each evaluation. This is the tail of the information in the optout results structure

[1] 70104.64
[1] 70104.67
[1] 70104.64
[1] 70104.67
[1] 70104.64
[1] 70104.67
[1] 70104.64
[1] 70104.66
[1] 70104.64
[1] 70104.66
> optout
$par
  [1] 1.003 1.003 1.003 1.003 1.003 1.003 1.003 1.003 1.003 1.003 1.003 1.003
[13] ...
[97] 1.003 1.003 1.003 1.003

$value
[1] 70104.4

$counts
function gradient 
     501       NA 

$convergence
[1] 1

$message
NULL

Can you or anyone suggest another optimisation routine I can use? I initially coded this into EXCEL and used the solver addin to do an optimisation of 200 parameters. R was my attempt to increase this number of parameters. I do not, unfortunately, have any derivative information.

-- 
Stephen Clark, 
Second year PhD,  School of Geography
Tel : 0113 343 6707
Email : gysc at leeds.ac.uk 
Web : http://www.geog.leeds.ac.uk/people/s.clark

-----Original Message-----
From: Prof J C Nash (U30A) [mailto:nashjc at uottawa.ca] 
Sent: 13 July 2013 13:07
To: r-help at r-project.org; Stephen Clark
Subject: [R] Optimisation does not optimise!

Considering that I devised the code initially on a computer with only 8K bytes for program and data, and it appears that your problem has 10000 parameters, I'm surprised you got any output. I suspect the printout is the BUILD phase where each weight is being adjusted in turn by the same shift.

Don't try to move the Titanic on a pram.

If you work out a gradient function, you can likely use Rcgmin (even though I wrote original CG in optim(), not recommended). spg from BB may also work OK.

This problem is near linear, so there are other approaches.

JN



More information about the R-help mailing list