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 IterativeLearning

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

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  SupervisedLearning, UnsupervisedLearning

    public abstract class IterativeLearning

extends LearningRule
implements Serializable

Base class for all iterative learning algorithms. It provides the iterative learning procedure for all of its subclasses.

Author:
  Zoran Sevarac
See Also:
  Serialized Form

Field Summary
`protected int` | `currentIteration` Current iteration counter
`protected boolean` | `iterationsLimited` Flag for indicating if the training iteration number is limited
`protected double` | `learningRate` Learning rate parametar
`protected int` | `maxIterations` Max training iterations (when to stopLearning training) TODO: this field should be private, to force use of setMaxIterations from derived classes, so iterationsLimited flag is also set at the sam etime.Wil that break backward compatibility with serialized networks?

Fields inherited from class org.neuroph.core.learning.LearningRule
`listeners, neuralNetwork`

Constructor Summary
`IterativeLearning()` Creates new instance of IterativeLearning learning algorithm

Method Summary
`protected void` | `afterEpoch()`
`protected void` | `beforeEpoch()`
`abstract void` | `doLearningEpoch(DataSet trainingSet)` Override this method to implement specific learning epoch - one learning iteration, one pass through whole training set
`void` | `doOneLearningIteration(DataSet trainingSet)` Runs one learning iteration for the specified training set and notfies observers.
`Integer` | `getCurrentIteration()` Returns current iteration of this learning algorithm
`double` | `getLearningRate()` Returns learning rate for this algorithm
`boolean` | `isPausedLearning()` Returns true if learning thread is paused, false otherwise
`void` | `learn(DataSet trainingSet)` Override this method to implement specific learning procedures
`void` | `learn(DataSet trainingSet, int maxIterations)` Trains network for the specified training set and number of iterations
`protected void` | `onStart()` This method is executed when learning starts, before the first epoch.
`void` | `pause()` Pause the learning
`void` | `resume()` Resumes the paused learning
`void` | `setLearningRate(double learningRate)` Sets learning rate for this algorithm
`void` | `setMaxIterations(int maxIterations)` Sets iteration limit for this learning algorithm

Methods inherited from class org.neuroph.core.learning.LearningRule
`addListener, fireLearningEvent, getNeuralNetwork, getTrainingSet, isStopped, removeListener, setNeuralNetwork, setTrainingSet, stopLearning`

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

Field Detail

### learningRate

    protected double learningRate

  Learning rate parametar

### currentIteration

    protected int currentIteration

  Current iteration counter

### maxIterations

    protected int maxIterations

  Max training iterations (when to stopLearning training) TODO: this field should be private, to force use of setMaxIterations from derived classes, so iterationsLimited flag is also set at the sam etime.Wil that break backward compatibility with serialized networks?

### iterationsLimited

    protected boolean iterationsLimited

  Flag for indicating if the training iteration number is limited

Constructor Detail

### IterativeLearning

    public IterativeLearning()

  Creates new instance of IterativeLearning learning algorithm

Method Detail

### getLearningRate

    public double getLearningRate()

  Returns learning rate for this algorithm

  Returns:
    learning rate for this algorithm

### setLearningRate

    public void setLearningRate(double learningRate)

  Sets learning rate for this algorithm

  Parameters:
    `learningRate` - learning rate for this algorithm

### setMaxIterations

    public void setMaxIterations(int maxIterations)

  Sets iteration limit for this learning algorithm

  Parameters:
    `maxIterations` - iteration limit for this learning algorithm

### getCurrentIteration

    public Integer getCurrentIteration()

  Returns current iteration of this learning algorithm

  Returns:
    current iteration of this learning algorithm

### isPausedLearning

    public boolean isPausedLearning()

  Returns true if learning thread is paused, false otherwise

  Returns:
    true if learning thread is paused, false otherwise

### pause

    public void pause()

  Pause the learning

### resume

    public void resume()

  Resumes the paused learning

### onStart

    protected void onStart()

  This method is executed when learning starts, before the first epoch. Used for initialisation.

  Overrides:
    `onStart` in class `LearningRule`

### beforeEpoch

    protected void beforeEpoch()

### afterEpoch

    protected void afterEpoch()

### learn

    public final void learn(DataSet trainingSet)

  Description copied from class: `LearningRule`
  Override this method to implement specific learning procedures

  Specified by:
    `learn` in class `LearningRule`
  Parameters:
    `trainingSet` - training set

### learn

    public void learn(DataSet trainingSet,
                      int maxIterations)

  Trains network for the specified training set and number of iterations

  Parameters:
    `trainingSet` - training set to learn
    `maxIterations` - maximum numberof iterations to learn

### doOneLearningIteration

    public void doOneLearningIteration(DataSet trainingSet)

  Runs one learning iteration for the specified training set and notfies observers. This method does the the doLearningEpoch() and in addtion notifes observrs when iteration is done.

  Parameters:
    `trainingSet` - training set to learn

### doLearningEpoch

    public abstract void doLearningEpoch(DataSet trainingSet)

  Override this method to implement specific learning epoch - one learning iteration, one pass through whole training set

  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.