[Rd] optim-Bug (PR#6720)

Wolfgang Huber w.huber at dkfz-heidelberg.de
Sat Apr 3 20:31:23 CEST 2004


Hi Hans,

I've been able to reproduce your error (version see below). The 
non-deterministic behavior is indeed worrying.

This is not directly related to your bug report, but constrained 
optimization can be fickle, especially if the objective function is 
singular somewhere close to the boundaries. In your case, you may be 
able to circumvent some problems by transforming q to a new variable eq, 
eg.

eq = exp(q)/(1+exp(q)),

do the unbounded optimization, and backtransform. It may also be 
worthwhile to provide the gradient to optim.

Best regards
-------------------------------------
Wolfgang Huber
Division of Molecular Genome Analysis
German Cancer Research Center
Heidelberg, Germany
Phone: +49 6221 424709
Fax:   +49 6221 42524709
Http:  www.dkfz.de/abt0840/whuber
-------------------------------------


 > version
          _
platform i686-pc-linux-gnu
arch     i686
os       linux-gnu
system   i686, linux-gnu
status   alpha
major    1
minor    9.0
year     2004
month    03
day      08
language R


kestler at neuro.informatik.uni-ulm.de wrote:
> Full_Name: Dr. Hans A. Kestler
> Version: 1.8.1.
> OS: Linux, Win, Mac OSX
> Submission from: (NULL) (134.60.73.116)
> 
> 
> The code below produces after a different number of iterations i the following
> error:
> 
> Error in optim(par = rep(0.5, length(edges)), loglik, method = "L-BFGS-B",  :
>         non-finite value supplied by optim
> 
> This was reproducible on different machines (Mac G4 OSX, AMD Opteron Linux SUSE
> 9.0, Intel P4 Suse 9.0, P4 Windows XP Prof), only with different i.
> 
> The non-deterministic behaviour made us recompile R with debug options and use
> valgrind for memory-leak checking. The result was horrible. We are now in the
> process of going through the f2c code of lbfgsb.c. The problem seems to be a
> access violation of wn1 at run time. 
> 
> Cheers 
>        Hans
> 
>



More information about the R-devel mailing list