|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--marf.util.BaseThread | +--marf.Classification.NeuralNetwork.Neuron
Class Neuron -- a basic element of a neural network.
$Id: Neuron.java,v 1.13 2005/06/16 19:58:42 mokhov Exp $
Field Summary | |
double |
delta
Used in error calculation. |
static int |
HIDDEN
Indicates middle (hidden) neuron. |
static int |
INPUT
Indicates input neuron. |
java.lang.String |
name
Neuron's name. |
static int |
OUTPUT
Indicates output neuron. |
double |
result
Current Neuron's result. |
double |
threshold
Activation threshhold. |
int |
type
Current neuron type. |
static int |
UNDEF
Indicates undefined neuron type. |
Fields inherited from class marf.util.BaseThread |
iTID, oTarget, siNextTID |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
Neuron(java.lang.String n,
int t)
Neuron's Constructor. |
Method Summary | |
boolean |
addInput(marf.Classification.NeuralNetwork.Neuron in,
double weight)
Adds an input neuron and its associated weight. |
boolean |
addOutput(marf.Classification.NeuralNetwork.Neuron out)
Adds an output neuron. |
void |
commit()
Applies weight changes. |
void |
eval()
Evaluates current neuron's value. |
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
void |
printXML(java.io.BufferedWriter bw,
int tab)
Dumps XML of the current Neuron. |
void |
run()
The body of a Neuron thread. |
void |
train(double expected,
double alpha,
double beta)
Neuron training. |
Methods inherited from class marf.util.BaseThread |
getNextTID, getTarget, getTID |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int UNDEF
public static final int INPUT
public static final int HIDDEN
public static final int OUTPUT
public java.lang.String name
public int type
public double delta
public double threshold
public double result
Constructor Detail |
public Neuron(java.lang.String n, int t)
n
- Neuron's namet
- Neuron's typeMethod Detail |
public final boolean addInput(marf.Classification.NeuralNetwork.Neuron in, double weight)
in
- Neuron to be addedweight
- associated weight
true
if add was successfulpublic final boolean addOutput(marf.Classification.NeuralNetwork.Neuron out)
out
- the Neuron to add
public final void eval()
public final void train(double expected, double alpha, double beta)
expected
- expected valuealpha
- used in error calculationbeta
- used in error calculationpublic final void commit()
public final void printXML(java.io.BufferedWriter bw, int tab) throws java.io.IOException
bw
- Writer object to write outputtab
- tabulation needed
java.io.IOException
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public static java.lang.String getMARFSourceCodeRevision()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |