BiasedCluster Class Reference
In a BiasedCluster each neuron has an input, an output and a bias value. More...

Public Member Functions | |
BiasedCluster (unsigned int numNeurons, QString name="unnamed") | |
Construct a Cluster that contains numNeurons neurons. | |
BiasedCluster (ConfigurationParameters ¶ms, QString prefix) | |
Constructor. | |
virtual | ~BiasedCluster () |
Destructor. | |
DoubleVector & | biases () |
Get the array of biases, this returns the actual array not a copy. | |
const DoubleVector & | biases () const |
Get the array of biases, this returns the actual array not a copy. | |
double | getBias (unsigned int neuron) |
Get bias of the neuron. | |
void | randomize (double min, double max) |
Randomize the biases of BiasedCluster. | |
virtual void | save (ConfigurationParameters ¶ms, QString prefix) |
Save the actual status of parameters into the ConfigurationParameters object passed. | |
void | setAllBiases (double bias) |
Set all biases with the same value. | |
void | setBias (unsigned int neuron, double bias) |
Set the bias of the neuron. | |
void | setBiases (const DoubleVector &biases) |
Set the biases from the vector given. | |
void | update () |
Update the outputs of neurons. | |
Static Public Member Functions | |
static void | describe (QString type) |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups. |
Detailed Description
In a BiasedCluster each neuron has an input, an output and a bias value.
- Motivation
- Description
- All neurons in the Cluster have the same transfer function which is given to the constructor by the outfunction property (see API doc).
- Warnings
Definition at line 44 of file biasedcluster.h.
Constructor & Destructor Documentation
BiasedCluster | ( | unsigned int | numNeurons, |
QString | name = "unnamed" |
||
) |
Construct a Cluster that contains numNeurons neurons.
Definition at line 27 of file biasedcluster.cpp.
References DoubleVector::zeroing().
BiasedCluster | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) |
Constructor.
Definition at line 34 of file biasedcluster.cpp.
References DoubleVector::copyValues(), ConfigurationHelper::getVector(), and Cluster::numNeurons().
~BiasedCluster | ( | ) | [virtual] |
Destructor.
Definition at line 50 of file biasedcluster.cpp.
Member Function Documentation
DoubleVector& biases | ( | ) | [inline] |
Get the array of biases, this returns the actual array not a copy.
This allows you to change the biases using the pointer returned!
Definition at line 65 of file biasedcluster.h.
Referenced by BiasedCluster::update().
const DoubleVector& biases | ( | ) | const [inline] |
Get the array of biases, this returns the actual array not a copy.
This allows you to change the biases using the pointer returned!
Definition at line 71 of file biasedcluster.h.
void describe | ( | QString | type | ) | [static] |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
Reimplemented from Cluster.
Definition at line 94 of file biasedcluster.cpp.
References ParameterSettable::addTypeDescription(), ParameterSettable::Descriptor::describeReal(), ParameterSettable::RealDescriptor::help(), ParameterSettable::IsList, and ParameterSettable::RealDescriptor::props().
double getBias | ( | unsigned int | neuron | ) |
Get bias of the neuron.
Definition at line 72 of file biasedcluster.cpp.
void randomize | ( | double | min, |
double | max | ||
) | [virtual] |
Randomize the biases of BiasedCluster.
Implements Cluster.
Definition at line 76 of file biasedcluster.cpp.
References RandomGenerator::getDouble(), globalRNG, and Cluster::numNeurons().
void save | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) | [virtual] |
Save the actual status of parameters into the ConfigurationParameters object passed.
- Parameters:
-
params the configuration parameters object on which save actual parameters prefix the prefix to use to access the object configuration parameters.
Reimplemented from Cluster.
Definition at line 82 of file biasedcluster.cpp.
References ConfigurationParameters::createParameter(), DoubleVector::size(), and ConfigurationParameters::startObjectParameters().
void setAllBiases | ( | double | bias | ) |
Set all biases with the same value.
Definition at line 64 of file biasedcluster.cpp.
References DoubleVector::setAll().
void setBias | ( | unsigned int | neuron, |
double | bias | ||
) |
Set the bias of the neuron.
Definition at line 60 of file biasedcluster.cpp.
void setBiases | ( | const DoubleVector & | biases | ) |
Set the biases from the vector given.
Definition at line 68 of file biasedcluster.cpp.
References DoubleVector::copyValues().
void update | ( | ) | [virtual] |
Update the outputs of neurons.
Implements Updatable.
Definition at line 53 of file biasedcluster.cpp.
References OutputFunction::apply(), BiasedCluster::biases(), Cluster::inputs(), Cluster::outFunction(), Cluster::outputs(), Cluster::setNeedReset(), and farsa::subtract().
The documentation for this class was generated from the following files:
- nnfw/include/biasedcluster.h
- nnfw/src/biasedcluster.cpp