The IScaler is a linear scaler based scaler.
More...
#include <IScaler.h>
|
| 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.
|
|
virtual std::string | getInfo () |
| Asks the learning machine to return a string containing statistics on its operation so far.
|
|
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 IScaler * | clone ()=0 |
| Asks the scaler to return a new object of its type.
|
|
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.
|
|
virtual bool | configure (yarp::os::Searchable &config) |
|
|
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.
|
|
|
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.
|
|
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