iCub-main
|
A class that implements linear scaling as a preprocessing step. More...
#include <LinearScaler.h>
Public Member Functions | |
LinearScaler (double s=1, double o=0) | |
Constructor. | |
virtual std::string | getInfo () |
Asks the learning machine to return a string containing statistics on its operation so far. | |
virtual bool | configure (yarp::os::Searchable &config) |
LinearScaler * | clone () |
Asks the scaler to return a new object of its type. | |
virtual double | getScale () |
Accessor for the scaling factor. | |
virtual void | setScale (double s) |
Mutator for the scaling factor. | |
virtual double | getOffset () |
Accessor for the offset. | |
virtual void | setOffset (double o) |
Mutator for the offset. | |
Public Member Functions inherited from iCub::learningmachine::IScaler | |
IScaler (double s=1., double o=0.) | |
Constructor. | |
virtual | ~IScaler () |
Destructor (empty). | |
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. | |
virtual double | transform (double val) |
Transforms a single sample value according to the state of the scaler. | |
virtual double | unTransform (double val) |
Untransforms a single sample value according to the state of the scaler. | |
std::string | getName () const |
Retrieve the name of this scaler. | |
void | setName (std::string name) |
Set the name of this machine learning technique. | |
virtual void | setUpdateEnabled (bool u) |
Mutator for the update state. | |
virtual bool | getUpdateEnabled () |
Accessor for the update state. | |
virtual std::string | toString () |
Asks the scaler to return a string serialization. | |
virtual bool | fromString (const std::string &str) |
Asks the scaler to initialize from a string serialization. | |
Protected Member Functions | |
virtual void | writeBottle (yarp::os::Bottle &bot) |
Writes a serialization of the scaler into a bottle. | |
virtual void | readBottle (yarp::os::Bottle &bot) |
Unserializes a scaler from a bottle. | |
Additional Inherited Members | |
Protected Attributes inherited from iCub::learningmachine::IScaler | |
double | offset |
The offset for the linear transformation. | |
double | scale |
The scale for the linear transformation. | |
std::string | name |
The name of this type of scaler. | |
bool | updateEnabled |
Boolean indicating whether the scaler has to update each sample. | |
A class that implements linear scaling as a preprocessing step.
Definition at line 38 of file LinearScaler.h.
iCub::learningmachine::LinearScaler::LinearScaler | ( | double | s = 1 , |
double | o = 0 |
||
) |
Constructor.
s | the scale for the linear transformation |
o | the offset for the linear transformation |
Definition at line 29 of file LinearScaler.cpp.
|
inlinevirtual |
Asks the scaler to return a new object of its type.
Implements iCub::learningmachine::IScaler.
Definition at line 72 of file LinearScaler.h.
|
virtual |
Reimplemented from iCub::learningmachine::IScaler.
Definition at line 50 of file LinearScaler.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 34 of file LinearScaler.cpp.
|
inlinevirtual |
Accessor for the offset.
Definition at line 91 of file LinearScaler.h.
|
inlinevirtual |
Accessor for the scaling factor.
Definition at line 79 of file LinearScaler.h.
|
protectedvirtual |
Unserializes a scaler from a bottle.
bot | the bottle |
Reimplemented from iCub::learningmachine::IScaler.
Definition at line 45 of file LinearScaler.cpp.
|
inlinevirtual |
|
inlinevirtual |
Mutator for the scaling factor.
s | the new scaling factor |
Definition at line 86 of file LinearScaler.h.
|
protectedvirtual |
Writes a serialization of the scaler into a bottle.
bot | the bottle |
Reimplemented from iCub::learningmachine::IScaler.
Definition at line 40 of file LinearScaler.cpp.