Reinforcement Learning Toolbox 2.0
last updated:
General
Documentation
Manual
Tutorial
Class Reference
Master Thesis
Examples
Related Papers
Downloads
Links
News
mailto:webmaster
Main Page     Class Hierarchy   Compound List   File List   Compound Members   File Members

CFeatureCalculator Class Reference

Base class for all Feature Calculators. More...

#include <cstatemodifier.h>

Inheritance diagram for CFeatureCalculator:

CStateModifier CStateProperties CFeatureOperatorAnd CFeatureOperatorOr CForestFeatureCalculator< TreeData > CGridFeatureCalculator CRBFCenterFeatureCalculator CSingleStateFeatureCalculator CLinearMultiFeatureCalculator CTilingFeatureCalculator CSingleStateLinearInterpolationFeatureCalculator CSingleStateRBFFeatureCalculator CLinearInterpolationFeatureCalculator CRBFFeatureCalculator List of all members.


Public Member Functions

  CFeatureCalculator (unsigned int numFeatures, unsigned int numActiveFeatures)
virtual  ~CFeatureCalculator ()
virtual unsigned int  getNumFeatures ()
virtual unsigned int  getNumActiveFeatures ()
virtual unsigned int  getDiscreteStateSize (unsigned int i)
  Returns the discrete state size of the dim th state.

virtual unsigned int  getDiscreteStateSize ()
  returns the discrete state size of all discrete states together (i.e the product of all sizes)

virtual double  getMin (unsigned int i)
virtual double  getMax (unsigned int i)
CStateProperties getOriginalState ()
  Sets the original state.

void  setOriginalState (CStateProperties *originalState)


Protected Member Functions

void  normalizeFeatures (CState *featState)
  Normalizes all active features of the given feature state.

  CFeatureCalculator ()
void  initFeatureCalculator (unsigned int numFeatures, unsigned int numActiveFeatures)
  sets the state properties



Protected Attributes

unsigned int  numFeatures
unsigned int  numActiveFeatures
CStateProperties originalState

Detailed Description

Base class for all Feature Calculators.

Features always have a unique feature index and a feature activation factor, they are used for linear approximators. Feature calculators determine the feature activation factors of a feature state. A feature state consists of N discrete and continuous state variables, each pair represents a feature. All features which are not listed in a feature state have an activation factor of 0.0, so N is the maximum number of active features in a feature state.

The CFeatureCalculator class is the interface of all other feature calculators, it sets the state properties (numActiveFeatures continuous + discrete states, min = 0, max = 1.0 of all continuous states, and numFeatures is the discrete state size of all discrete state variables)
It also provides functions for setting the original state. The original state is used by all feature calculators as the "working" state. This is per default the model state, but can be set differently if needed.
The feature calculation itself is implemented by the subclasses in the function getModifiedState.

Constructor & Destructor Documentation

CFeatureCalculator::CFeatureCalculator  )  [protected]
 
CFeatureCalculator::CFeatureCalculator unsigned int  numFeatures,
unsigned int  numActiveFeatures
 
virtual CFeatureCalculator::~CFeatureCalculator  )  [inline, virtual]
 

Member Function Documentation

virtual unsigned int CFeatureCalculator::getDiscreteStateSize  )  [virtual]
 

returns the discrete state size of all discrete states together (i.e the product of all sizes)

Reimplemented from CStateProperties.

virtual unsigned int CFeatureCalculator::getDiscreteStateSize unsigned int  i  )  [virtual]
 

Returns the discrete state size of the dim th state.

Reimplemented from CStateProperties.

virtual double CFeatureCalculator::getMax unsigned int  i  )  [virtual]
 
virtual double CFeatureCalculator::getMin unsigned int  i  )  [virtual]
 
virtual unsigned int CFeatureCalculator::getNumActiveFeatures  )  [virtual]
 
virtual unsigned int CFeatureCalculator::getNumFeatures  )  [virtual]
 
CStateProperties* CFeatureCalculator::getOriginalState  )  [inline]
 

Sets the original state.

The original state is used by all feature calculators as the "working" state. This is per default the model state, but can be set differently if needed.

void CFeatureCalculator::initFeatureCalculator unsigned int  numFeatures,
unsigned int  numActiveFeatures
[protected]
 

sets the state properties

void CFeatureCalculator::normalizeFeatures CState featState  )  [protected]
 

Normalizes all active features of the given feature state.

Normalizes the feature factors so that the sum of all factors equals 1.0.

void CFeatureCalculator::setOriginalState CStateProperties originalState  )  [inline]
 

Member Data Documentation

unsigned int CFeatureCalculator::numActiveFeatures [protected]
 
unsigned int CFeatureCalculator::numFeatures [protected]
 
CStateProperties* CFeatureCalculator::originalState [protected]
 

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