ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able.beans
Class AbleBackPropagation

java.lang.Object
  |
  +--com.ibm.able.AbleObject
        |
        +--com.ibm.able.beans.AbleNetwork
              |
              +--com.ibm.able.beans.AbleBackPropagation
All Implemented Interfaces:
AbleBean, AbleDataBufferManager, AbleEventListener, AbleEventListenerManager, AbleEventQueueManager, AbleEventQueueProcessor, AblePropertyChangeManager, AbleSerializable, AbleTranslateTemplateProvider, java.io.Serializable

public class AbleBackPropagation
extends AbleNetwork
implements AbleTranslateTemplateProvider, java.io.Serializable

Back Propagation Model Programmer: Joe Bigus Created: 10/4/90 Change Log: 7/26/95 jpb Major redesign for C++ (NNU V4)

See Also:
Serialized Form

Field Summary
static java.lang.String defaultName
          Value assigned to name by default.
 
Fields inherited from class com.ibm.able.beans.AbleNetwork
activations, breakPointFlag, breakPoints, inNum, lastBreakPoint, MODE_NAMES, netArchitecture, netEpoch, netMode, netModelType, netRecInx, netStepsPerEpoch, NNRUN, NNTEST, NNTRAIN, outNum
 
Fields inherited from class com.ibm.able.AbleObject
changed, chgSupport, comment, dataFlowEnabled, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace
 
Constructor Summary
AbleBackPropagation()
          default constructor
AbleBackPropagation(java.lang.String aName)
          default constrcutor with a name
AbleBackPropagation(java.lang.String aName, java.lang.String args)
          construct a back prop network with specified name and architecture
 
Method Summary
 void changeNetArchitecture(java.lang.String parms)
          Change the network architecture.
static java.lang.String Copyright()
          Determine the copyright of this class.
 void createNetwork(int NumIn, int NumHid1, int NumHid2, int NumHid3, int NumOut, int FeedbackType)
          create a Back Propagation network with the specified architecture
 void endEpoch()
          Perform the end of epoch processing.
 void generateTranslateTemplates(AbleFilter filt, AbleFilter outFilt, java.util.Vector fields)
          Populate a filter for converting data to a bean's input specifications, and a filter for converting a bean's output specifications back to the original coordinates.
 double[] getActivations()
           
 double getAveRMSError()
          return the average RMS error
 double getAvgRMSError()
           
 double getBadPatRatio()
           
 double getDecayFactor()
           
 double[] getError()
           
 int getFeedbackType()
           
 double getLastRMSError()
           
 double getLearnRate()
          return the learn rate parameter
 double getMaxRMSError()
           
 double getMomentum()
          return the momentum parameter
 java.lang.String getNetArchitecture()
          get the network architecture as specified by the user
 java.util.Vector getNetworkGraphicData()
          return data on the network architecture, activations, and weights for display by the AbleNetworkGraphicView custom inspector
 int getNumHidden1()
           
 int getNumHidden2()
           
 int getNumHidden3()
           
 int getNumInputs()
           
 int getNumOutputs()
           
 int getNumUnits()
           
 int getNumWeights1()
           
 int getNumWeights2()
           
 int getNumWeights3()
           
 int getNumWeights4()
           
 double getPercentCorrect()
           
 double getPercentIncorrect()
           
 double getPercentUnknown()
           
 double[] getTeach()
           
 double[] getThreshold()
           
 double getTolerance()
          return the error tolerance parameter
 double[] getWeights1()
           
 double[] getWeights2()
           
 double[] getWeights3()
           
 double[] getWeights4()
           
 double[] getWgtDeriv1()
           
 double[] getWgtDeriv2()
           
 double[] getWgtDeriv3()
           
 double[] getWgtDeriv4()
           
 boolean isAdaptLearnRate()
           
 boolean isEpochUpdate()
           
 boolean isExplicitErrorMode()
           
 boolean isSymmetricActFunction()
           
 void process()
          Performs the main, synchronous, standard processing function performed by this bean.
 void readInputs()
          move data from the train/test set into the network input units and the teach array
 void reset()
          Reset this bean to its "initialized" state.
 void setAdaptLearnRate(boolean state)
           
 void setDecayFactor(double factor)
           
 void setEpochUpdate(boolean state)
           
 void setExplicitErrorMode(boolean state)
           
 void setLearnRate(double newVal)
          set the learn rate parameter
 void setMomentum(double newVal)
          set the momentum parameter
 void setNetArchitecture(java.lang.String arch)
          Set the back propagation network architecture The architecture string is a sequence of space-delimited integers as follows: numInput numHid1 numHid2 numHid3 numOutput feedbackType Note if feedbackType is not specified, it will be set to 0
 void setSymmetricActFunction(boolean state)
           
 void setTolerance(double newVal)
          set the error tolerance parameter
 
