iCub-main
|
A TrainEvent is raised when the machine handles a training sample. More...
#include <TrainEvent.h>
Public Member Functions | |
TrainEvent (const yarp::sig::Vector &input, const yarp::sig::Vector &desired, const Prediction &predicted) | |
Constructor. | |
virtual | ~TrainEvent () |
Destructor (empty). | |
virtual void | visit (IEventListener &listener) |
Causes the Event to visit an EventListener. | |
std::string | toString () |
Returns a string representation of the Event. | |
yarp::sig::Vector & | getInput () |
Accessor for the vector of inputs. | |
yarp::sig::Vector & | getDesired () |
Accessor for the vector of desired outputs. | |
Prediction & | getPredicted () |
Accessor for the prediction. | |
Protected Attributes | |
yarp::sig::Vector | input |
Vector of inputs. | |
yarp::sig::Vector | desired |
Vector of desired outputs. | |
Prediction | predicted |
Predicted outputs. | |
A TrainEvent is raised when the machine handles a training sample.
It contains the input, and predicted and actual output vectors.
Definition at line 44 of file TrainEvent.h.
iCub::learningmachine::TrainEvent::TrainEvent | ( | const yarp::sig::Vector & | input, |
const yarp::sig::Vector & | desired, | ||
const Prediction & | predicted | ||
) |
Constructor.
input | the vector of inputs |
desired | the vector of desired outputs |
predicted | the vector of predicted outputs |
Definition at line 26 of file TrainEvent.cpp.
|
inlinevirtual |
Destructor (empty).
Definition at line 74 of file TrainEvent.h.
|
inline |
Accessor for the vector of desired outputs.
Definition at line 98 of file TrainEvent.h.
|
inline |
Accessor for the vector of inputs.
Definition at line 90 of file TrainEvent.h.
|
inline |
Accessor for the prediction.
Definition at line 106 of file TrainEvent.h.
|
virtual |
Returns a string representation of the Event.
Implements iCub::learningmachine::IEvent.
Definition at line 36 of file TrainEvent.cpp.
|
virtual |
Causes the Event to visit an EventListener.
This method is part of the double dispatch mechanism. Child classes need to override this function.
listener | the listener |
Implements iCub::learningmachine::IEvent.
Definition at line 32 of file TrainEvent.cpp.
|
protected |
Vector of desired outputs.
Definition at line 54 of file TrainEvent.h.
|
protected |
Vector of inputs.
Definition at line 49 of file TrainEvent.h.
|
protected |
Predicted outputs.
Definition at line 59 of file TrainEvent.h.