iCub-main
|
A class that provides a preprocessing interface, which can be used to preprocess the data samples that have been received by the MachineLearner. More...
#include <ITransformer.h>
Public Member Functions | |
ITransformer () | |
Constructor. More... | |
virtual | ~ITransformer () |
Destructor (empty). More... | |
virtual yarp::sig::Vector | transform (const yarp::sig::Vector &input) |
Transforms an input vector. More... | |
virtual std::string | getInfo () |
Asks the transformer to return a string containing statistics on its operation so far. More... | |
virtual void | reset () |
Forget everything and start over. More... | |
std::string | getName () const |
Retrieve the name of this transformer. More... | |
void | setName (std::string name) |
Set the name of this transformer. More... | |
virtual std::string | getConfigHelp () |
Asks the transformer to return a string containing the list of configuration options that it supports. More... | |
virtual ITransformer * | clone ()=0 |
Asks the transformer to return a new object of its type. More... | |
virtual bool | configure (yarp::os::Searchable &config) |
bool | write (yarp::os::ConnectionWriter &connection) const |
bool | read (yarp::os::ConnectionReader &connection) |
virtual std::string | toString () |
Asks the transformer to return a string serialization. More... | |
virtual bool | fromString (const std::string &str) |
Asks the transformer to initialize from a string serialization. More... | |
Protected Member Functions | |
virtual void | writeBottle (yarp::os::Bottle &bot) const =0 |
Writes a serialization of the transformer into a bottle. More... | |
virtual void | readBottle (yarp::os::Bottle &bot)=0 |
Unserializes a transformer from a bottle. More... | |
Protected Attributes | |
std::string | name |
The name of this type of transformer. More... | |
int | sampleCount |
Number of samples transformed since initialization. More... | |
A class that provides a preprocessing interface, which can be used to preprocess the data samples that have been received by the MachineLearner.
Definition at line 57 of file ITransformer.h.
|
inline |
Constructor.
Definition at line 91 of file ITransformer.h.
|
inlinevirtual |
Destructor (empty).
Definition at line 96 of file ITransformer.h.
|
pure virtual |
Asks the transformer to return a new object of its type.
Implemented in iCub::learningmachine::SparseSpectrumFeature, iCub::learningmachine::ScaleTransformer, and iCub::learningmachine::RandomFeature.
|
inlinevirtual |
Reimplemented in iCub::learningmachine::SparseSpectrumFeature, iCub::learningmachine::ScaleTransformer, iCub::learningmachine::RandomFeature, and iCub::learningmachine::IFixedSizeTransformer.
Definition at line 168 of file ITransformer.h.
|
inlinevirtual |
Asks the transformer to initialize from a string serialization.
Definition at line 205 of file ITransformer.h.
|
inlinevirtual |
Asks the transformer to return a string containing the list of configuration options that it supports.
Reimplemented in iCub::learningmachine::SparseSpectrumFeature, iCub::learningmachine::ScaleTransformer, iCub::learningmachine::RandomFeature, and iCub::learningmachine::IFixedSizeTransformer.
Definition at line 153 of file ITransformer.h.
|
inlinevirtual |
Asks the transformer to return a string containing statistics on its operation so far.
Reimplemented in iCub::learningmachine::SparseSpectrumFeature, iCub::learningmachine::ScaleTransformer, iCub::learningmachine::RandomFeature, and iCub::learningmachine::IFixedSizeTransformer.
Definition at line 115 of file ITransformer.h.
|
inline |
Retrieve the name of this transformer.
Definition at line 134 of file ITransformer.h.
|
inline |
Definition at line 182 of file ITransformer.h.
|
protectedpure virtual |
Unserializes a transformer from a bottle.
This method is internally referenced by the read method. Typically, subclasses should override this method instead of overriding the read method directly.
bot | the bottle |
Implemented in iCub::learningmachine::SparseSpectrumFeature, iCub::learningmachine::ScaleTransformer, iCub::learningmachine::RandomFeature, and iCub::learningmachine::IFixedSizeTransformer.
|
inlinevirtual |
Forget everything and start over.
Reimplemented in iCub::learningmachine::SparseSpectrumFeature, iCub::learningmachine::ScaleTransformer, and iCub::learningmachine::RandomFeature.
Definition at line 125 of file ITransformer.h.
|
inline |
Set the name of this transformer.
name | the new name |
Definition at line 143 of file ITransformer.h.
|
inlinevirtual |
Asks the transformer to return a string serialization.
Definition at line 194 of file ITransformer.h.
|
inlinevirtual |
Transforms an input vector.
input | the input vector |
Reimplemented in iCub::learningmachine::SparseSpectrumFeature, iCub::learningmachine::ScaleTransformer, iCub::learningmachine::RandomFeature, and iCub::learningmachine::IFixedSizeTransformer.
Definition at line 104 of file ITransformer.h.
|
inline |
Definition at line 173 of file ITransformer.h.
|
protectedpure virtual |
Writes a serialization of the transformer into a bottle.
This method is internally referenced by the write method. Typically, subclasses should override this method instead of overriding the write method directly.
bot | the bottle containing the transformer serialization |
Implemented in iCub::learningmachine::RandomFeature, and iCub::learningmachine::IFixedSizeTransformer.
|
protected |
The name of this type of transformer.
Definition at line 62 of file ITransformer.h.
|
protected |
Number of samples transformed since initialization.
Definition at line 67 of file ITransformer.h.