Methods inherited from class com.ibm.able.beans.AbleNetwork
breakPointReached, clearAllBreakPoints, clearBreakPoint, clearBreakPoint, clearLastBreakPoint, getLastBreakPoint, getNetEpoch, getNetMode, getNetRecInx, getNetStepsPerEpoch, setBreakPoint, setDefaults, setNetMode, setNetStepsPerEpoch, testBreakPoints
 
Methods inherited from class com.ibm.able.AbleObject
addAbleEventListener, addDestBufferConnection, addPropertyChangeListener, addPropertyConnection, addSourceBufferConnection, addStateChangeListener, dataChanged, firePropertyChange, flushAbleEventQueue, getAbleEventListeners, getAbleEventProcessingEnabled, getAbleEventQueueSize, getComment, getDestBufferConnections, getFileName, getInputBuffer, getInputBuffer, getInputBufferAsStringArray, getInputBufferContents, getLogger, getName, getOutputBuffer, getOutputBuffer, getOutputBufferAsStringArray, getOutputBufferContents, getParent, getPropertyConnectionManager, getSleepTime, getSourceBufferConnections, getState, getTraceLogger, handleAbleEvent, hasInputBuffer, hasOutputBuffer, init, init, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isChanged, isConnectable, isDataFlowEnabled, isTimerEventProcessingEnabled, notifyAbleEventListeners, process, processAbleEvent, processBufferConnections, processNoEventProcessingEnabledSituation, processTimerEvent, quitAll, quitEnabledEventProcessing, removeAbleEventListener, removeAllAbleEventListeners, removeAllBufferConnections, removeAllConnections, removeAllPropertyConnections, removeDestBufferConnection, removePropertyChangeListener, removePropertyConnection, removeSourceBufferConnection, removeStateChangeListener, restartEnabledEventProcessing, restoreFromFile, restoreFromFile, restoreFromSerializedFile, restoreFromStream, resumeAll, resumeEnabledEventProcessing, saveToFile, saveToFile, setAbleEventProcessingEnabled, setChanged, setComment, setDataFlowEnabled, setFileName, setInputBuffer, setInputBuffer, setLogger, setName, setOutputBuffer, setOutputBuffer, setParent, setSleepTime, setState, setTimerEventProcessingEnabled, setTraceLogger, sourceConnectionsOK, startEnabledEventProcessing, suspendAll, suspendEnabledEventProcessing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultName

public static final java.lang.String defaultName
Value assigned to name by default.
Constructor Detail

AbleBackPropagation

public AbleBackPropagation()
                    throws AbleException
default constructor

AbleBackPropagation

public AbleBackPropagation(java.lang.String aName)
                    throws AbleException
default constrcutor with a name

AbleBackPropagation

public AbleBackPropagation(java.lang.String aName,
                           java.lang.String args)
                    throws AbleException
construct a back prop network with specified name and architecture
Method Detail

getNumInputs

public int getNumInputs()

getNumHidden1

public int getNumHidden1()

getNumHidden2

public int getNumHidden2()

getNumHidden3

public int getNumHidden3()

getNumOutputs

public int getNumOutputs()

getNumUnits

public int getNumUnits()

getNumWeights1

public int getNumWeights1()

getNumWeights2

public int getNumWeights2()

getNumWeights3

public int getNumWeights3()

getNumWeights4

public int getNumWeights4()

isExplicitErrorMode

public boolean isExplicitErrorMode()

setExplicitErrorMode

public void setExplicitErrorMode(boolean state)

isAdaptLearnRate

public boolean isAdaptLearnRate()

setAdaptLearnRate

public void setAdaptLearnRate(boolean state)

isEpochUpdate

public boolean isEpochUpdate()

setEpochUpdate

public void setEpochUpdate(boolean state)

isSymmetricActFunction

public boolean isSymmetricActFunction()

setSymmetricActFunction

public void setSymmetricActFunction(boolean state)

getFeedbackType

public int getFeedbackType()

getDecayFactor

public double getDecayFactor()

setDecayFactor

public void setDecayFactor(double factor)

getAvgRMSError

public double getAvgRMSError()

getLastRMSError

public double getLastRMSError()

getMaxRMSError

public double getMaxRMSError()

getBadPatRatio

public double getBadPatRatio()

setLearnRate

public void setLearnRate(double newVal)
set the learn rate parameter

getLearnRate

public double getLearnRate()
return the learn rate parameter

setMomentum

public void setMomentum(double newVal)
set the momentum parameter

getPercentCorrect

public double getPercentCorrect()

getPercentIncorrect

