Machine Learning Library
Public Member Functions | List of all members
CLinearRate< Type > Class Template Reference

Linear decreasing learn rate Template class for linear decreasing learning rates. More...

#include <CLearnRate.h>

Inheritance diagram for CLinearRate< Type >:
CLearnRate< Type > CObject< Type >

Public Member Functions

 CLinearRate (Type tInitialRate=0.5, Type tFinalRate=0.01, int iMaxIterationNumber=100)
 
Type iterate (void)
 
Type rate (int iIterationNumber)
 
virtual string className () const
 Returns the class name. More...
 
virtual bool isA (const char *acClass) const
 Check if the object is an instance of the class with given name. More...
 
- Public Member Functions inherited from CLearnRate< Type >
virtual ~CLearnRate ()
 
void setInitial (Type tVal)
 
void setFinal (Type tVal)
 
void setIterations (int iVal)
 
void reset ()
 
void setIteration (int iVal)
 
Type getInitial ()
 
Type getFinal ()
 
Type getRate ()
 
int getIterations ()
 
int getIteration ()
 
virtual bool serialize (fstream &stream, IO_MODE mode=READ)
 Read/write from binary stream. More...
 
- Public Member Functions inherited from CObject< Type >
 CObject ()
 Constructor. More...
 
virtual ~CObject ()
 Destructor. More...
 
virtual bool serialize2 (CArchiv &tArchiv)
 
void setVerbose (VERBOSE_LEVEL tVerbose)
 Set the verbose level. More...
 
VERBOSE_LEVEL verbose (void) const
 Return current verbose level. More...
 
DATATYPE dataType () const
 Returns the template data type. More...
 

Additional Inherited Members

- Protected Attributes inherited from CLearnRate< Type >
Type tInitial
 
Type tFinal
 
Type tRate
 
Type tDecay
 
int iMaxIteration
 
int iIteration
 
- Protected Attributes inherited from CObject< Type >
unsigned char ucVerbose
 

Detailed Description

template<class Type>
class CLinearRate< Type >

Linear decreasing learn rate Template class for linear decreasing learning rates.

Constructor & Destructor Documentation

template<class Type >
CLinearRate< Type >::CLinearRate ( Type  tInitialRate = 0.5,
Type  tFinalRate = 0.01,
int  iMaxIterationNumber = 100 
)

Constructor for a linear learning rate object.

Parameters
tInitialRateDefines the initial learning rate
tFinalRateDefines the final learning rate
iMaxIterationNumberDefines the maximum number of iterations

Member Function Documentation

template<class Type >
virtual string CLinearRate< Type >::className ( ) const
inlinevirtual

Returns the class name.

Reimplemented from CLearnRate< Type >.

Referenced by CLinearRate< Type >::isA().

template<class Type >
virtual bool CLinearRate< Type >::isA ( const char *  acClass) const
inlinevirtual

Check if the object is an instance of the class with given name.

Reimplemented from CLearnRate< Type >.

References CLinearRate< Type >::className(), and CLearnRate< Type >::isA().

template<class Type >
Type CLinearRate< Type >::iterate ( void  )
virtual

Gets the learning rate for the next iteration.

Returns
learning rate

Reimplemented from CLearnRate< Type >.

template<class Type >
Type CLinearRate< Type >::rate ( int  iIterationNumber)
virtual

Gets the learning rate for iteration iIteration.

Parameters
iIterationDefines the iteration number.
Returns
learning rate

Reimplemented from CLearnRate< Type >.


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