CFeatureFunction Class Reference
The feature function for
storing features in an double array.
More...
#include <cfeaturefunction.h>
Inheritance diagram for CFeatureFunction:
List of all
members.
Detailed Description
The feature function for storing features in an double array.
This class is base class of all V-Functions which use features
(used by linear approximators) and discrete states. A feature
function is a table storing the values of every feature. The class
provides direct access to the feature values through the functions
setFeature, updateFeature and getFeature. It also provides
functions for working with feature lists (setFeatureList,
updateFeatureList, getFeatureList). When working with feature
lists, not a single feature value, but all feature values of the
features in the list get accessed, but each access is "multiplied"
by the features activation factors. So, for example if you want to
update the features of a feature list by the factor 5.0, and the
feature list contains two features, feature nr. 80 and feature nr.
85, each having the same activation factor (often also called
feature factor) of 0.5, than the update for both features would be
2.5. The same concept is true for setFeatureList and
getFeatureList.
Constructor & Destructor Documentation
|
CFeatureFunction::CFeatureFunction
|
( |
unsigned int |
numFeatures |
) |
|
|
| |
creates a feature function with numFeatures
features.
|
|
CFeatureFunction::CFeatureFunction
|
( |
unsigned int |
numFeatures,
|
|
|
double * |
features |
|
) |
|
|
| virtual
CFeatureFunction::~CFeatureFunction
|
( |
|
) |
[virtual] |
|
Member Function Documentation
| virtual double
CFeatureFunction::getFeature
|
( |
unsigned int |
featureIndex |
) |
[virtual] |
|
| |
Returns the value of the feature.
|
| virtual double
CFeatureFunction::getFeatureList
|
( |
CFeatureList *
|
featureList |
) |
[virtual] |
|
| |
Returns the summed values of the features in the list.
Each value of a feature gets multplied by the feature factor and
then summed up.
|
| virtual unsigned int
CFeatureFunction::getNumFeatures
|
( |
|
) |
[virtual] |
|
| void
CFeatureFunction::init
|
( |
double |
value |
) |
|
|
| virtual void
CFeatureFunction::loadFeatures
|
( |
FILE * |
stream |
) |
[virtual] |
|
| void
CFeatureFunction::postProcessWeights
|
( |
double |
mean,
|
|
|
double |
std |
|
) |
|
|
| virtual void
CFeatureFunction::printFeatures
|
( |
|
) |
[virtual] |
|
| void
CFeatureFunction::randomInit
|
( |
double |
min =
-1.0,
|
|
|
double |
max =
1.0 |
|
) |
|
|
| |
Initializes the features with random values.
The random values are sampled from an uniform distribution
between min and max.
|
| virtual void
CFeatureFunction::saveFeatures
|
( |
FILE * |
stream |
) |
[virtual] |
|
| void
CFeatureFunction::setFeature
|
( |
unsigned int |
featureIndex,
|
|
|
double |
value |
|
) |
|
|
| |
Sets the feature to the specified value.
|
| void
CFeatureFunction::setFeature
|
( |
CFeature *
|
update,
|
|
|
double |
value |
|
) |
|
|
| |
Sets the feature to the specified value.
the value gets multiplied by the feature factor of update
object.
|
| void
CFeatureFunction::setFeatureList
|
( |
CFeatureList *
|
updateList,
|
|
|
double |
value |
|
) |
|
|
| void
CFeatureFunction::updateFeature
|
( |
CFeature *
|
update,
|
|
|
double |
difference |
|
) |
|
|
| |
Adds the difference to the specified feature.
The difference is multiplied by the feature factor of the update
object before updating.
|
| void
CFeatureFunction::updateFeature
|
( |
int |
feature,
|
|
|
double |
difference |
|
) |
|
|
| |
Adds the difference to the specified
feature.
|
| void
CFeatureFunction::updateFeatureList
|
( |
CFeatureList *
|
updateList,
|
|
|
double |
value |
|
) |
|
|
Member Data Documentation
The documentation for this class was generated from the following
file:
|