LDA++
Public Types | Public Member Functions | List of all members
ldaplusplus::optimization::ConstantLineSearch< ProblemType, ParameterType > Class Template Reference

#include <GradientDescent.hpp>

Inheritance diagram for ldaplusplus::optimization::ConstantLineSearch< ProblemType, ParameterType >:
ldaplusplus::optimization::LineSearch< ProblemType, ParameterType >

Public Types

typedef ParameterType::Scalar Scalar
 
- Public Types inherited from ldaplusplus::optimization::LineSearch< ProblemType, ParameterType >
typedef ParameterType::Scalar Scalar
 

Public Member Functions

 ConstantLineSearch (Scalar alpha)
 
Scalar search (const ProblemType &problem, Eigen::Ref< ParameterType > x0, const ParameterType &grad_x0, const ParameterType &direction)
 

Detailed Description

template<typename ProblemType, typename ParameterType>
class ldaplusplus::optimization::ConstantLineSearch< ProblemType, ParameterType >

ConstantLineSearch simply updates the parameter by a costant factor of the direction performing no line search actually.

Constructor & Destructor Documentation

template<typename ProblemType , typename ParameterType >
ldaplusplus::optimization::ConstantLineSearch< ProblemType, ParameterType >::ConstantLineSearch ( Scalar  alpha)
inline
Parameters
alphaThe amount to move towards the search direction

Member Function Documentation

template<typename ProblemType , typename ParameterType >
Scalar ldaplusplus::optimization::ConstantLineSearch< ProblemType, ParameterType >::search ( const ProblemType &  problem,
Eigen::Ref< ParameterType >  x0,
const ParameterType &  grad_x0,
const ParameterType &  direction 
)
inlinevirtual

Search for a good enough function value in the direction given and the function given.

This function changes its parameter x0 which is passed by reference.

Parameters
problemThe function to be minimized
x0The improved position (passed by reference)
grad_x0The gradient at the initial x0
directionThe direction of search which can be different than the gradient to account for Newton methods
Returns
The function value at the final x0

Implements ldaplusplus::optimization::LineSearch< ProblemType, ParameterType >.


The documentation for this class was generated from the following file: