CFunctionComperator Class Reference
Super class of the
V-Function Comperators and Q-Function comperators.
More...
#include <canalyzer.h>
Inheritance diagram for CFunctionComperator:
List of all
members.
Detailed Description
Super class of the V-Function Comperators and Q-Function
comperators.
Function comperators calculate the difference between 2
V-Functions or Q-Functions. You have2 possibilities to do this:
- calculate the difference for N random states (with
compareFunctionsRandom)
- calculate the difference for a given state list (with
compareFunctionsStates)
For each of these 2 functions you can define the errorfunction
which should be used. There are 3 different kinds of
errorfunctions:
- MSE: calculate the mean squared error between the 2
functions
- MAE: calculate the mean average error between the 2
functions
- MAXERROR : calculate the maximum error between the 2
functions
Constructor & Destructor Documentation
| |
The comperator needs the properties of the model state and all
modifiers the 2 functions use.
It is recommended to take the agent's state modifiers
(agent->getStateModifiers();).
|
| virtual
CFunctionComperator::~CFunctionComperator
|
( |
|
) |
[virtual] |
|
Member Function Documentation
| double
CFunctionComperator::compareFunctionsRandom
|
( |
int |
nSamples,
|
|
|
int |
errorFunction =
1 |
|
) |
|
|
| |
Compares the 2 functions for nSamples random states.
For more details about the errorfunction see the class
description.
|
| double
CFunctionComperator::compareFunctionsStates
|
( |
CStateList *
|
states,
|
|
|
int |
errorFunction =
1 |
|
) |
|
|
| |
Compares the 2 functions for every state in the state list.
For more details about the errorfunction see the class
description.
|
| virtual double
CFunctionComperator::getDifference
|
( |
CStateCollection *
|
state,
|
|
|
int |
errorFunction |
|
) |
[protected,
virtual] |
|
| |
get the difference of the 2 functions for the given state, use
the given errorfunction
|
| void
CFunctionComperator::getRandomState
|
( |
CState *
|
state |
) |
[protected] |
|
| virtual double
CFunctionComperator::getValue
|
( |
int |
numFunc,
|
|
|
CStateCollection *
|
state |
|
) |
[protected, pure
virtual] |
|
Member Data Documentation
The documentation for this class was generated from the following
file:
|