optim.stop {DiceView} | R Documentation |
Title optim wrapper for early stopping criterion
Description
Title optim wrapper for early stopping criterion
Usage
optim.stop(
par,
fn,
gr = NULL,
fn.stop = NA,
fn.NaN = NaN,
control = list(),
...
)
Arguments
par |
starting point for optim |
fn |
objective function, like in optim(). |
gr |
gradient function, like in optim(). |
fn.stop |
early stopping criterion |
fn.NaN |
replacement value of fn when returns NaN |
control |
control parameters for optim() |
... |
additional arguments passed to optim() |
Value
list with best solution and all solutions
Author(s)
Yann Richet, IRSN
Examples
fn = function(x) x^6
o = optim( par=15, fn,lower=-20,upper=20,method='L-BFGS-B')
o.s = optim.stop( par=15, fn,lower=-20,upper=20,method='L-BFGS-B',fn.stop=0.1)
#check o.s$value == 0.1 && o.s$counts < o$counts
[Package DiceView version 3.1-3 Index]