cc.glsn.v15.neuralnet
Class Neuron

java.lang.Object
  extended by cc.glsn.v15.neuralnet.Neuron

public class Neuron
extends Object

Behold the noble neuron. It takes the summation of the product of the input values times their weights and runs that through the activation function (g). Put another way: output = g( sum(W_i * o_i) ) sum() sum over all inputs W_i - weight of input i o_i - value from input i There is no reason for a user of this package to muck directly with neurons. They should be used via the Brain class. However, I've left the Neuron class unprotected in case someone wants to use them directly.

See Also:
Serialized Form

Constructor Summary
Neuron(NetFunction g, Random r)
           
 
Method Summary
 void addToBackProp(double output_error)
          Thanks to Paras Chopra (www.paraschopra.com) for providing sample code that I was able to use to get a handle on the back propogation
 void doAccumulatedBackProp(double alpha)
          Thanks to Paras Chopra (www.paraschopra.com) for providing sample code that I was able to use to get a handle on the back propogation
 double getSum(long state_serial)
          Get the output of the sumation of all the inputs*weights before the translation function is run.
 double getValue(long state_serial)
          Get the output value
 void setSources(cc.glsn.v15.neuralnet.NetworkSource[] srcs)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Neuron

public Neuron(NetFunction g,
              Random r)
Method Detail

getValue

public double getValue(long state_serial)
Get the output value

Parameters:
state_serial -
Returns:
the output for this neuron

getSum

public double getSum(long state_serial)
Get the output of the sumation of all the inputs*weights before the translation function is run.

Parameters:
state_serial -
Returns:
the sum

setSources

public void setSources(cc.glsn.v15.neuralnet.NetworkSource[] srcs)

addToBackProp

public void addToBackProp(double output_error)
Thanks to Paras Chopra (www.paraschopra.com) for providing sample code that I was able to use to get a handle on the back propogation


doAccumulatedBackProp

public void doAccumulatedBackProp(double alpha)
Thanks to Paras Chopra (www.paraschopra.com) for providing sample code that I was able to use to get a handle on the back propogation


toString

public String toString()
Overrides:
toString in class Object