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

Base class for all learning rate functions Template base class for all learning rates (virtual). More...

#include <CLearnRate.h>

Inheritance diagram for CLearnRate< Type >:
CObject< Type > CConstantRate< Type > CExponentialRate< Type > CHarmonicRate< Type > CLinearRate< Type >

Public Member Functions

virtual Type iterate (void)
 
virtual ~CLearnRate ()
 
virtual Type rate (int iIterationNumber)
 
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 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...
 
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...
 

Protected Attributes

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 CLearnRate< Type >

Base class for all learning rate functions Template base class for all learning rates (virtual).

Constructor & Destructor Documentation

template<class Type>
virtual CLearnRate< Type >::~CLearnRate ( )
inlinevirtual

Member Function Documentation

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

Returns the class name.

Reimplemented from CObject< Type >.

Reimplemented in CExponentialRate< Type >, CLinearRate< Type >, CHarmonicRate< Type >, and CConstantRate< Type >.

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

template<class Type>
Type CLearnRate< Type >::getFinal ( )
inline
template<class Type>
Type CLearnRate< Type >::getInitial ( )
inline
template<class Type>
int CLearnRate< Type >::getIteration ( )
inline
template<class Type>
int CLearnRate< Type >::getIterations ( )
inline
template<class Type>
Type CLearnRate< Type >::getRate ( )
inline
template<class Type>
virtual bool CLearnRate< Type >::isA ( const char *  acClass) const
inlinevirtual
template<class Type>
virtual Type CLearnRate< Type >::iterate ( void  )
inlinevirtual

@ Gets the learning rate for the next iteration.

Reimplemented in CExponentialRate< Type >, CLinearRate< Type >, CHarmonicRate< Type >, and CConstantRate< Type >.

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

Gets the learning rate for a given iteration number.

Reimplemented in CExponentialRate< Type >, CLinearRate< Type >, CHarmonicRate< Type >, and CConstantRate< Type >.

template<class Type>
void CLearnRate< Type >::reset ( )
inline
template<class Type>
virtual bool CLearnRate< Type >::serialize ( fstream &  stream,
IO_MODE  mode = READ 
)
virtual

Read/write from binary stream.

The functions handles different data types e.g for reading float objects in a double instance, etc.

Parameters
fstreamReference to binary stream
modeSwitches between reading and writing
Returns
True if successful, false otherwise

Reimplemented from CObject< Type >.

template<class Type>
void CLearnRate< Type >::setFinal ( Type  tVal)
inline
template<class Type>
void CLearnRate< Type >::setInitial ( Type  tVal)
inline
template<class Type>
void CLearnRate< Type >::setIteration ( int  iVal)
inline
template<class Type>
void CLearnRate< Type >::setIterations ( int  iVal)
inline

Member Data Documentation

template<class Type>
int CLearnRate< Type >::iIteration
protected
template<class Type>
int CLearnRate< Type >::iMaxIteration
protected
template<class Type>
Type CLearnRate< Type >::tDecay
protected
template<class Type>
Type CLearnRate< Type >::tFinal
protected
template<class Type>
Type CLearnRate< Type >::tInitial
protected
template<class Type>
Type CLearnRate< Type >::tRate
protected

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