org.encog.neural.thermal

## Class BoltzmannMachine

- java.lang.Object
- - org.encog.ml.BasicML
  - - org.encog.neural.thermal.ThermalNetwork
    - - org.encog.neural.thermal.BoltzmannMachine

- All Implemented Interfaces:
    Serializable, MLAutoAssocation, MLInput, MLInputOutput, MLMethod, MLOutput, MLProperties, MLRegression, MLResettable

      public class BoltzmannMachine
      extends ThermalNetwork

  Implements a Boltzmann machine.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ANNEAL_CYCLES` The property for anneal cycles.
    `static String` | `RUN_CYCLES` The property for run cycles.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BoltzmannMachine()` Default constructors.
    `BoltzmannMachine(int neuronCount)` Construct a Boltzmann machine with the specified number of neurons.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MLData` | `compute(MLData input)` Note: for Boltzmann networks, you will usually want to call the "run" method to compute the output.
    `void` | `decreaseTemperature(double d)` Decrease the temperature by the specified amount.
    `void` | `establishEquilibrium()` Run the network until thermal equilibrium is established.
    `int` | `getAnnealCycles()`
    `int` | `getInputCount()`
    `int` | `getOutputCount()`
    `int` | `getRunCycles()`
    `double` | `getTemperature()`
    `double[]` | `getThreshold()`
    `void` | `run()` Run the network for all neurons present.
    `void` | `run(int i)` Run the network for the specified neuron.
    `void` | `setAnnealCycles(int annealCycles)`
    `void` | `setRunCycles(int runCycles)`
    `void` | `setTemperature(double temperature)` Set the network temperature.
    `void` | `setThreshold(double[] t)` Set the thresholds.
    `void` | `updateProperties()` Update any objeccts when a property changes.

    - ### Methods inherited from class org.encog.neural.thermal.ThermalNetwork

      `addWeight, calculateEnergy, clear, getCurrentState, getNeuronCount, getWeight, getWeights, init, reset, reset, setCurrentState, setCurrentState, setNeuronCount, setWeight, setWeights`

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

- - ### Field Detail

    - #### RUN_CYCLES

          public static final String RUN_CYCLES

      The property for run cycles.
      See Also:
        Constant Field Values

    - #### ANNEAL_CYCLES

          public static final String ANNEAL_CYCLES

      The property for anneal cycles.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BoltzmannMachine

          public BoltzmannMachine()

      Default constructors.

    - #### BoltzmannMachine

          public BoltzmannMachine(int neuronCount)

      Construct a Boltzmann machine with the specified number of neurons.
      Parameters:
        `neuronCount` - The number of neurons.

  - ### Method Detail

    - #### compute

          public MLData compute(MLData input)

      Note: for Boltzmann networks, you will usually want to call the "run" method to compute the output. This method can be used to copy the input data to the current state. A single iteration is then run, and the new current state is returned.
      Parameters:
        `input` - The input pattern.
      Returns:
        The new current state.

    - #### decreaseTemperature

          public void decreaseTemperature(double d)

      Decrease the temperature by the specified amount.
      Parameters:
        `d` - The amount to decrease by.

    - #### establishEquilibrium

          public void establishEquilibrium()

      Run the network until thermal equilibrium is established.

    - #### getAnnealCycles

          public int getAnnealCycles()

      Returns:
        the annealCycles

    - #### getInputCount

          public int getInputCount()

      Returns:
        The input.

    - #### getOutputCount

          public int getOutputCount()

      Returns:
        The output count.

    - #### getRunCycles

          public int getRunCycles()

      Returns:
        the runCycles

    - #### getTemperature

          public double getTemperature()

      Returns:
        The temperature the network is currently operating at.

    - #### getThreshold

          public double[] getThreshold()

      Returns:
        the threshold

    - #### run

          public void run()

      Run the network for all neurons present.

    - #### run

          public void run(int i)

      Run the network for the specified neuron.
      Parameters:
        `i` - The neuron to run for.

    - #### setAnnealCycles

          public void setAnnealCycles(int annealCycles)

      Parameters:
        `annealCycles` - the annealCycles to set

    - #### setRunCycles

          public void setRunCycles(int runCycles)

      Parameters:
        `runCycles` - the runCycles to set

    - #### setTemperature

          public void setTemperature(double temperature)

      Set the network temperature.
      Parameters:
        `temperature` - The temperature to operate the network at.

    - #### setThreshold

          public void setThreshold(double[] t)

      Set the thresholds.
      Parameters:
        `t` - The thresholds.

    - #### updateProperties

          public void updateProperties()

      Update any objeccts when a property changes.
      Specified by:
        `updateProperties` in interface `MLProperties`
      Specified by:
        `updateProperties` in class `BasicML`

Copyright © 2014. All Rights Reserved.