iCub-main
Public Member Functions | List of all members
iCub::learningmachine::TrainModule Class Reference

A module for training. More...

#include <TrainModule.h>

+ Inheritance diagram for iCub::learningmachine::TrainModule:

Public Member Functions

 TrainModule (std::string pp="/lm/train")
 Constructor. More...
 
virtual ~TrainModule ()
 Destructor (empty). More...
 
virtual bool configure (yarp::os::ResourceFinder &opt)
 
virtual bool interruptModule ()
 
virtual bool respond (const yarp::os::Bottle &cmd, yarp::os::Bottle &reply)
 
- Public Member Functions inherited from iCub::learningmachine::PredictModule
 PredictModule (std::string pp="/lm/predict")
 Constructor. More...
 
virtual ~PredictModule ()
 Destructor (empty). More...
 
virtual bool close ()
 Close the module. More...
 
virtual IMachineLearnergetMachine ()
 Retrieve the machine that is wrapped in the portable machine wrapper. More...
 
virtual MachinePortablegetMachinePortable ()
 Retrieve the machine portable. More...
 
- Public Member Functions inherited from iCub::learningmachine::IMachineLearnerModule
 IMachineLearnerModule (std::string pp)
 Constructor. More...
 
virtual ~IMachineLearnerModule ()
 Destructor (empty). More...
 
virtual bool updateModule ()
 Default empty update loop with 1 second delay. More...
 

Additional Inherited Members

- Protected Member Functions inherited from iCub::learningmachine::PredictModule
 PredictModule (const PredictModule &other)
 Copy constructor (private and unimplemented on purpose). More...
 
PredictModuleoperator= (const PredictModule &other)
 Assignment operator (private and unimplemented on purpose). More...
 
- Protected Member Functions inherited from iCub::learningmachine::IMachineLearnerModule
 IMachineLearnerModule (const IMachineLearnerModule &other)
 Copy Constructor (private and unimplemented on purpose). More...
 
IMachineLearnerModuleoperator= (const IMachineLearnerModule &other)
 Assignment operator (private and unimplemented on purpose). More...
 
void registerPort (yarp::os::Contactable &port, std::string name)
 Register a port with a given name. More...
 
virtual void loadCommandFile (std::string fname, yarp::os::Bottle *out=(yarp::os::Bottle *) 0)
 Reads bottles from a file and sends these one by one to the respond method. More...
 
virtual yarp::os::ResourceFinder & getResourceFinder ()
 Returns a reference to the cached ResourceFinder. More...
 
std::string findFile (std::string fname)
 Finds the full path to a specified filename using the ResourceFinder. More...
 
virtual void setResourceFinder (yarp::os::ResourceFinder *rf)
 Mutator for the locally stored ResourceFinder. More...
 
- Protected Attributes inherited from iCub::learningmachine::PredictModule
yarp::os::BufferedPort< yarp::sig::Vector > predict_inout
 Buffered port for the incoming samples and corresponding replies. More...
 
MachinePortable machinePortable
 A concrete wrapper around a learning machine. More...
 
PredictProcessor predictProcessor
 The processor handling prediction requests. More...
 
yarp::os::Port model_in
 Incoming port for the models from the train module. More...
 
- Protected Attributes inherited from iCub::learningmachine::IMachineLearnerModule
yarp::os::Port cmd_in
 An input port for commands. More...
 
std::string portPrefix
 A prefix path for the ports that will be registered. More...
 
DispatcherManager dmanager
 An instance of the DispatchManager to configure event listeners. More...
 
yarp::os::ResourceFinder * rf
 A pointer to the ResourceFinder. More...
 

Detailed Description

A module for training.

The module can contain any iCub::learningmachine::IMachineLearner This module is inspired by the original Learner module by Francesco Orabona and Paul Fitzpatrick.

See also
iCub::learningmachine::IMachineLearner
iCub::learningmachine::IMachineLearnerModule
iCub::learningmachine::PredictModule
iCub::learningmachine::Learner
Author
Arjan Gijsberts, Francesco Orabona, Paul Fitzpatrick

Definition at line 90 of file TrainModule.h.

Constructor & Destructor Documentation

◆ TrainModule()

iCub::learningmachine::TrainModule::TrainModule ( std::string  pp = "/lm/train")
inline

Constructor.

Parameters
ppthe default prefix used for the ports.
supportan instance of the Support class.

Definition at line 144 of file TrainModule.h.

◆ ~TrainModule()

virtual iCub::learningmachine::TrainModule::~TrainModule ( )
inlinevirtual

Destructor (empty).

Definition at line 150 of file TrainModule.h.

Member Function Documentation

◆ configure()

bool iCub::learningmachine::TrainModule::configure ( yarp::os::ResourceFinder &  opt)
virtual

Reimplemented from iCub::learningmachine::PredictModule.

Definition at line 101 of file TrainModule.cpp.

◆ interruptModule()

bool iCub::learningmachine::TrainModule::interruptModule ( )
virtual

Reimplemented from iCub::learningmachine::PredictModule.

Definition at line 95 of file TrainModule.cpp.

◆ respond()

bool iCub::learningmachine::TrainModule::respond ( const yarp::os::Bottle &  cmd,
yarp::os::Bottle &  reply 
)
virtual

Reimplemented from iCub::learningmachine::PredictModule.

Definition at line 174 of file TrainModule.cpp.


The documentation for this class was generated from the following files: