Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.able.beans
Class AbleSelfOrganizingMap

    java.lang.Object
      com.ibm.able.AbleObject
          com.ibm.able.beans.AbleNetwork
              com.ibm.able.beans.AbleSelfOrganizingMap

All Implemented Interfaces:
  AbleBean, AbleDataBufferManager, AbleEventListener, AbleEventListenerManager, AbleEventQueueManager, AbleEventQueueProcessor, AblePropertyChangeManager, AbleSerializable, AbleTranslateTemplateProvider, java.io.Serializable

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

This class implements the Kohonen Self-Organizing Feature Map algorithm For clustering high-dimensional input spaces into a 2-D grid It has several enhancements, including special processing for sparse inputs batch updates, gaussian neighborhood functions and exponential learning rate decay

See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `DEFAULT_CATEGORY`
`static java.lang.String` | `defaultName` Value assigned to name by default.

Fields inherited from class com.ibm.able.beans.AbleNetwork
`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, properties, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace`

Constructor Summary
`AbleSelfOrganizingMap()` default constructor
`AbleSelfOrganizingMap(java.lang.String aName)` default constructor
`AbleSelfOrganizingMap(java.lang.String aName, java.lang.String args)` Construct a Kohonen or SOM network with specified architecture

Method Summary
`void` | `changeNetArchitecture(java.lang.String parms)` Change the network architecture.
`void` | `createNetwork(int NumIn, int NumRows, int NumCols)` 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[]` | `getBias()`
`java.lang.String[]` | `getClusterCategories()` Returns the cluster category values for each cluster
`java.lang.String` | `getClusterCategory(int clusterIndex)` Get the category associated with the specified cluster
`java.util.Vector` | `getClusterCategoryValues()` Returns a list of unique cluster category values
`java.lang.String` | `getClusterLabel(int clusterIndex)` Return the label associated with the specified cluster
`java.lang.String[]` | `getClusterLabels()` Get an array of Labels (one for each cluster)
`double` | `getConfidence()`
`double` | `getConscience()` return the conscience parameter
`int[]` | `getDistance()`
`boolean` | `getEpochUpdate()`
`double` | `getLearnRate()` return the learn rate parameter
`int` | `getMaxNumEpochs()` return the max num Epochs parameter
`java.lang.String` | `getNetArchitecture()` Return the number of input and output units.
`java.util.Vector` | `getNetworkGraphicData()` return data on the network architecture, activations, and weights for display by the AbleNetworkGraphicView custom inspector
`int` | `getNumCols()`
`int` | `getNumInputs()`
`int` | `getNumOutputs()`
`int` | `getNumPasses()`
`int` | `getNumRows()`
`int` | `getNumUnits()`
`int` | `getNumWeights()`
`double[]` | `getPrototypeInput()`
`double[]` | `getPrototypeInput2()`
`long` | `getRecordIndex()`
`double[]` | `getWeights()`
`int` | `getWinner()`
`int` | `getWinner2()`
`double` | `getWinnerAct()`
`double` | `getWinnerAct2()`
`java.lang.String` | `getWinnerCategory()` Get the category of the current winner cluster
`java.lang.String` | `getWinnerLabel()`
`double[]` | `getWinRate()`
`void` | `initialize()`
`void` | `process()` Performs the main, synchronous, standard processing function performed by this bean.
`void` | `readInputs()` read inputs from the input buffer
`void` | `reset()` Reset this bean to its "initialized" state.
`void` | `setClusterCategory(int clusterIndex, java.lang.String category)` Set the category for the specified cluster
`void` | `setClusterLabel(int clusterIndex, java.lang.String label)` Set the label for the specified cluster
`void` | `setConscience(double newVal)` set the conscience parameter
`void` | `setEpochUpdate(boolean state)`
`void` | `setLearnRate(double newVal)` set the learn rate parameter
`void` | `setMaxNumEpochs(int num)` set the max Num Epochs parameter
`void` | `setNetArchitecture(java.lang.String parms)` Set the network architecture.

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, getInputBufferAsString, getInputBufferAsStringArray, getInputBufferContents, getLogger, getName, getOutputBuffer, getOutputBuffer, getOutputBufferAsString, getOutputBufferAsStringArray, getOutputBufferContents, getParent, getProperties, getProperty, getPropertyChangeListeners, 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, removeProperty, 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, setProperties, setProperty, 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.

### DEFAULT_CATEGORY

    public static final java.lang.String DEFAULT_CATEGORY

See Also:
  Constant Field Values

Constructor Detail

### AbleSelfOrganizingMap

    public AbleSelfOrganizingMap()
                          throws AbleException

  default constructor

### AbleSelfOrganizingMap

    public AbleSelfOrganizingMap(java.lang.String aName)
                          throws AbleException

  default constructor

### AbleSelfOrganizingMap

    public AbleSelfOrganizingMap(java.lang.String aName,
                                 java.lang.String args)
                          throws AbleException

  Construct a Kohonen or SOM network with specified architecture

Method Detail

### getRecordIndex

    public long getRecordIndex()

### getNumPasses

    public int getNumPasses()

### getNumInputs

    public int getNumInputs()

### getNumRows

    public int getNumRows()

### getNumCols

    public int getNumCols()

### getNumOutputs

    public int getNumOutputs()

### getNumUnits

    public int getNumUnits()

### getNumWeights

    public int getNumWeights()

### getEpochUpdate

    public boolean getEpochUpdate()

### setEpochUpdate

    public void setEpochUpdate(boolean state)

### getWinner

    public int getWinner()

### getWinner2

    public int getWinner2()

### getWinnerAct

    public double getWinnerAct()

### getWinnerAct2

    public double getWinnerAct2()

### getConfidence

    public double getConfidence()

### setLearnRate

    public void setLearnRate(double newVal)

  set the learn rate parameter

### getLearnRate

    public double getLearnRate()

  return the learn rate parameter

### setMaxNumEpochs

    public void setMaxNumEpochs(int num)

  set the max Num Epochs parameter

### getMaxNumEpochs

    public int getMaxNumEpochs()

  return the max num Epochs parameter

### setConscience

    public void setConscience(double newVal)

  set the conscience parameter

### getConscience

    public double getConscience()

  return the conscience parameter

### getActivations

    public double[] getActivations()

### getWeights

    public double[] getWeights()

### getWinRate

    public double[] getWinRate()

### getPrototypeInput

    public double[] getPrototypeInput()

### getPrototypeInput2

    public double[] getPrototypeInput2()

### getBias

    public double[] getBias()

### getDistance

    public int[] getDistance()

### 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.

  Specified by:
    `reset` in interface `AbleBean`
  Overrides:
    `reset` in class `AbleObject`
  Throws:
    `AbleException` - If an error occurs.
  See Also:
    `AbleBean.reset()`

### initialize

    public void initialize()
                    throws AbleException

  Throws:
    `AbleException`

### endEpoch

    public void endEpoch()

  Description copied from class: `AbleNetwork`
  Perform the end of epoch processing.

  Overrides:
    `endEpoch` in class `AbleNetwork`

### readInputs

    public void readInputs()
                    throws AbleException

  read inputs from the input buffer

  Throws:
    `AbleException`

### 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.

  Specified by:
    `process` in interface `AbleBean`
  Overrides:
    `process` in class `AbleObject`
  Throws:
    `AbleException`
  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`
  Parameters:
    `filt` - The AbleFilter used to convert incoming data.
    `outFilt` - 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.
  Throws:
    `AbleException`

