Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.encog.neural.bam
Class BAM

    java.lang.Object
      org.encog.ml.BasicML
          org.encog.neural.bam.BAM

All Implemented Interfaces:
  Serializable, MLMethod, MLProperties

    public class BAM

extends BasicML

Bidirectional associative memory (BAM) is a type of neural network developed by Bart Kosko in 1988. The BAM is a recurrent neural network that works similarly that allows patterns of different lengths to be mapped bidirectionally to other patterns. This allows it to act as almost a two-way hash map. During training the BAM is fed pattern pairs. The two halves of each pattern do not have to be the to be of the same length. However all patterns must be of the same overall structure. The BAM can be fed a distorted pattern on either side and will attempt to map to the correct value.

Author:
  jheaton
See Also:
  Serialized Form

Constructor Summary
`BAM()` Default constructor, used mainly for persistence.
`BAM(int theF1Count, int theF2Count)` Construct the BAM network.

Method Summary
`void` | `addPattern(MLData inputPattern, MLData outputPattern)` Add a pattern to the neural network.
`void` | `clear()` Clear any connection weights.
`MLData` | `compute(MLData input)` Setup the network logic, read parameters from the network.
`NeuralDataMapping` | `compute(NeuralDataMapping input)` Compute the network for the specified input.
`int` | `getF1Count()`
`int` | `getF2Count()`
`Matrix` | `getWeightsF1toF2()`
`Matrix` | `getWeightsF2toF1()`
`void` | `setF1Count(int i)` Set the F1 neuron count.
`void` | `setF2Count(int i)` Set the F2 neuron count.
`void` | `setWeightsF1toF2(Matrix matrix)` Set the weights for F1 to F2.
`void` | `setWeightsF2toF1(Matrix matrix)` Set the weights for F2 to F1.
`void` | `updateProperties()` Update any objeccts when a property changes.

Methods inherited from class org.encog.ml.BasicML
`getProperties, getPropertyDouble, getPropertyLong, getPropertyString, setProperty, setProperty, setProperty`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BAM

    public BAM()

  Default constructor, used mainly for persistence.

### BAM

    public BAM(int theF1Count,
               int theF2Count)

  Construct the BAM network.

  Parameters:
    `theF1Count` - The F1 count.
    `theF2Count` - The F2 count.

Method Detail

### addPattern

    public final void addPattern(MLData inputPattern,
                                 MLData outputPattern)

  Add a pattern to the neural network.

  Parameters:
    `inputPattern` - The input pattern.
    `outputPattern` - The output pattern(for this input).

### clear

    public final void clear()

  Clear any connection weights.

### compute

    public final MLData compute(MLData input)

  Setup the network logic, read parameters from the network. NOT USED, call compute(NeuralInputData).

  Parameters:
    `input` - NOT USED
  Returns:
    NOT USED

### compute

    public final NeuralDataMapping compute(NeuralDataMapping input)

  Compute the network for the specified input.

  Parameters:
    `input` - The input to the network.
  Returns:
    The output from the network.

### getF1Count

    public final int getF1Count()

  Returns:
    the f1Count

### getF2Count

    public final int getF2Count()

  Returns:
    the f2Count

### getWeightsF1toF2

    public final Matrix getWeightsF1toF2()

  Returns:
    the weightsF1toF2

### getWeightsF2toF1

    public final Matrix getWeightsF2toF1()

  Returns:
    the weightsF2toF1

### setF1Count

    public final void setF1Count(int i)

  Set the F1 neuron count.

  Parameters:
    `i` - The count.

### setF2Count

    public final void setF2Count(int i)

  Set the F2 neuron count.

  Parameters:
    `i` - The count.

### setWeightsF1toF2

    public final void setWeightsF1toF2(Matrix matrix)

  Set the weights for F1 to F2.

  Parameters:
    `matrix` - The weight matrix.

### setWeightsF2toF1

    public final void setWeightsF2toF1(Matrix matrix)

  Set the weights for F2 to F1.

  Parameters:
    `matrix` - The weight matrix.

### updateProperties

    public void updateProperties()

  Update any objeccts when a property changes.

  Specified by:
    `updateProperties` in interface `MLProperties`
  Specified by:
    `updateProperties` in class `BasicML`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.