shark::IRpropPlusFull Class Reference

#include <shark/Algorithms/GradientDescent/Rprop.h>

+ Inheritance diagram for shark::IRpropPlusFull:

Public Member Functions

SHARK_EXPORT_SYMBOL IRpropPlusFull ()
 
std::string name () const
 From INameable: return the class name. More...
 
SHARK_EXPORT_SYMBOL void init (ObjectiveFunctionType const &objectiveFunction, SearchPointType const &startingPoint)
 initializes the optimizer using a predefined starting point More...
 
SHARK_EXPORT_SYMBOL void init (ObjectiveFunctionType const &objectiveFunction, SearchPointType const &startingPoint, double initDelta)
 
SHARK_EXPORT_SYMBOL void step (ObjectiveFunctionType const &objectiveFunction)
 Carry out one step of the optimizer for the supplied objective function. More...
 
SHARK_EXPORT_SYMBOL void setDerivativeThreshold (double derivativeThreshold)
 
SHARK_EXPORT_SYMBOL void read (InArchive &archive)
 Read the component from the supplied archive. More...
 
SHARK_EXPORT_SYMBOL void write (OutArchive &archive) const
 Write the component to the supplied archive. More...
 
- Public Member Functions inherited from shark::RpropPlus
SHARK_EXPORT_SYMBOL RpropPlus ()
 
- Public Member Functions inherited from shark::RpropMinus
SHARK_EXPORT_SYMBOL RpropMinus ()
 
void setEtaMinus (double etaMinus)
 set decrease factor More...
 
void setEtaPlus (double etaPlus)
 set increase factor More...
 
void setMaxDelta (double d)
 set upper limit on update More...
 
void setMinDelta (double d)
 set lower limit on update More...
 
double maxDelta () const
 return the maximal step size component More...
 
RealVector const & derivative () const
 Returns the derivative at the current point. Can be used for stopping criteria. More...
 
- Public Member Functions inherited from shark::AbstractSingleObjectiveOptimizer< RealVector >
std::size_t numInitPoints () const
 By default most single objective optimizers only require a single point. More...
 
virtual void init (ObjectiveFunctionType const &function, std::vector< SearchPointType > const &initPoints)
 Initialize the optimizer for the supplied objective function using a set of initialisation points. More...
 
virtual const SolutionTypesolution () const
 returns the current solution of the optimizer More...
 
- Public Member Functions inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >
const Featuresfeatures () const
 
virtual void updateFeatures ()
 
bool requiresValue () const
 
bool requiresFirstDerivative () const
 
bool requiresSecondDerivative () const
 
bool canSolveConstrained () const
 
bool requiresClosestFeasible () const
 
virtual ~AbstractOptimizer ()
 
virtual void init (ObjectiveFunctionType const &function)
 Initialize the optimizer for the supplied objective function. 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 ()
 

Protected Attributes

double m_oldError
 The error of the last iteration. More...
 
double m_derivativeThreshold
 A threshold below which partial derivatives are set to zero. More...
 
- Protected Attributes inherited from shark::RpropPlus
RealVector m_deltaw
 The final update values for all weights. More...
 
- Protected Attributes inherited from shark::RpropMinus
ObjectiveFunctionType::FirstOrderDerivative m_derivative
 
double m_increaseFactor
 The increase factor \( \eta^+ \), set to 1.2 by default. More...
 
double m_decreaseFactor
 The decrease factor \( \eta^- \), set to 0.5 by default. More...
 
double m_maxDelta
 The upper limit of the increments \( \Delta w_i^{(t)} \), set to 1e100 by default. More...
 
double m_minDelta
 The lower limit of the increments \( \Delta w_i^{(t)} \), set to 0.0 by default. More...
 
size_t m_parameterSize
 
RealVector m_oldDerivative
 The last error gradient. More...
 
RealVector m_delta
 The absolute update values (increment) for all weights. 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
 

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, ResultTypeObjectiveFunctionType
 
typedef TypedFlags< FeatureFeatures
 
typedef TypedFeatureNotAvailableException< FeatureFeatureNotAvailableException
 
- 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...
 

Detailed Description

Definition at line 416 of file Rprop.h.

Constructor & Destructor Documentation

◆ IRpropPlusFull()

SHARK_EXPORT_SYMBOL shark::IRpropPlusFull::IRpropPlusFull ( )

Member Function Documentation

◆ init() [1/2]

SHARK_EXPORT_SYMBOL void shark::IRpropPlusFull::init ( ObjectiveFunctionType const &  function,
SearchPointType const &  startingPoint 
)
virtual

initializes the optimizer using a predefined starting point

Reimplemented from shark::RpropPlus.

Referenced by main(), and trainAutoencoderModel().

◆ init() [2/2]

SHARK_EXPORT_SYMBOL void shark::IRpropPlusFull::init ( ObjectiveFunctionType const &  objectiveFunction,
SearchPointType const &  startingPoint,
double  initDelta 
)
virtual

Reimplemented from shark::RpropPlus.

◆ name()

std::string shark::IRpropPlusFull::name ( ) const
inlinevirtual

From INameable: return the class name.

Reimplemented from shark::RpropPlus.

Definition at line 422 of file Rprop.h.

References shark::RpropMinus::init(), shark::RpropMinus::read(), SHARK_EXPORT_SYMBOL, shark::RpropMinus::step(), and shark::RpropMinus::write().

◆ read()

SHARK_EXPORT_SYMBOL void shark::IRpropPlusFull::read ( InArchive archive)
virtual

Read the component from the supplied archive.

Parameters
[in,out]archiveThe archive to read from.

Reimplemented from shark::RpropPlus.

◆ setDerivativeThreshold()

SHARK_EXPORT_SYMBOL void shark::IRpropPlusFull::setDerivativeThreshold ( double  derivativeThreshold)

◆ step()

SHARK_EXPORT_SYMBOL void shark::IRpropPlusFull::step ( ObjectiveFunctionType const &  function)
virtual

Carry out one step of the optimizer for the supplied objective function.

Parameters
[in]functionThe objective function to initialize for.

Reimplemented from shark::RpropPlus.

Referenced by main(), and trainAutoencoderModel().

◆ write()

SHARK_EXPORT_SYMBOL void shark::IRpropPlusFull::write ( OutArchive archive) const
virtual

Write the component to the supplied archive.

Parameters
[in,out]archiveThe archive to write to.

Reimplemented from shark::RpropPlus.

Member Data Documentation

◆ m_derivativeThreshold

double shark::IRpropPlusFull::m_derivativeThreshold
protected

A threshold below which partial derivatives are set to zero.

Definition at line 440 of file Rprop.h.

◆ m_oldError

double shark::IRpropPlusFull::m_oldError
protected

The error of the last iteration.

Definition at line 438 of file Rprop.h.


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