org.neuroph.core.learning
Class IterativeLearning
- java.lang.Object
-
- org.neuroph.core.learning.LearningRule
-
- org.neuroph.core.learning.IterativeLearning
-
- All Implemented Interfaces:
- java.io.Serializable
- 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
-
-
Constructor Summary
Constructors Constructor and Description IterativeLearning()Creates new instance of IterativeLearning learning algorithm
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract voiddoLearningEpoch(DataSet trainingSet)Override this method to implement specific learning epoch - one learning iteration, one pass through whole training setvoiddoOneLearningIteration(DataSet trainingSet)Runs one learning iteration with the specified training set and fires event to notify observers.intgetCurrentIteration()Returns current iteration of this learning algorithmdoublegetLearningRate()Returns learning rate for this algorithmintgetMaxIterations()Returns max iterations limit of this learning algorithmbooleanisIterationsLimited()booleanisPausedLearning()Returns true if learning thread is paused, false otherwisevoidlearn(DataSet trainingSet)Override this method to implement specific learning proceduresvoidlearn(DataSet trainingSet, int maxIterations)Trains network for the specified training set and number of iterationsvoidpause()Pause the learningvoidresume()Resumes the paused learningvoidsetLearningRate(double learningRate)Sets learning rate for this algorithmvoidsetMaxIterations(int maxIterations)Sets iteration limit for this learning algorithm-
Methods inherited from class org.neuroph.core.learning.LearningRule
addListener, getNeuralNetwork, getTrainingSet, isStopped, removeListener, setNeuralNetwork, setTrainingSet, stopLearning
-
-
-
-
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
-
getMaxIterations
public int getMaxIterations()
Returns max iterations limit of this learning algorithm- Returns:
- max iteration limit of this learning algorithm
-
isIterationsLimited
public boolean isIterationsLimited()
-
getCurrentIteration
public int 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 final void pause()
Pause the learning
-
resume
public final void resume()
Resumes the paused learning
-
learn
public final void learn(DataSet trainingSet)
Description copied from class:LearningRuleOverride this method to implement specific learning procedures- Specified by:
learnin classLearningRule- 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 learnmaxIterations- maximum numberof iterations to learn
-
doOneLearningIteration
public void doOneLearningIteration(DataSet trainingSet)
Runs one learning iteration with the specified training set and fires event to notify 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
-
-
DMelt 3.0 © DataMelt by jWork.ORG