20#ifndef LM_DUMMYLEARNER__ 
   21#define LM_DUMMYLEARNER__ 
   30namespace learningmachine {
 
   59    std::vector<yarp::sig::Vector> inputs;
 
   64    std::vector<yarp::sig::Vector> outputs;
 
   71    DummyLearner(
unsigned int dom = 1, 
unsigned int cod = 1) : sampleCount(0), trainCount(0) {
 
 
   87    virtual void feedSample(
const yarp::sig::Vector& input, 
const yarp::sig::Vector& output);
 
  119    virtual void writeBottle(yarp::os::Bottle& bot) 
const;
 
  124    virtual void readBottle(yarp::os::Bottle& bot);
 
 
This dummy machine learner demonstrates how the IMachineLearner interface can be used in practice.
 
virtual void writeBottle(yarp::os::Bottle &bot) const
Writes a serialization of the machine into a bottle.
 
virtual ~DummyLearner()
Destructor (empty).
 
virtual void train()
Train the learning machine on the examples that have been supplied so far.
 
void reset()
Forget everything and start over.
 
std::string getInfo()
Asks the learning machine to return a string containing information on its operation so far.
 
virtual void feedSample(const yarp::sig::Vector &input, const yarp::sig::Vector &output)
Provide the learning machine with an example of the desired mapping.
 
DummyLearner * clone()
Asks the learning machine to return a clone of its type.
 
DummyLearner(unsigned int dom=1, unsigned int cod=1)
Constructor.
 
Prediction predict(const yarp::sig::Vector &input)
Ask the learning machine to predict the output for a given input.
 
virtual void readBottle(yarp::os::Bottle &bot)
Unserializes a machine from a bottle.
 
An generalized interface for a learning machine with a fixed domain and codomain size.
 
virtual void setCoDomainSize(unsigned int size)
Mutator for the codomain size.
 
virtual void setDomainSize(unsigned int size)
Mutator for the domain size.
 
void setName(const std::string &name)
Set the name of this machine learning technique.
 
A class that represents a prediction result.
 
std::string printVector(const yarp::sig::Vector &v)
 
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.