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.neuroph.core.learning
Class LearningRule

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

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  HopfieldLearning, IterativeLearning, KohonenLearning

    public abstract class LearningRule

extends Object
implements Serializable

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

Author:
  Zoran Sevarac
See Also:
  Serialized Form

Field Summary
`protected EventListenerList` | `listeners` List of learning rule listeners
`protected NeuralNetwork` | `neuralNetwork` Neural network to train

Constructor Summary
`LearningRule()` Creates new instance of learning rule

Method Summary
`void` | `addListener(LearningEventListener listener)`
`protected void` | `fireLearningEvent(LearningEvent evt)`
`NeuralNetwork` | `getNeuralNetwork()` Gets neural network
`DataSet` | `getTrainingSet()` Gets training set
`boolean` | `isStopped()` Returns true if learning has stopped, false otherwise
`abstract void` | `learn(DataSet trainingSet)` Override this method to implement specific learning procedures
`protected void` | `onStart()` Prepares the learning rule to run by setting stop flag to false
`void` | `removeListener(LearningEventListener listener)`
`void` | `setNeuralNetwork(NeuralNetwork neuralNetwork)` Sets neural network for this learning rule
`void` | `setTrainingSet(DataSet trainingSet)` Sets training set for this learning rule
`void` | `stopLearning()` Stops learning

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

### listeners

    protected EventListenerList listeners

  List of learning rule listeners

Constructor Detail

### LearningRule

    public LearningRule()

  Creates new instance of learning rule

Method Detail

### setTrainingSet

    public void setTrainingSet(DataSet trainingSet)

  Sets training set for this learning rule

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

### getTrainingSet

    public DataSet 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

### onStart

    protected void onStart()

  Prepares the learning rule to run by setting stop flag to false

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

### addListener

    public void addListener(LearningEventListener listener)

### removeListener

    public void removeListener(LearningEventListener listener)

### fireLearningEvent

    protected void fireLearningEvent(LearningEvent evt)

### learn

    public abstract void learn(DataSet trainingSet)

  Override this method to implement specific learning procedures

  Parameters:
    `trainingSet` - training set

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.