| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
marf.util.BaseThread
marf.Classification.NeuralNetwork.Neuron
public class Neuron
Class Neuron -- a basic element of a neural network.
$Id: Neuron.java,v 1.19 2007/12/31 00:17:04 mokhov Exp $
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class java.lang.Thread | 
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler | 
| Field Summary | |
|---|---|
protected  double | 
dDelta
Used in error calculation.  | 
protected  double | 
dResult
Current Neuron's result.  | 
protected  double | 
dThreshold
Activation threshold.  | 
static int | 
HIDDEN
Indicates middle (hidden) neuron.  | 
static int | 
INPUT
Indicates input neuron.  | 
protected  int | 
iType
Current neuron type.  | 
static int | 
OUTPUT
Indicates output neuron.  | 
protected  java.lang.String | 
strName
Neuron's name.  | 
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 pstrName,
       int piType)
Neuron's Constructor.  | 
|
| Method Summary | |
|---|---|
 boolean | 
addInput(Neuron poInputNeuron,
         double pdWeight)
Adds an input neuron and its associated weight.  | 
 boolean | 
addOutput(Neuron poOutputNeuron)
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 poWriter,
         int piTabsNum)
Dumps XML of the current Neuron.  | 
 void | 
run()
The body of a Neuron thread.  | 
 void | 
train(double pdExpected,
      double pdAlpha,
      double pdBeta)
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, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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
protected java.lang.String strName
protected int iType
protected double dDelta
protected double dThreshold
protected double dResult
| Constructor Detail | 
|---|
public Neuron(java.lang.String pstrName,
              int piType)
pstrName - Neuron's namepiType - Neuron's type| Method Detail | 
|---|
public final boolean addInput(Neuron poInputNeuron,
                              double pdWeight)
poInputNeuron - Neuron to be addedpdWeight - associated weight
true if add was successfulpublic final boolean addOutput(Neuron poOutputNeuron)
poOutputNeuron - the Neuron to add
public final void eval()
public final void train(double pdExpected,
                        double pdAlpha,
                        double pdBeta)
pdExpected - expected valuepdAlpha - used in error calculation (training constant)pdBeta - used in error calculationpublic final void commit()
public final void printXML(java.io.BufferedWriter poWriter,
                           int piTabsNum)
                    throws java.io.IOException
poWriter - Writer object to write output topiTabsNum - tabulation needed
java.io.IOException - if there is any problem to output to the writerpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic static java.lang.String getMARFSourceCodeRevision()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||