22 #include <yarp/os/Value.h>
30 namespace learningmachine {
33 : lowest(DBL_MAX), highest(-DBL_MAX), lowerBound(l), upperBound(u) {
54 std::ostringstream buffer;
57 buffer <<
"Sample Extrema: [" << this->
lowest <<
"," << this->
highest <<
"]";
79 if(config.find(
"lower").isFloat64() || config.find(
"lower").isInt32()) {
84 if(config.find(
"upper").isFloat64() || config.find(
"upper").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)
double highest
The actual highest value found in the sample values.
Normalizer(double l=-1, double u=1)
Constructor.
virtual double getUpperBound()
Accessor for the desired upper bound.
double lowest
The actual lowest value found in the sample values.
double lowerBound
The desired lower bound for the normalization range.
virtual void setLowerBound(double l)
Mutator for the desired lower bound.
virtual void setUpperBound(double u)
Mutator for the desired upper bound.
double upperBound
The desired upper bound for the normalization range.
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 std::string getInfo()
Asks the learning machine to return a string containing statistics on its operation so far.
virtual double getLowerBound()
Accessor for the desired lower bound.
virtual void readBottle(yarp::os::Bottle &bot)
Unserializes a scaler from a bottle.
virtual void writeBottle(yarp::os::Bottle &bot)
Writes a serialization of the scaler into a bottle.
virtual bool configure(yarp::os::Searchable &config)
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.