22#include <yarp/os/Value.h>
30namespace learningmachine {
33 : lowerBoundIn(li), upperBoundIn(ui), lowerBoundOut(lo), upperBoundOut(uo) {
45 std::ostringstream buffer;
74 if(config.find(
"lowerin").isFloat64() || config.find(
"lowerin").isInt32()) {
79 if(config.find(
"upperin").isFloat64() || config.find(
"upperin").isInt32()) {
85 if(config.find(
"lowerout").isFloat64() || config.find(
"lowerout").isInt32()) {
90 if(config.find(
"upperout").isFloat64() || config.find(
"upperout").isInt32()) {
95 if(!config.findGroup(
"in").isNull()) {
96 yarp::os::Bottle& bot = config.findGroup(
"in");
97 if(bot.size() == 3 && (bot.get(1).isInt32() || bot.get(1).isFloat64()) &&
98 (bot.get(2).isInt32() || bot.get(2).isFloat64())) {
106 if(!config.findGroup(
"out").isNull()) {
107 yarp::os::Bottle& bot = config.findGroup(
"out");
108 if(bot.size() == 3 && (bot.get(1).isInt32() || bot.get(1).isFloat64()) &&
109 (bot.get(2).isInt32() || bot.get(2).isFloat64())) {
virtual double getLowerBoundOut()
Accessor for the desired lower bound.
virtual double getLowerBoundIn()
Accessor for the expected lower bound.
double upperBoundIn
The expected upper bound in the sample values.
double upperBoundOut
The desired upper bound for the output range.
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 readBottle(yarp::os::Bottle &bot)
Unserializes a scaler from a bottle.
FixedRangeScaler(double li=-1., double ui=1., double lo=-1., double uo=1.)
Constructor.
virtual void setUpperBoundOut(double uo)
Mutator for the desired upper bound.
virtual double getUpperBoundIn()
Accessor for the expected upper bound.
virtual void setUpperBoundIn(double ui)
Mutator for the expected upper bound.
virtual void setLowerBoundOut(double lo)
Mutator for the desired lower bound.
double lowerBoundIn
The expected lower bound in the sample values.
double lowerBoundOut
The desired lower bound for the output range.
virtual double getUpperBoundOut()
Accessor for the desired upper bound.
void updateScales()
Updates the scale and offset according to the specified expected and desired ranges.
virtual void setLowerBoundIn(double li)
Mutator for the expected lower bound.
virtual bool configure(yarp::os::Searchable &config)
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)
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.