22 #include "randomgenerator.h"
23 #include "configurationhelper.h"
28 :
Cluster( numNeurons, name), biasesdata(numNeurons, true), tempdata(numNeurons) {
30 setDelegateFor<BiasedCluster, &BiasedCluster::biases>(
"biases" );
35 :
Cluster( params, prefix ), biasesdata(numNeurons(), true), tempdata(numNeurons()) {
37 setDelegateFor<BiasedCluster, &BiasedCluster::biases>(
"biases" );
39 QString vectorSizeErrorTmpl(
"The number of elements of the %1 vector in configuration file (%1) is different from the number of neurons (%2)");
43 if ( !vect.isEmpty() && vect.size() != (int)
numNeurons() ) {
44 qWarning() << vectorSizeErrorTmpl.arg(
"biases" ).arg( vect.size() ).arg(
numNeurons() );
61 biasesdata[neuron] = bias;
73 return biasesdata[neuron];
77 for (
unsigned int i = 0; i <
numNeurons(); i++ ) {
78 biasesdata[i] =
globalRNG->getDouble( min, max );
88 for (
unsigned int i = 0; i < biasesdata.
size(); i++) {
89 list.push_back(QString::number(biasesdata[i]));
96 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" );