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

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)
 
Fields inherited from class org.neuroph.core.learning.LearningRule
neuralNetwork
 
Constructor Summary
IterativeLearning()
          Creates new instannce of IterativeLearning learning algorithm
IterativeLearning(NeuralNetwork network)
          Creates new instannce of IterativeLearning learning algorithm for the specified neural network.
 
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
getNeuralNetwork, getTrainingSet, isStopped, notifyChange, run, setNeuralNetwork, 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

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()
Creates new instannce of IterativeLearning learning algorithm


IterativeLearning

public IterativeLearning(NeuralNetwork network)
Creates new instannce of IterativeLearning learning algorithm for the specified neural network.

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:
maxIterations - 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