#include <QMCWolfeStepLengthSelector.h>
Public Member Functions | |
double | stepLength (QMCObjectiveFunction *function, Array1D< double > &position, Array1D< double > &searchDirection, Array1D< double > &gradient, Array2D< double > &unused, double functionValue) |
Calculates the step length to use when performing a line search optimization. | |
Private Member Functions | |
double | calculateLineSearchObjectiveFunction (Array1D< double > ¶ms, Array1D< double > &searchDirection, double stepLength) |
double | calculateLineSearchObjectiveFunctionDerivative (Array1D< double > ¶ms, Array1D< double > &searchDirection, double stepLength) |
double | cubicInterpolateStep (double alphaLo, double alphaHi, double phi_0, double phi_alphaLo, double phi_alphaHi, double phiPrime_0) |
Perform a cubic interpolation to choose a step length in the interval [a_lo,a_hi]. | |
double | zoom (double alphaLo, double alphaHi, double phi_0, double phi_alphaLo, double phi_alphaHi, double phiPrime_0, Array1D< double > ¶ms, Array1D< double > &searchDirection) |
Finds a point in the interval [a_lo, a_hi] that satisfy the strong Wolfe conditions. | |
double | wolfeStepLength (double alphaGuess, Array1D< double > ¶ms, Array1D< double > &searchDirection, Array1D< double > &gradient, double functionValue) |
Finds a point between 0 and the maximum step length which satisfies the Wolfe conditions. | |
Private Attributes | |
QMCObjectiveFunction * | OF |
The objective function used in calculating the step length. |
This algorithm is described in Nocedal and Wright.
Definition at line 28 of file QMCWolfeStepLengthSelector.h.
double QMCWolfeStepLengthSelector::stepLength | ( | QMCObjectiveFunction * | function, | |
Array1D< double > & | array1, | |||
Array1D< double > & | array2, | |||
Array1D< double > & | array3, | |||
Array2D< double > & | matrix1, | |||
double | scalar1 | |||
) | [virtual] |
Calculates the step length to use when performing a line search optimization.
You will have to look at the individual algorithms to see how the input parameters are defined.
Implements QMCLineSearchStepLengthSelectionAlgorithm.
Definition at line 15 of file QMCWolfeStepLengthSelector.cpp.
References OF, and wolfeStepLength().
double QMCWolfeStepLengthSelector::calculateLineSearchObjectiveFunction | ( | Array1D< double > & | params, | |
Array1D< double > & | searchDirection, | |||
double | stepLength | |||
) | [private] |
Definition at line 30 of file QMCWolfeStepLengthSelector.cpp.
References QMCObjectiveFunction::evaluate(), QMCObjectiveFunctionResult::getScore(), and OF.
Referenced by calculateLineSearchObjectiveFunctionDerivative(), wolfeStepLength(), and zoom().
double QMCWolfeStepLengthSelector::calculateLineSearchObjectiveFunctionDerivative | ( | Array1D< double > & | params, | |
Array1D< double > & | searchDirection, | |||
double | stepLength | |||
) | [private] |
Definition at line 42 of file QMCWolfeStepLengthSelector.cpp.
References calculateLineSearchObjectiveFunction().
Referenced by wolfeStepLength(), and zoom().
double QMCWolfeStepLengthSelector::cubicInterpolateStep | ( | double | alphaLo, | |
double | alphaHi, | |||
double | phi_0, | |||
double | phi_alphaLo, | |||
double | phi_alphaHi, | |||
double | phiPrime_0 | |||
) | [private] |
Perform a cubic interpolation to choose a step length in the interval [a_lo,a_hi].
See Nocedal and Wright p 56-58.
alphaLo | lower bound on the step length. | |
alphaHi | upper bound on the step length. | |
phi_0 | objective function value at the current parameters | |
phi_alphaLo | 1-D objective function value at the smallest step length. | |
phi_alphaHi | 1-D objective function value at the largest step length. | |
phiPrime_0 | derivative of the 1-D objective function at the current parameters. |
Definition at line 58 of file QMCWolfeStepLengthSelector.cpp.
Referenced by wolfeStepLength(), and zoom().
double QMCWolfeStepLengthSelector::zoom | ( | double | alphaLo, | |
double | alphaHi, | |||
double | phi_0, | |||
double | phi_alphaLo, | |||
double | phi_alphaHi, | |||
double | phiPrime_0, | |||
Array1D< double > & | params, | |||
Array1D< double > & | searchDirection | |||
) | [private] |
Finds a point in the interval [a_lo, a_hi] that satisfy the strong Wolfe conditions.
See Nocedal and Wright p 60.
alphaLo | lower bound on the step length. | |
alphaHi | upper bound on the step length. | |
phi_0 | objective function value at the current parameters | |
phi_alphaLo | 1-D objective function value at the smallest step length. | |
phi_alphaHi | 1-D objective function value at the largest step length. | |
phiPrime_0 | derivative of the 1-D objective function at the current parameters. | |
params | set of parameters to evaluate the function with | |
searchDirection | direction the line search is being performed along. |
Definition at line 129 of file QMCWolfeStepLengthSelector.cpp.
References calculateLineSearchObjectiveFunction(), calculateLineSearchObjectiveFunctionDerivative(), and cubicInterpolateStep().
Referenced by wolfeStepLength().
double QMCWolfeStepLengthSelector::wolfeStepLength | ( | double | alphaGuess, | |
Array1D< double > & | params, | |||
Array1D< double > & | searchDirection, | |||
Array1D< double > & | gradient, | |||
double | functionValue | |||
) | [private] |
Finds a point between 0 and the maximum step length which satisfies the Wolfe conditions.
See Nocedal and Wright p 59.
alphaGuess | guess at a step length satisfying the Wolfe conditions. | |
params | set of parameters to evaluate the function with | |
searchDirection | direction the line search is being performed along. | |
gradient | gradient of the objective function. | |
functionValue | value of the objective function at the current set of parameters. |
Definition at line 188 of file QMCWolfeStepLengthSelector.cpp.
References calculateLineSearchObjectiveFunction(), calculateLineSearchObjectiveFunctionDerivative(), cubicInterpolateStep(), and zoom().
Referenced by stepLength().
The objective function used in calculating the step length.
Definition at line 43 of file QMCWolfeStepLengthSelector.h.
Referenced by calculateLineSearchObjectiveFunction(), and stepLength().