public double getPercentIncorrect()

getPercentUnknown

public double getPercentUnknown()

getMomentum

public double getMomentum()
return the momentum parameter

setTolerance

public void setTolerance(double newVal)
set the error tolerance parameter

getTolerance

public double getTolerance()
return the error tolerance parameter

getAveRMSError

public double getAveRMSError()
return the average RMS error

getActivations

public double[] getActivations()

getWeights1

public double[] getWeights1()

getWeights2

public double[] getWeights2()

getWeights3

public double[] getWeights3()

getWeights4

public double[] getWeights4()

getWgtDeriv1

public double[] getWgtDeriv1()

getWgtDeriv2

public double[] getWgtDeriv2()

getWgtDeriv3

public double[] getWgtDeriv3()

getWgtDeriv4

public double[] getWgtDeriv4()

getThreshold

public double[] getThreshold()

getTeach

public double[] getTeach()

getError

public double[] getError()

getNetArchitecture

public java.lang.String getNetArchitecture()
get the network architecture as specified by the user

reset

public void reset()
           throws AbleException
Description copied from class: AbleObject
Reset this bean to its "initialized" state.

This base method has no default implementation. It only provides tracing.

Overrides:
reset in class AbleObject
Following copied from class: com.ibm.able.AbleObject
Throws:
AbleException - If an error occurs.
See Also:
AbleBean.reset()

readInputs

public void readInputs()
                throws AbleException
move data from the train/test set into the network input units and the teach array

process

public void process()
             throws AbleException
Description copied from class: AbleObject
Performs the main, synchronous, standard processing function performed by this bean.

This base method implementation provides tracing only.

Overrides:
process in class AbleObject
Following copied from class: com.ibm.able.AbleObject
See Also:
AbleObject.inputBuffer, AbleObject.outputBuffer, AbleBean.process()

generateTranslateTemplates

public void generateTranslateTemplates(AbleFilter filt,
                                       AbleFilter outFilt,
                                       java.util.Vector fields)
                                throws AbleException
Description copied from interface: AbleTranslateTemplateProvider
Populate a filter for converting data to a bean's input specifications, and a filter for converting a bean's output specifications back to the original coordinates. Translate templates are added to each filter for each field as appropriate for its field usage and datatype. A bean who wishes to provide only default templates can use the static link provided in AbleFilter.generateTranslateTemplates(com.ibm.able.beans.filter.AbleFilter, com.ibm.able.beans.filter.AbleFilter, java.util.Vector)
Specified by:
generateTranslateTemplates in interface AbleTranslateTemplateProvider
Following copied from interface: com.ibm.able.beans.filter.AbleTranslateTemplateProvider
Parameters:
inFilter - The AbleFilter used to convert incoming data.
outFilter - The AbleFilter used to convert outgoing data.
fields - A vector of AbleFields from which to derive the translation template.
Returns:
An array containing two AbleFilter objectshe translation template.

endEpoch

public void endEpoch()
Description copied from class: AbleNetwork
Perform the end of epoch processing.
Overrides:
endEpoch in class AbleNetwork
Following copied from class: com.ibm.able.beans.AbleNetwork
Returns:
void.

changeNetArchitecture

public void changeNetArchitecture(java.lang.String parms)
                           throws AbleException
Description copied from class: AbleNetwork
Change the network architecture.
Overrides:
changeNetArchitecture in class AbleNetwork
Following copied from class: com.ibm.able.beans.AbleNetwork
Parameters:
Architecture - The new network architecture specification

Returns:
void.

createNetwork

public void createNetwork(int NumIn,
                          int NumHid1,
                          int NumHid2,
                          int NumHid3,
                          int NumOut,
                          int FeedbackType)
                   throws AbleException
create a Back Propagation network with the specified architecture

setNetArchitecture

public void setNetArchitecture(java.lang.String arch)
                        throws AbleException
Set the back propagation network architecture The architecture string is a sequence of space-delimited integers as follows: numInput numHid1 numHid2 numHid3 numOutput feedbackType Note if feedbackType is not specified, it will be set to 0
Overrides:
setNetArchitecture in class AbleNetwork
Parameters:
arch - A string that defines the network architecture

getNetworkGraphicData

public java.util.Vector getNetworkGraphicData()
return data on the network architecture, activations, and weights for display by the AbleNetworkGraphicView custom inspector
Overrides:
getNetworkGraphicData in class AbleNetwork
Returns:
a Vector containing 3 elements, a) an int[] containing num units per layer b) a double[] array containing network activations, c) a Vector containing N weights arrays.

Copyright

public static java.lang.String Copyright()
Determine the copyright of this class.
Returns:
A String containing this class's copyright statement.


ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003