Learn R Programming

hann (version 1.2)

control.hann: Parameters for Neural Network Optimization

Description

Set the control parameters for the Hopfield artificial neural network optimization.

Usage

control.hann(...)

Value

a list with named elements as detailed above.

Arguments

...

named arguments to be modified (see examples).

Details

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 function at each iteration.

  • quasinewton = FALSE: a logical. If TRUE, quasi-Newton steps are performed (not recommended unless the network has a small number of 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 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 objective 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.

References

https://en.wikipedia.org/wiki/Wolfe_conditions

See Also

hann

Examples

Run this code
control.hann() # default values
ctrl <- control.hann(iterlim = 1000)
ctrl

## verbose is not a parameter:
ctrl <- control.hann(iterlim = 1000, verbose = TRUE)

Run the code above in your browser using DataLab