biasedcluster.cpp
44 QString vectorSizeErrorTmpl( "The number of elements of the %1 vector in configuration file (%1) is different from the number of neurons (%2)");
100 Descriptor d = addTypeDescription( type, "A Cluster where neurons have also a bias value", "The bias values are subtracted from the input values before the calculation of the output" );
101 d.describeReal( "biases" ).props( IsList ).help( "The vector of bias values. It must contains numNeurons elements" );
static QVector< double > getVector(ConfigurationParameters ¶ms, QString paramPath, QString def=QString())
FARSA_UTIL_API RandomGenerator * globalRNG
virtual void apply(DoubleVector &inputs, DoubleVector &outputs)=0
Calculate the outputs of neurons by the net inputs given.
void setBiases(const DoubleVector &biases)
Set the biases from the vector given.
Definition: biasedcluster.cpp:72
Library of Common OutputFunction.
FARSA_UTIL_TEMPLATE const T max(const T &t1, const U &t2)
void setBias(unsigned int neuron, double bias)
Set the bias of the neuron.
Definition: biasedcluster.cpp:64
static void describe(QString type)
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
Definition: biasedcluster.cpp:98
virtual void save(ConfigurationParameters ¶ms, QString prefix)
Save the actual status of parameters into the ConfigurationParameters object passed.
Definition: cluster.cpp:129
bool startObjectParameters(QString groupPath, QString typeName, ParameterSettable *object)
static void describe(QString type)
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
Definition: cluster.cpp:151
static Descriptor addTypeDescription(QString type, QString shortHelp, QString longHelp=QString(""))
virtual void save(ConfigurationParameters ¶ms, QString prefix)
Save the actual status of parameters into the ConfigurationParameters object passed.
Definition: biasedcluster.cpp:86
BiasedCluster(unsigned int numNeurons, QString name="unnamed")
Construct a Cluster that contains numNeurons neurons.
Definition: biasedcluster.cpp:29
void randomize(double min, double max)
Randomize the biases of BiasedCluster.
Definition: biasedcluster.cpp:80
FARSA_UTIL_TEMPLATE const T min(const T &t1, const U &t2)
double getDouble(double min, double max)
unsigned int numNeurons() const
Return the number of neurons (the length of input and output arrays)
Definition: cluster.h:82
void setNeedReset(bool b)
Set the state of 'needReset' Used by subclasses into update implementation.
Definition: cluster.h:210
void createParameter(QString groupPath, QString parameter)
This file contains the declaration of BiasedCluster class.