maOptimizer: Optimization Algorithms
Specifies Optimization Algorithms for Neural Net.
adaDeltaSgd(decay = 0.95, conditioningConst = 1e-06) sgd(learningRate = 0.001, momentum = 0, nag = FALSE, weightDecay = 0, lRateRedRatio = 1, lRateRedFreq = 100, lRateRedErrorRatio = 0)
Specifies the decay rate applied to gradients when calculating the step in the ADADELTA adaptive optimization algorithm. This rate is used to ensure that the learning rate continues to make progress by giving smaller weights to remote gradients in the calculation of the step size. Mathematically, it replaces the mean square of the gradients with an exponentially decaying average of the squared gradients in the denominator of the update rule. The value assigned must be in the range (0,1).
Specifies a conditioning constant for the ADADELTA adaptive optimization algorithm that is used to condition the step size in regions where the exponentially decaying average of the squared gradients is small. The value assigned must be in the range (0,1).
Specifies the size of the step taken in the direction of the negative gradient for each iteration of the learning process. The default value is
Specifies weights for each dimension that control the contribution of the previous step to the size of the next step during training. This modifies the
learningRate to speed up training. The value must be
>= 0 and
TRUE, Nesterov's Accelerated Gradient Descent is used. This method reduces the oracle complexity of gradient descent and is optimal for smooth convex optimization.
Specifies the scaling weights for the step size. After each weight update, the weights in the network are scaled by
(1 - ``learningRate * weightDecay). The value must be
>= 0 and
Specifies the learning rate reduction ratio: the ratio by which the learning rate is reduced during training. Reducing the learning rate can avoid local minima. The value must be
> 0 and
- A value of
1.0means no reduction.
- A value of
0.9means the learning rate is reduced to 90 its current value.
The reduction can be triggered either periodically, to occur after a fixed number of iterations, or when a certain error criteria concerning increases or decreases in the loss function are satisfied.
- To trigger a periodic rate reduction, specify the frequency by setting the number of iterations between reductions with the
- To trigger rate reduction based on an error criterion, specify a number in
Sets the learning rate reduction frequency by specifying number of iterations betweeen reductions. For example, if
10 is specified, the learning rate is reduced once every 10 iterations.
Spefifies the learning rate reduction error criterion. If set to
0, the learning rate is reduced if the loss increases between iterations. If set to a fractional value greater than
0, the learning rate is reduced if the loss decreases by less than that fraction of its previous value.
These functions can be used for the
optimizer argument in
sgd function specifies Stochastic Gradient Descent. maOptimizer
adaDeltaSgd function specifies the AdaDelta gradient
descent, described in the 2012 paper "ADADELTA: An Adaptive Learning Rate
Method" by Matthew D.Zeiler.
A character string that contains the specification for the optimization algorithm.
Microsoft Technical Support
myIris = iris myIris$Setosa <- iris$Species == "setosa" res1 <- rxNeuralNet(formula = Setosa~Sepal.Length + Sepal.Width + Petal.Width, data = myIris, optimizer = sgd(learningRate = .002)) res2 <- rxNeuralNet(formula = Setosa~Sepal.Length + Sepal.Width + Petal.Width, data = myIris, optimizer = adaDeltaSgd(decay = .9, conditioningConst = 1e-05))