iCub-main
|
A class that implements preprocessing based on a fixed range of outputs to a fixed range of outputs. More...
#include <FixedRangeScaler.h>
Public Member Functions | |
FixedRangeScaler (double li=-1., double ui=1., double lo=-1., double uo=1.) | |
Constructor. More... | |
virtual std::string | getInfo () |
Asks the learning machine to return a string containing statistics on its operation so far. More... | |
virtual bool | configure (yarp::os::Searchable &config) |
FixedRangeScaler * | clone () |
Asks the scaler to return a new object of its type. More... | |
virtual double | getLowerBoundOut () |
Accessor for the desired lower bound. More... | |
virtual void | setLowerBoundOut (double lo) |
Mutator for the desired lower bound. More... | |
virtual double | getUpperBoundOut () |
Accessor for the desired upper bound. More... | |
virtual void | setUpperBoundOut (double uo) |
Mutator for the desired upper bound. More... | |
virtual double | getLowerBoundIn () |
Accessor for the expected lower bound. More... | |
virtual void | setLowerBoundIn (double li) |
Mutator for the expected lower bound. More... | |
virtual double | getUpperBoundIn () |
Accessor for the expected upper bound. More... | |
virtual void | setUpperBoundIn (double ui) |
Mutator for the expected upper bound. More... | |
Public Member Functions inherited from iCub::learningmachine::IScaler | |
IScaler (double s=1., double o=0.) | |
Constructor. More... | |
virtual | ~IScaler () |
Destructor (empty). More... | |
virtual void | update (double val) |
Feeds a single sample into the scaler, so that it can use this sample to update the offset and scale. More... | |
virtual double | transform (double val) |
Transforms a single sample value according to the state of the scaler. More... | |
virtual double | unTransform (double val) |
Untransforms a single sample value according to the state of the scaler. More... | |
std::string | getName () const |
Retrieve the name of this scaler. More... | |
void | setName (std::string name) |
Set the name of this machine learning technique. More... | |
virtual void | setUpdateEnabled (bool u) |
Mutator for the update state. More... | |
virtual bool | getUpdateEnabled () |
Accessor for the update state. More... | |
virtual std::string | toString () |
Asks the scaler to return a string serialization. More... | |
virtual bool | fromString (const std::string &str) |
Asks the scaler to initialize from a string serialization. More... | |
Protected Member Functions | |
void | updateScales () |
Updates the scale and offset according to the specified expected and desired ranges. More... | |
virtual void | writeBottle (yarp::os::Bottle &bot) |
Writes a serialization of the scaler into a bottle. More... | |
virtual void | readBottle (yarp::os::Bottle &bot) |
Unserializes a scaler from a bottle. More... | |
Protected Attributes | |
double | lowerBoundIn |
The expected lower bound in the sample values. More... | |
double | upperBoundIn |
The expected upper bound in the sample values. More... | |
double | lowerBoundOut |
The desired lower bound for the output range. More... | |
double | upperBoundOut |
The desired upper bound for the output range. More... | |
Protected Attributes inherited from iCub::learningmachine::IScaler | |
double | offset |
The offset for the linear transformation. More... | |
double | scale |
The scale for the linear transformation. More... | |
std::string | name |
The name of this type of scaler. More... | |
bool | updateEnabled |
Boolean indicating whether the scaler has to update each sample. More... | |
A class that implements preprocessing based on a fixed range of outputs to a fixed range of outputs.
Definition at line 39 of file FixedRangeScaler.h.
iCub::learningmachine::FixedRangeScaler::FixedRangeScaler | ( | double | li = -1. , |
double | ui = 1. , |
||
double | lo = -1. , |
||
double | uo = 1. |
||
) |
Constructor.
li | the initial lower input bound |
ui | the initial upper input bound |
lo | the initial lower output bound |
uo | the initial upper output bound |
Definition at line 32 of file FixedRangeScaler.cpp.
|
inlinevirtual |
Asks the scaler to return a new object of its type.
Implements iCub::learningmachine::IScaler.
Definition at line 101 of file FixedRangeScaler.h.
|
virtual |
Reimplemented from iCub::learningmachine::IScaler.
Definition at line 70 of file FixedRangeScaler.cpp.
|
virtual |
Asks the learning machine to return a string containing statistics on its operation so far.
Reimplemented from iCub::learningmachine::IScaler.
Definition at line 44 of file FixedRangeScaler.cpp.
|
inlinevirtual |
Accessor for the expected lower bound.
Definition at line 138 of file FixedRangeScaler.h.
|
inlinevirtual |
Accessor for the desired lower bound.
Definition at line 108 of file FixedRangeScaler.h.
|
inlinevirtual |
Accessor for the expected upper bound.
Definition at line 153 of file FixedRangeScaler.h.
|
inlinevirtual |
Accessor for the desired upper bound.
Definition at line 123 of file FixedRangeScaler.h.
|
protectedvirtual |
Unserializes a scaler from a bottle.
bot | the bottle |
Reimplemented from iCub::learningmachine::IScaler.
Definition at line 61 of file FixedRangeScaler.cpp.
|
inlinevirtual |
Mutator for the expected lower bound.
l | the new lower bound |
Definition at line 145 of file FixedRangeScaler.h.
|
inlinevirtual |
Mutator for the desired lower bound.
l | the new lower bound |
Definition at line 115 of file FixedRangeScaler.h.
|
inlinevirtual |
Mutator for the expected upper bound.
u | the new upper bound |
Definition at line 160 of file FixedRangeScaler.h.
|
inlinevirtual |
Mutator for the desired upper bound.
u | the new upper bound |
Definition at line 130 of file FixedRangeScaler.h.
|
protected |
Updates the scale and offset according to the specified expected and desired ranges.
Definition at line 38 of file FixedRangeScaler.cpp.
|
protectedvirtual |
Writes a serialization of the scaler into a bottle.
bot | the bottle |
Reimplemented from iCub::learningmachine::IScaler.
Definition at line 54 of file FixedRangeScaler.cpp.
|
protected |
The expected lower bound in the sample values.
Definition at line 44 of file FixedRangeScaler.h.
|
protected |
The desired lower bound for the output range.
Definition at line 54 of file FixedRangeScaler.h.
|
protected |
The expected upper bound in the sample values.
Definition at line 49 of file FixedRangeScaler.h.
|
protected |
The desired upper bound for the output range.
Definition at line 59 of file FixedRangeScaler.h.