The IScaler is a linear scaler based scaler.
More...
#include <IScaler.h>
|
| 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...
|
|
virtual std::string | getInfo () |
| Asks the learning machine to return a string containing statistics on its operation so far. 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 IScaler * | clone ()=0 |
| Asks the scaler to return a new object of its type. 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...
|
|
virtual bool | configure (yarp::os::Searchable &config) |
|
|
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...
|
|
The IScaler is a linear scaler based scaler.
It is used in particularly as part of the ScaleTransformer.
- See also
- iCub::learningmachine:ScaleTransformer
- Author
- Arjan Gijsberts
Definition at line 41 of file IScaler.h.
◆ IScaler()
iCub::learningmachine::IScaler::IScaler |
( |
double |
s = 1. , |
|
|
double |
o = 0. |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
s | the scale for the linear transformation |
o | the offset for the linear transformation |
Definition at line 84 of file IScaler.h.
◆ ~IScaler()
virtual iCub::learningmachine::IScaler::~IScaler |
( |
| ) |
|
|
inlinevirtual |
Destructor (empty).
Definition at line 90 of file IScaler.h.
◆ clone()
virtual IScaler* iCub::learningmachine::IScaler::clone |
( |
| ) |
|
|
pure virtual |
◆ configure()
bool iCub::learningmachine::IScaler::configure |
( |
yarp::os::Searchable & |
config | ) |
|
|
virtual |
◆ fromString()
bool iCub::learningmachine::IScaler::fromString |
( |
const std::string & |
str | ) |
|
|
virtual |
Asks the scaler to initialize from a string serialization.
- Returns
- true on succes
Definition at line 55 of file IScaler.cpp.
◆ getInfo()
std::string iCub::learningmachine::IScaler::getInfo |
( |
| ) |
|
|
virtual |
◆ getName()
std::string iCub::learningmachine::IScaler::getName |
( |
| ) |
const |
|
inline |
Retrieve the name of this scaler.
- Returns
- the name of this scaler
Definition at line 133 of file IScaler.h.
◆ getUpdateEnabled()
virtual bool iCub::learningmachine::IScaler::getUpdateEnabled |
( |
| ) |
|
|
inlinevirtual |
Accessor for the update state.
- Returns
- the current update state
Definition at line 154 of file IScaler.h.
◆ readBottle()
void iCub::learningmachine::IScaler::readBottle |
( |
yarp::os::Bottle & |
bot | ) |
|
|
protectedvirtual |
◆ setName()
void iCub::learningmachine::IScaler::setName |
( |
std::string |
name | ) |
|
|
inline |
Set the name of this machine learning technique.
- Parameters
-
Definition at line 140 of file IScaler.h.
◆ setUpdateEnabled()
virtual void iCub::learningmachine::IScaler::setUpdateEnabled |
( |
bool |
u | ) |
|
|
inlinevirtual |
Mutator for the update state.
- Parameters
-
u | the desired boolean state |
Definition at line 147 of file IScaler.h.
◆ toString()
std::string iCub::learningmachine::IScaler::toString |
( |
| ) |
|
|
virtual |
Asks the scaler to return a string serialization.
- Returns
- a string serialization of the scaler
Definition at line 49 of file IScaler.cpp.
◆ transform()
double iCub::learningmachine::IScaler::transform |
( |
double |
val | ) |
|
|
virtual |
Transforms a single sample value according to the state of the scaler.
This state is usually made up out of a desired offset and scale.
- Parameters
-
- Returns
- the resulting, transformed sample
Reimplemented in iCub::learningmachine::NullScaler.
Definition at line 30 of file IScaler.cpp.
◆ unTransform()
virtual double iCub::learningmachine::IScaler::unTransform |
( |
double |
val | ) |
|
|
inlinevirtual |
Untransforms a single sample value according to the state of the scaler.
This operation is the inverse of the transform operation.
- Parameters
-
- Returns
- the resulting, transformed sample
Reimplemented in iCub::learningmachine::NullScaler.
Definition at line 116 of file IScaler.h.
◆ update()
virtual void iCub::learningmachine::IScaler::update |
( |
double |
val | ) |
|
|
inlinevirtual |
◆ writeBottle()
void iCub::learningmachine::IScaler::writeBottle |
( |
yarp::os::Bottle & |
bot | ) |
|
|
protectedvirtual |
◆ name
std::string iCub::learningmachine::IScaler::name |
|
protected |
The name of this type of scaler.
Definition at line 56 of file IScaler.h.
◆ offset
double iCub::learningmachine::IScaler::offset |
|
protected |
The offset for the linear transformation.
Definition at line 46 of file IScaler.h.
◆ scale
double iCub::learningmachine::IScaler::scale |
|
protected |
The scale for the linear transformation.
Definition at line 51 of file IScaler.h.
◆ updateEnabled
bool iCub::learningmachine::IScaler::updateEnabled |
|
protected |
Boolean indicating whether the scaler has to update each sample.
Definition at line 61 of file IScaler.h.
The documentation for this class was generated from the following files:
- icub-main/src/libraries/learningMachine/include/iCub/learningMachine/IScaler.h
- icub-main/src/libraries/learningMachine/src/IScaler.cpp