iCub-main
|
This 'machine learner' demonstrates how the IMachineLearner interface can be used to easily record samples to a file. More...
#include <DatasetRecorder.h>
Public Member Functions | |
DatasetRecorder () | |
Constructor. More... | |
DatasetRecorder (const DatasetRecorder &other) | |
Copy constructor. More... | |
virtual | ~DatasetRecorder () |
Destructor. More... | |
DatasetRecorder & | operator= (const DatasetRecorder &other) |
Assignment operator. More... | |
virtual void | feedSample (const yarp::sig::Vector &input, const yarp::sig::Vector &output) |
Provide the learning machine with an example of the desired mapping. More... | |
virtual void | train () |
Train the learning machine on the examples that have been supplied so far. More... | |
Prediction | predict (const yarp::sig::Vector &input) |
Ask the learning machine to predict the output for a given input. More... | |
void | reset () |
Forget everything and start over. More... | |
DatasetRecorder * | clone () |
Asks the learning machine to return a clone of its type. More... | |
std::string | getInfo () |
Asks the learning machine to return a string containing information on its operation so far. More... | |
virtual std::string | getConfigHelp () |
Asks the learning machine to return a string containing the list of configuration options that it supports. More... | |
virtual void | writeBottle (yarp::os::Bottle &bot) const |
Writes a serialization of the machine into a bottle. More... | |
virtual void | readBottle (yarp::os::Bottle &bot) |
Unserializes a machine from a bottle. More... | |
virtual bool | configure (yarp::os::Searchable &config) |
Change parameters. More... | |
Public Member Functions inherited from iCub::learningmachine::IMachineLearner | |
IMachineLearner () | |
Constructor. More... | |
virtual | ~IMachineLearner () |
Destructor (empty). More... | |
virtual bool | open (yarp::os::Searchable &config) |
Initialize the object. More... | |
virtual bool | close () |
Shut the object down. More... | |
bool | write (yarp::os::ConnectionWriter &connection) const |
bool | read (yarp::os::ConnectionReader &connection) |
virtual std::string | toString () |
Asks the learning machine to return a string serialization. More... | |
virtual bool | fromString (const std::string &str) |
Asks the learning machine to initialize from a string serialization. More... | |
std::string | getName () const |
Retrieve the name of this machine learning technique. More... | |
void | setName (const std::string &name) |
Set the name of this machine learning technique. More... | |
Additional Inherited Members | |
Protected Attributes inherited from iCub::learningmachine::IMachineLearner | |
std::string | name |
The name of this type of machine learner. More... | |
This 'machine learner' demonstrates how the IMachineLearner interface can be used to easily record samples to a file.
Definition at line 41 of file DatasetRecorder.h.
|
inline |
Constructor.
Definition at line 67 of file DatasetRecorder.h.
|
inline |
Copy constructor.
Definition at line 74 of file DatasetRecorder.h.
|
inlinevirtual |
Destructor.
Definition at line 82 of file DatasetRecorder.h.
|
inlinevirtual |
Asks the learning machine to return a clone of its type.
Implements iCub::learningmachine::IMachineLearner.
Definition at line 121 of file DatasetRecorder.h.
|
virtual |
Change parameters.
Reimplemented from iCub::learningmachine::IMachineLearner.
Definition at line 95 of file DatasetRecorder.cpp.
|
virtual |
Provide the learning machine with an example of the desired mapping.
input | a sample input |
output | the corresponding output |
Implements iCub::learningmachine::IMachineLearner.
Definition at line 39 of file DatasetRecorder.cpp.
|
virtual |
Asks the learning machine to return a string containing the list of configuration options that it supports.
Reimplemented from iCub::learningmachine::IMachineLearner.
Definition at line 87 of file DatasetRecorder.cpp.
|
virtual |
Asks the learning machine to return a string containing information on its operation so far.
Reimplemented from iCub::learningmachine::IMachineLearner.
Definition at line 68 of file DatasetRecorder.cpp.
DatasetRecorder & iCub::learningmachine::DatasetRecorder::operator= | ( | const DatasetRecorder & | other | ) |
Assignment operator.
Definition at line 27 of file DatasetRecorder.cpp.
|
inlinevirtual |
Ask the learning machine to predict the output for a given input.
input | the input |
Implements iCub::learningmachine::IMachineLearner.
Definition at line 106 of file DatasetRecorder.h.
|
virtual |
Unserializes a machine 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 |
Implements iCub::learningmachine::IMachineLearner.
Definition at line 82 of file DatasetRecorder.cpp.
|
inlinevirtual |
Forget everything and start over.
Implements iCub::learningmachine::IMachineLearner.
Definition at line 113 of file DatasetRecorder.h.
|
inlinevirtual |
Train the learning machine on the examples that have been supplied so far.
This method is primarily intended to be used for offline/batch learning machines. It explicitly initiates the training routine on those machines for the samples that have been collected so far.
Reimplemented from iCub::learningmachine::IMachineLearner.
Definition at line 101 of file DatasetRecorder.h.
|
virtual |
Writes a serialization of the machine 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 machine serialization |
Implements iCub::learningmachine::IMachineLearner.
Definition at line 77 of file DatasetRecorder.cpp.