Offers the second version of the gradient descent based optimization algorithm with individual adaptive learning rates by Silva and Almeida (Adaptive BackPropagation). This optimization algorithm introduced by Silva and Almeida adds individual adaptive learning rates and weight-backtracking to standard steepest descent. More...
#include <AdpBP.h>
Public Member Functions | |
| void | init (Model &model) |
| Initializes the optimizer with default parameters. | |
| void | initUserDefined (Model &model, double increaseFactorP=1.2, double decreaseFactorP=0.7, double alphaP=0.5, double eta0P=0.1) |
| Initializes the optimizer with user defined parameters. | |
| double | optimize (Model &model, ErrorFunction &errorfunction, const Array< double > &input, const Array< double > &target) |
| Performs a run of the optimization algorithm. | |
| void | clearMemory () |
| Resets internal variables of the class instance. | |
Protected Attributes | |
| double | increaseFactor |
| The increase factor for the adaptive learning rate. | |
| double | decreaseFactor |
| The decrease factor for the adaptive learning rate. | |
| double | alpha |
The momentum factor that controls the effect of the momentum term. | |
| double | eta0 |
The initial value for the adaptive learning rate for all weights of the network. | |
| double | oldError |
| The old error value. | |
| Array< double > | deltaw |
| The final update values (including the individual learning rates) for all weights. | |
| Array< double > | v |
| The update values (without the individual learning rates) for all weights. | |
| Array< double > | dedwOld |
| The last error gradient. | |
| Array< double > | eta |
The adaptive learning rate (for each weight individually). | |
Offers the second version of the gradient descent based optimization algorithm with individual adaptive learning rates by Silva and Almeida (Adaptive BackPropagation). This optimization algorithm introduced by Silva and Almeida adds individual adaptive learning rates and weight-backtracking to standard steepest descent.
for each weight
. The adaptation of
is determined by the sign of the partial derivation
. If the sign of the derivation changes from iteration
to iteration
, then at least one minimum with regard to
was skipped and hence the learning rate
is decreased by the multiplication with a predefined constant. If there is no change of the sign, it a plateau of the objective function is assumed and the learning rate
is increased by the multiplication with a second constant. Furthermore, weight-backtracking is used, i.e.. if the error increases from iteration
to
, then the last weight adaptation is undone. For further information about this algorithm, please refer to:
@InCollection{silva:90b,
author = {Fernando M. Silva and Luis B. Almeida},
title = {Acceleration Techniques for the Backpropagation Algorithm},
booktitle = {Neural Networks -- EURASIP Workshop 1990},
pages = {110-119},
year = {1990},
editor = {Luis B. Almeida and C. J. Wellekens},
number = {412},
series = {LNCS},
publisher = {Springer-Verlag},
}
This second version of the algorithm has some minor modifications that improve the performance.
Definition at line 361 of file AdpBP.h.
| void AdpBP90b::clearMemory | ( | ) | [inline] |
| void AdpBP90b::init | ( | Model & | model | ) | [inline, virtual] |
Initializes the optimizer with default parameters.
Initializes the optimizer's parameters with the following defaults:
| model | Model to be optimized. |
Implements Optimizer.
Definition at line 390 of file AdpBP.h.
References initUserDefined().
| void AdpBP90b::initUserDefined | ( | Model & | model, | |
| double | increaseFactorP = 1.2, |
|||
| double | decreaseFactorP = 0.7, |
|||
| double | alphaP = 0.5, |
|||
| double | eta0P = 0.1 | |||
| ) | [inline] |
Initializes the optimizer with user defined parameters.
| model | Model to be optimized. | |
| increaseFactorP | Increase factor for the adaptive learning rate , set to 1.2 by default. | |
| decreaseFactorP | Decrease factor for the adaptive learning rate , set to 0.7 by default. | |
| alphaP | Momentum factor that controls the effect of the momentum term, set to 0.5 by default. | |
| eta0P | Initial value for the adapted learning rate , set to 0.1 by default. |
Definition at line 419 of file AdpBP.h.
References alpha, decreaseFactor, dedwOld, deltaw, eta, eta0, Model::getParameterDimension(), increaseFactor, oldError, and v.
Referenced by init().
| double AdpBP90b::optimize | ( | Model & | model, | |
| ErrorFunction & | errorfunction, | |||
| const Array< double > & | input, | |||
| const Array< double > & | target | |||
| ) | [inline, virtual] |
Performs a run of the optimization algorithm.
The error
and its derivatives with respect to the model parameters for the current iteration
are calculated and the values of the weights
and the individual learning rates
are adapted.
| model | Model to be optimized. | |
| errorfunction | Error function to be used for the optimization. | |
| input | Input vector for the model. | |
| target | Corresponding targets to the given inputs. |
Implements Optimizer.
Definition at line 467 of file AdpBP.h.
References alpha, decreaseFactor, dedwOld, deltaw, ErrorFunction::errorDerivative(), eta, Model::getParameter(), Model::getParameterDimension(), i, increaseFactor, oldError, Model::setParameter(), and v.
double AdpBP90b::alpha [protected] |
The momentum factor
that controls the effect of the momentum term.
Set to 0.5 by default.
Definition at line 540 of file AdpBP.h.
Referenced by initUserDefined(), and optimize().
double AdpBP90b::decreaseFactor [protected] |
The decrease factor for the adaptive learning rate.
Set to 0.7 by default.
Definition at line 536 of file AdpBP.h.
Referenced by initUserDefined(), and optimize().
Array<double> AdpBP90b::dedwOld [protected] |
The last error gradient.
Definition at line 558 of file AdpBP.h.
Referenced by clearMemory(), initUserDefined(), and optimize().
Array<double> AdpBP90b::deltaw [protected] |
The final update values (including the individual learning rates) for all weights.
Definition at line 551 of file AdpBP.h.
Referenced by clearMemory(), initUserDefined(), and optimize().
Array<double> AdpBP90b::eta [protected] |
The adaptive learning rate
(for each weight individually).
Definition at line 562 of file AdpBP.h.
Referenced by clearMemory(), initUserDefined(), and optimize().
double AdpBP90b::eta0 [protected] |
The initial value for the adaptive learning rate
for all weights of the network.
Definition at line 544 of file AdpBP.h.
Referenced by clearMemory(), and initUserDefined().
double AdpBP90b::increaseFactor [protected] |
The increase factor for the adaptive learning rate.
Set to 1.2 by default.
Definition at line 526 of file AdpBP.h.
Referenced by initUserDefined(), and optimize().
double AdpBP90b::oldError [protected] |
The old error value.
Definition at line 547 of file AdpBP.h.
Referenced by clearMemory(), initUserDefined(), and optimize().
Array<double> AdpBP90b::v [protected] |
The update values (without the individual learning rates) for all weights.
Definition at line 555 of file AdpBP.h.
Referenced by initUserDefined(), and optimize().