30 namespace learningmachine {
33 : noSamples(0), runningMean(0.), runningStd(0.), squaredErrors(0.) {
48 this->runningMean += (delta / this->
noSamples);
57 std::ostringstream buffer;
84 if(config.find(
"mean").isFloat64() || config.find(
"mean").isInt32()) {
89 if(config.find(
"std").isFloat64() || config.find(
"std").isInt32()) {
virtual std::string getInfo()
Asks the learning machine to return a string containing statistics on its operation so far.
virtual void writeBottle(yarp::os::Bottle &bot)
Writes a serialization of the scaler into a bottle.
void setName(std::string name)
Set the name of this machine learning technique.
double scale
The scale for the linear transformation.
virtual void readBottle(yarp::os::Bottle &bot)
Unserializes a scaler from a bottle.
double offset
The offset for the linear transformation.
virtual bool configure(yarp::os::Searchable &config)
virtual double getDesiredStd()
Accessor for the desired standard deviation.
double runningStd
Running standard deviation based on the samples seen so far.
Standardizer(double m=0., double s=1.)
Constructor.
double mean
Desired mean for the output distribution.
double squaredErrors
Temporary variable that counts the sum of the squared errors.
virtual void readBottle(yarp::os::Bottle &bot)
Unserializes a scaler from a bottle.
virtual std::string getInfo()
Asks the learning machine to return a string containing statistics on its operation so far.
virtual void writeBottle(yarp::os::Bottle &bot)
Writes a serialization of the scaler into a bottle.
virtual void setDesiredStd(double s)
Mutator for the desired standard deviation.
virtual bool configure(yarp::os::Searchable &config)
double std
Desired standard deviation for the output distribution.
int noSamples
The number of samples that have been received so far.
virtual void update(double val)
Feeds a single sample into the scaler, so that it can use this sample to update the offset and scale.
virtual void setDesiredMean(double m)
Mutator for the desired mean.
double runningMean
Running mean based on the samples seen so far.
virtual double getDesiredMean()
Accessor for the desired mean.
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.