saaps.network
Class Neuron

java.lang.Object
  |
  +--saaps.network.Neuron

public class Neuron
extends java.lang.Object

The Neuron class is the smallest building block of a network. A neuron is defined by the weights, the bias and the activation function. The activation functions currently supported are


Field Summary
static int LOGSIG
           
static int PURELIN
           
static int TANSIG
           
 
Constructor Summary
Neuron(Jama.Matrix w, double b)
          The neuron is created from the weights andthe bias using the default activation function (TANSIG).
Neuron(Jama.Matrix w, double b, int af)
          The neuron is created from the weights, the bias and the activation function.
 
Method Summary
 Jama.Matrix getOutput()
          Get the output.
 Jama.Matrix sim(Jama.Matrix input)
          Run the network on an input matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PURELIN

public static final int PURELIN

LOGSIG

public static final int LOGSIG

TANSIG

public static final int TANSIG
Constructor Detail

Neuron

public Neuron(Jama.Matrix w,
              double b,
              int af)
The neuron is created from the weights, the bias and the activation function.
Parameters:
w - weights
b - bias
af - activation function (PURELIN, LOGSIG or TANSIG)

Neuron

public Neuron(Jama.Matrix w,
              double b)
The neuron is created from the weights andthe bias using the default activation function (TANSIG).
Parameters:
w - weights
b - bias
Method Detail

sim

public Jama.Matrix sim(Jama.Matrix input)
Run the network on an input matrix. The number of rows should equal the number of inputs. Each column represents one example, and the output will have as many columns as the input.
Parameters:
input - input matrix

getOutput

public Jama.Matrix getOutput()
Get the output.