SpikeStream Library
0.2
|
#include <WeightlessNeuron.h>
Public Member Functions | |
WeightlessNeuron (QHash< unsigned int, QList< unsigned int > > &connectionMap, unsigned int id) | |
~WeightlessNeuron () | |
void | addTraining (QByteArray &newData, unsigned int output) |
QHash< unsigned int, QList < unsigned int > > & | getConnectionMap () |
unsigned int | getID () |
int | getNumberOfConnections () |
double | getFiringStateProbability (unsigned char inPatArr[], int inPatArrLen, int firingState) |
unsigned int | getHammingThreshold () |
QList< unsigned char * > | getTrainingData () |
int | getTrainingDataLength () |
double | getTransitionProbability (const QList< unsigned int > &neurIDList, const QString &x0Pattern, int firingState) |
void | resetTraining () |
void | setGeneralization (double generalization) |
A weightless neuron
Definition at line 10 of file WeightlessNeuron.h.
WeightlessNeuron::WeightlessNeuron | ( | QHash< unsigned int, QList< unsigned int > > & | connectionMap, |
unsigned int | id | ||
) |
Constructor
Definition at line 42 of file WeightlessNeuron.cpp.
Destructor
Definition at line 65 of file WeightlessNeuron.cpp.
void WeightlessNeuron::addTraining | ( | QByteArray & | newData, |
unsigned int | output | ||
) |
Adds the array of bytes to the training data set
Definition at line 76 of file WeightlessNeuron.cpp.
QHash<unsigned int, QList<unsigned int> >& spikestream::WeightlessNeuron::getConnectionMap | ( | ) | [inline] |
Definition at line 15 of file WeightlessNeuron.h.
double WeightlessNeuron::getFiringStateProbability | ( | unsigned char | inPatArr[], |
int | inPatArrLen, | ||
int | firingState | ||
) |
Compares the supplied pattern with the stored patterns and returns the probability of the specified output. If there is a single match, then the probability of the output is either 1 or 0 depending on whether the stored output matches the specified output. If there is more than one match within the Hamming distance, then a random series of 1's and 0's is output, so the probability of 1 and 0 are both 0.5
Definition at line 95 of file WeightlessNeuron.cpp.
unsigned int spikestream::WeightlessNeuron::getHammingThreshold | ( | ) | [inline] |
Definition at line 19 of file WeightlessNeuron.h.
unsigned int spikestream::WeightlessNeuron::getID | ( | ) | [inline] |
Definition at line 16 of file WeightlessNeuron.h.
int spikestream::WeightlessNeuron::getNumberOfConnections | ( | ) | [inline] |
Definition at line 17 of file WeightlessNeuron.h.
QList<unsigned char*> spikestream::WeightlessNeuron::getTrainingData | ( | ) | [inline] |
Definition at line 20 of file WeightlessNeuron.h.
int spikestream::WeightlessNeuron::getTrainingDataLength | ( | ) | [inline] |
Definition at line 21 of file WeightlessNeuron.h.
double WeightlessNeuron::getTransitionProbability | ( | const QList< unsigned int > & | neurIDList, |
const QString & | s0Pattern, | ||
int | firingState | ||
) |
Returns the probability that the initial pattern led the neuron to be in the specified firing state
Definition at line 168 of file WeightlessNeuron.cpp.
void WeightlessNeuron::resetTraining | ( | ) |
Clears the training of the neuron
Definition at line 234 of file WeightlessNeuron.cpp.
void WeightlessNeuron::setGeneralization | ( | double | generalization | ) |
Sets the generalization of the neuron
Definition at line 242 of file WeightlessNeuron.cpp.