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

## org.neuroph.core.learning
Class LearningRule

    java.lang.Object
      java.util.Observable
          org.neuroph.core.learning.LearningRule

All Implemented Interfaces:
  java.io.Serializable, java.lang.Runnable

Direct Known Subclasses:
  HopfieldLearning, IterativeLearning, KohonenLearning

    public abstract class LearningRule

extends java.util.Observable
implements java.lang.Runnable, java.io.Serializable

Base class for all neural network learning algorithms. It provides the general principles for training neural network.

See Also:
  Serialized Form

Field Summary
`protected NeuralNetwork` | `neuralNetwork` Neural network to train

Constructor Summary
`LearningRule()` Creates new instance of learning rule
`LearningRule(NeuralNetwork network)` Sets neural network for this learning rule

Method Summary
`NeuralNetwork` | `getNeuralNetwork()` Gets neural network
`TrainingSet` | `getTrainingSet()` Gets training set
`boolean` | `isStopped()` Returns true if learning has stopped, false otherwise
`abstract void` | `learn(TrainingSet trainingSet)` Override this method to implement specific learning procedures
`protected void` | `notifyChange()` Notify observers about change
`void` | `run()` Method from Runnable interface for running learning procedure in separate thread.
`void` | `setNeuralNetwork(NeuralNetwork neuralNetwork)` Sets neural network for this learning rule
`void` | `setTrainingSet(TrainingSet trainingSet)` Sets training set for this learning rule
`void` | `stopLearning()` Stops learning

Methods inherited from class java.util.Observable
`addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged`

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

Field Detail

### neuralNetwork

    protected NeuralNetwork neuralNetwork

  Neural network to train

Constructor Detail

### LearningRule

    public LearningRule()

  Creates new instance of learning rule

### LearningRule

    public LearningRule(NeuralNetwork network)

  Sets neural network for this learning rule

  Parameters:
    `network` - neural network to train

Method Detail

### setTrainingSet

    public void setTrainingSet(TrainingSet trainingSet)

  Sets training set for this learning rule

  Parameters:
    `trainingSet` - training set for this learning rule

### getTrainingSet

    public TrainingSet getTrainingSet()

  Gets training set

  Returns:
    training set

### getNeuralNetwork

    public NeuralNetwork getNeuralNetwork()

  Gets neural network

  Returns:
    neural network

### setNeuralNetwork

    public void setNeuralNetwork(NeuralNetwork neuralNetwork)

  Sets neural network for this learning rule

  Parameters:
    `neuralNetwork` - neural network for this learning rule

### run

    public void run()

  Method from Runnable interface for running learning procedure in separate thread.

  Specified by:
    `run` in interface `java.lang.Runnable`

### stopLearning

    public void stopLearning()

  Stops learning

### isStopped

    public boolean isStopped()

  Returns true if learning has stopped, false otherwise

  Returns:
    true if learning has stopped, false otherwise

### notifyChange

    protected void notifyChange()

  Notify observers about change

### learn

    public abstract void learn(TrainingSet trainingSet)

  Override this method to implement specific learning procedures

  Parameters:
    `trainingSet` - training set

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