Skip to content
Prev 17333 / 63424 Next

bug in L-BFGS-B? (PR#8099)

Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
Forgetting to run tools/rsync-recommended during build will do that
sort of thing to you, but it would seem that Berwin used a binary
download. But of course he might be picking up an older version of the
package from a private library.
B. might just be capable of it, but this is certainly some of the more
impenetrable code in R. While he (or anyone else) is in there, there
seems to be another problem in that the Hessian calculations refuse to
stay within the bounds (which is pretty annoying when the objective
function is undefined outside of them). Try for instance

f <- function(p) sum(ifelse(p>=-1e-4,p,Inf)^2)
optim(f, lower=c(0,0), par=c(5,5), method="L-BFGS-B")
optim(f, lower=c(0,0), par=c(5,5), method="L-BFGS-B", hess=T)