### changeNetArchitecture

    public void changeNetArchitecture(java.lang.String parms)
                               throws AbleException

  Description copied from class: `AbleNetwork`
  Change the network architecture.

  Overrides:
    `changeNetArchitecture` in class `AbleNetwork`
  Parameters:
    `parms` - The new network architecture specification
  Throws:
    `AbleException`

### createNetwork

    public void createNetwork(int NumIn,
                              int NumRows,
                              int NumCols)
                       throws AbleException

  create a Back Propagation network with the specified architecture

  Throws:
    `AbleException`

### setNetArchitecture

    public void setNetArchitecture(java.lang.String parms)
                            throws AbleException

  Description copied from class: `AbleNetwork`
  Set the network architecture.

  Overrides:
    `setNetArchitecture` in class `AbleNetwork`
  Parameters:
    `parms` - The network architecture specification.
  Throws:
    `AbleException`

### 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.

### getNetArchitecture

    public java.lang.String getNetArchitecture()
                                        throws AbleException

  Return the number of input and output units.

  Throws:
    `AbleException`

### getClusterLabel

    public java.lang.String getClusterLabel(int clusterIndex)

  Return the label associated with the specified cluster

  Parameters:
    `clusterIndex` - The cluster ID of the cluster
  Returns:
    the label

### setClusterLabel

    public void setClusterLabel(int clusterIndex,
                                java.lang.String label)

  Set the label for the specified cluster

  Parameters:
    `clusterIndex` - The cluster ID (number) ranging from 0 to n-1
    `label` - The string label for the cluster

### getClusterLabels

    public java.lang.String[] getClusterLabels()

  Get an array of Labels (one for each cluster)

  Returns:
    A string array of cluster labels

### getClusterCategory

    public java.lang.String getClusterCategory(int clusterIndex)

  Get the category associated with the specified cluster

  Parameters:
    `clusterIndex` - The cluster ID (number) ranging from 0 to n-1

  Returns:
    the category of the cluster

### getWinnerCategory

    public java.lang.String getWinnerCategory()

  Get the category of the current winner cluster

  Returns:
    the category of the winner

### getWinnerLabel

    public java.lang.String getWinnerLabel()

### setClusterCategory

    public void setClusterCategory(int clusterIndex,
                                   java.lang.String category)
                            throws AbleDataException

  Set the category for the specified cluster

  Parameters:
    `clusterIndex` - The cluster ID (number) ranging from 0 to n-1
    `category` - The string identifier for the category
  Throws:
    `AbleDataException`

### getClusterCategories

    public java.lang.String[] getClusterCategories()

  Returns the cluster category values for each cluster

  Returns:
    A string array of categories

### getClusterCategoryValues

    public java.util.Vector getClusterCategoryValues()

  Returns a list of unique cluster category values

  Returns:
    A vector of unique cluster category values

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) Copyright IBM Corporation 1999, 2005