|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--saaps.ann.mlff.Neuron
This class represents a neuron. The neuron contains the weights and a bias.
The class also contains an abstract
method for the transfer function.
Thus, the class must be inherited by a subclass that implements the transfer function.
Example:
double[] w = {-0.1,0.3,-0.5};
double b = 0.4;
Weights weights = new Weights(w,b);
TanhNeron myNeuron = new TanhNeuron(weights)
TanhNeuron
,
LinNeuron
,
Layer
,
Network
Constructor Summary | |
Neuron()
Creates new empty Neuron. |
|
Neuron(Weights w)
Creates a neuron from a Weights object. |
Method Summary | |
Data |
getOutput()
Get the output from the neuron. |
void |
setInput(Data inp)
Set the input data to the neuron. |
abstract Data |
transFun(Data in)
The transfer function. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Neuron()
public Neuron(Weights w)
Weights
object.w
- The weights and biasMethod Detail |
public void setInput(Data inp)
inp
- The input datapublic Data getOutput()
If new input data has been presented to the neuron then the neuron is first run.
public abstract Data transFun(Data in)
in
- The data dat goes into the transfer function
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |