Neuroph

org.neuroph.core.learning
Class IterativeLearning

java.lang.Object
  extended by java.util.Observable
      extended by org.neuroph.core.learning.LearningRule
          extended by org.neuroph.core.learning.IterativeLearning
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable
Direct Known Subclasses:
SupervisedLearning, UnsupervisedLearning

public abstract class IterativeLearning
extends LearningRule
implements java.io.Serializable

The IterativeLearning class is the base class for all iterative learning algorithms. It provides the iterative learning procedure for all of its subclasses.

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)
private static long serialVersionUID
          The class fingerprint that is set to indicate serialization compatibility with a previous version of the class
 
Fields inherited from class org.neuroph.core.learning.LearningRule
neuralNetwork
 
Constructor Summary
IterativeLearning(NeuralNetwork network)
          Sets neural network for this learning algorithm
 
Method Summary
abstract  void doLearningEpoch(TrainingSet trainingSet)
          Override this method to implement specific learning epoch - one learning iteration, one pass through whole training set
 java.lang.Integer getCurrentIteration()
          Returns current iteration of this learning algorithm
 double getLearningRate()
          Returns learning rate for this algorithm
 void learn(TrainingSet trainingSet)
          Override this method to implement specific learning procedures
 void setLearningRate(double learningRate)
          Sets learning rate for this algorithm
 void setMaxIterations(java.lang.Integer maxIterations)
          Sets iteration limit for this learning algorithm
 
Methods inherited from class org.neuroph.core.learning.LearningRule
getTrainingSet, isStopped, notifyChange, run, setTrainingSet, stopLearning
 
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

serialVersionUID

private static final long serialVersionUID
The class fingerprint that is set to indicate serialization compatibility with a previous version of the class

See Also:
Constant Field Values

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)


iterationsLimited

protected boolean iterationsLimited
Flag for indicating if the training iteration number is limited

Constructor Detail

IterativeLearning

public IterativeLearning(NeuralNetwork network)
Sets neural network for this learning algorithm

Parameters:
network - neural network to train
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(java.lang.Integer maxIterations)
Sets iteration limit for this learning algorithm

Parameters:
max - iteration limit for this learning algorithm

getCurrentIteration

public java.lang.Integer getCurrentIteration()
Returns current iteration of this learning algorithm

Returns:
current iteration of this learning algorithm

learn

public void learn(TrainingSet trainingSet)
Description copied from class: LearningRule
Override this method to implement specific learning procedures

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

doLearningEpoch

public abstract void doLearningEpoch(TrainingSet trainingSet)
Override this method to implement specific learning epoch - one learning iteration, one pass through whole training set

Parameters:
trainingSet - training set

Neuroph