A least squares wire fitted Interpolator.
More...
#include <LSInterpolator.h>
Inherits rl::Interpolator.
|
| | LSInterpolator () |
| | Initializes a LSInterpolator with default parameters. More...
|
| |
| | LSInterpolator (double smoothingFactor_, double e_) |
| | Initializes a LSInterpolator with custom parameters. More...
|
| |
| bool | initFromStream (std::ifstream *in) |
| | Initializes a LSInterpolator using the information from a file. More...
|
| |
| void | store (std::ofstream *out) |
| | Stores the interpolator object in a file. More...
|
| |
| double | getReward (const std::vector< Wire > &controlWires, const std::vector< double > &action) |
| | Uses the interpolator function to compute the reward of an action vector given a set of control wires. More...
|
| |
| double | rewardDerivative (const std::vector< double > &action, const Wire &wire, const std::vector< Wire > &controlWires) |
| | Computes the partial derivative of the interpolator function with respect to the reward of a control wire. More...
|
| |
| double | actionTermDerivative (double actionTerm, double wireActionTerm, const std::vector< double > &action, const Wire &wire, const std::vector< Wire > &controlWires) |
| | Computes the partial derivative of the interpolator function with respect to the value of one term of the action vector of a control wire. More...
|
| |
A least squares wire fitted Interpolator.
| LSInterpolator::LSInterpolator |
( |
| ) |
|
Initializes a LSInterpolator with default parameters.
PUBLIC METHODS.
The default smoothingFactor is 0, while the default e is 0.01.
| LSInterpolator::LSInterpolator |
( |
double |
smoothingFactor_, |
|
|
double |
e_ |
|
) |
| |
Initializes a LSInterpolator with custom parameters.
- Parameters
-
| smoothingFactor_ | the smoothing factor for the interpolator |
| e_ | a small constant (less than 1) |
| double LSInterpolator::actionTermDerivative |
( |
double |
actionTerm, |
|
|
double |
wireActionTerm, |
|
|
const std::vector< double > & |
action, |
|
|
const Wire & |
wire, |
|
|
const std::vector< Wire > & |
controlWires |
|
) |
| |
|
virtual |
Computes the partial derivative of the interpolator function with respect to the value of one term of the action vector of a control wire.
- Parameters
-
| actionTerm | the action term |
| wireActionTerm | the wire action term |
| action | the action vector |
| wire | the wire |
| controlWires | the vector of control wires |
- Returns
- the action term derivative
Implements rl::Interpolator.
| double LSInterpolator::getReward |
( |
const std::vector< Wire > & |
controlWires, |
|
|
const std::vector< double > & |
action |
|
) |
| |
|
virtual |
Uses the interpolator function to compute the reward of an action vector given a set of control wires.
- Parameters
-
| controlWires | the input vector of control wires |
| action | the action vector for which the reward is computed |
- Returns
- the expected reward of the action vector
Implements rl::Interpolator.
| bool LSInterpolator::initFromStream |
( |
std::ifstream * |
in | ) |
|
|
virtual |
| double LSInterpolator::rewardDerivative |
( |
const std::vector< double > & |
action, |
|
|
const Wire & |
wire, |
|
|
const std::vector< Wire > & |
controlWires |
|
) |
| |
|
virtual |
Computes the partial derivative of the interpolator function with respect to the reward of a control wire.
- Parameters
-
| action | the action vector |
| wire | the wire |
| controlWires | the control wires |
- Returns
- the reward derivative
Implements rl::Interpolator.
| void LSInterpolator::store |
( |
std::ofstream * |
out | ) |
|
|
virtual |
Stores the interpolator object in a file.
- Parameters
-
Implements rl::Interpolator.
| double rl::LSInterpolator::e |
| double rl::LSInterpolator::smoothingFactor |
The documentation for this class was generated from the following files: