control.hann | R Documentation |
Set the parameters for the Hopfield artificial neural network optimization.
control.hann(...)
... |
named arguments to be modified (see examples). |
When the user modifies one or several parameters by giving them as named arguments, if some names are incorrect they are ignored with a warning.
The parameters with their default values are:
iterlim = 100
: an integer giving the number of
iterations.
quiet = FALSE
: a logical controlling whether to print
the value of the objective (loss) function at each iteration.
quasinewton = FALSE
: a logical. If TRUE
,
quasi-Newton steps are performed (not recommended unless for
networks with few parameters and/or for a small number of
iterations).
fullhessian = FALSE
: (ignored if quasinewton =
FALSE
) a logical, by default only some blocks of the Hessian matrix
are computed. If TRUE
, the full Hessian matrix is computed
(very time consuming).
trace.error = FALSE
: a logical. If TRUE
, the
error rate is printed at each iteration of the optimization process.
wolfe = FALSE
: a logical. If TRUE
, Wolfe's
conditions are tested and printed at each iteration.
target = 0.001
: the target value of the loss function
to stop the optimization.
beta = 0.2
: the hyperparameter of the activation
function.
mc.cores = 1
: an integer. The number of cores used when
computing the loss function.
If mc.cores
is greater than one, the optimization process calls
a multithreaded code using OMP. So, do not do this together
with functions from the package parallel. On the other hand, if
you leave this parameter to its default value, you should be able to
run several optimizations in parallel, for instance with
mclapply
.
See the vignette for applications.
a list with named elements as detailed above.
For the moment, the parameter mc.cores
is accepted only by
hann1
.
Emmanuel Paradis
https://en.wikipedia.org/wiki/Wolfe_conditions
hann1
control.hann() # default values
ctrl <- control.hann(iterlim = 1000)
ctrl
## verbose is not a parameter:
ctrl <- control.hann(iterlim = 1000, verbose = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.