Standard steepest descent. More...
#include <shark/Algorithms/GradientDescent/SteepestDescent.h>
Inheritance diagram for shark::SteepestDescent:Public Member Functions | |
| SteepestDescent () | |
| std::string | name () const |
| From INameable: return the class name. More... | |
| void | init (ObjectiveFunctionType &objectiveFunction, SearchPointType const &startingPoint) |
| initializes the optimizer using a predefined starting point More... | |
| double | learningRate () const |
| get learning rate More... | |
| void | setLearningRate (double learningRate) |
| set learning rate More... | |
| double | momentum () const |
| get momentum parameter More... | |
| void | setMomentum (double momentum) |
| set momentum parameter More... | |
| void | step (ObjectiveFunctionType const &objectiveFunction) |
| updates searchdirection and then does simple gradient descent More... | |
| virtual void | read (InArchive &archive) |
| Read the component from the supplied archive. More... | |
| virtual void | write (OutArchive &archive) const |
| Write the component to the supplied archive. More... | |
Public Member Functions inherited from shark::AbstractSingleObjectiveOptimizer< RealVector > | |
| virtual void | init (ObjectiveFunctionType &function) |
| virtual const SolutionType & | solution () const |
| returns the current solution of the optimizer More... | |
Public Member Functions inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
| const Features & | features () const |
| virtual void | updateFeatures () |
| bool | requiresValue () const |
| bool | requiresFirstDerivative () const |
| bool | requiresSecondDerivative () const |
| bool | canSolveConstrained () const |
| bool | requiresClosestFeasible () const |
| virtual | ~AbstractOptimizer () |
| Empty virtual d'tor. More... | |
Public Member Functions inherited from shark::INameable | |
| virtual | ~INameable () |
Public Member Functions inherited from shark::ISerializable | |
| virtual | ~ISerializable () |
| Virtual d'tor. More... | |
| void | load (InArchive &archive, unsigned int version) |
| Versioned loading of components, calls read(...). More... | |
| void | save (OutArchive &archive, unsigned int version) const |
| Versioned storing of components, calls write(...). More... | |
| BOOST_SERIALIZATION_SPLIT_MEMBER () | |
Additional Inherited Members | |
Public Types inherited from shark::AbstractSingleObjectiveOptimizer< RealVector > | |
| typedef base_type::SearchPointType | SearchPointType |
| typedef base_type::SolutionType | SolutionType |
| typedef base_type::ResultType | ResultType |
| typedef base_type::ObjectiveFunctionType | ObjectiveFunctionType |
Public Types inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
| enum | Feature |
| Models features that the optimizer requires from the objective function. More... | |
| typedef RealVector | SearchPointType |
| typedef double | ResultType |
| typedef SingleObjectiveResultSet< RealVector > | SolutionType |
| typedef AbstractObjectiveFunction< RealVector, ResultType > | ObjectiveFunctionType |
| typedef TypedFlags< Feature > | Features |
| typedef TypedFeatureNotAvailableException< Feature > | FeatureNotAvailableException |
Protected Member Functions inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
| void | checkFeatures (ObjectiveFunctionType const &objectiveFunction) |
| Convenience function that checks whether the features of the supplied objective function match with the required features of the optimizer. More... | |
Protected Attributes inherited from shark::AbstractSingleObjectiveOptimizer< RealVector > | |
| SolutionType | m_best |
| current solution of the optimizer More... | |
Protected Attributes inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
| Features | m_features |
Standard steepest descent.
Definition at line 42 of file SteepestDescent.h.
|
inline |
|
inlinevirtual |
initializes the optimizer using a predefined starting point
Implements shark::AbstractSingleObjectiveOptimizer< RealVector >.
Definition at line 56 of file SteepestDescent.h.
References shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >::checkFeatures(), shark::AbstractObjectiveFunction< PointType, ResultT >::evalDerivative(), shark::AbstractObjectiveFunction< PointType, ResultT >::init(), shark::AbstractSingleObjectiveOptimizer< RealVector >::m_best, shark::ResultSet< SearchPointT, ResultT >::point, and shark::ResultSet< SearchPointT, ResultT >::value.
Referenced by main(), and trainRBM().
|
inline |
|
inline |
get momentum parameter
Definition at line 84 of file SteepestDescent.h.
Referenced by setMomentum().
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
Definition at line 53 of file SteepestDescent.h.
|
inlinevirtual |
Read the component from the supplied archive.
| [in,out] | archive | The archive to read from. |
Reimplemented from shark::ISerializable.
Definition at line 102 of file SteepestDescent.h.
|
inline |
set learning rate
Definition at line 77 of file SteepestDescent.h.
References learningRate().
Referenced by main(), and trainRBM().
|
inline |
set momentum parameter
Definition at line 91 of file SteepestDescent.h.
References momentum().
Referenced by main().
|
inlinevirtual |
updates searchdirection and then does simple gradient descent
Implements shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >.
Definition at line 97 of file SteepestDescent.h.
References shark::AbstractObjectiveFunction< PointType, ResultT >::evalDerivative(), shark::AbstractSingleObjectiveOptimizer< RealVector >::m_best, shark::ResultSet< SearchPointT, ResultT >::point, and shark::ResultSet< SearchPointT, ResultT >::value.
Referenced by main(), and trainRBM().
|
inlinevirtual |
Write the component to the supplied archive.
| [in,out] | archive | The archive to write to. |
Reimplemented from shark::ISerializable.
Definition at line 109 of file SteepestDescent.h.