|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
org.neuroph.core.learning.LearningRule
org.neuroph.core.learning.IterativeLearning
public abstract class IterativeLearning
Base class for all iterative learning algorithms. It provides the iterative learning procedure for all of its subclasses.
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 |
void |
doOneLearningIteration(TrainingSet trainingSet)
Runs one learning iteration for the specified training set and notfies observers. |
java.lang.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(TrainingSet trainingSet)
Override this method to implement specific learning procedures |
void |
learn(TrainingSet trainingSet,
int maxIterations)
Trains network for the specified training set and number of iterations |
void |
pause()
Pause the learning |
void |
resume()
Resumes the paused learning |
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 |
---|
protected double learningRate
protected int currentIteration
protected int maxIterations
protected boolean iterationsLimited
Constructor Detail |
---|
public IterativeLearning()
public IterativeLearning(NeuralNetwork network)
network
- neural network to trainMethod Detail |
---|
public double getLearningRate()
public void setLearningRate(double learningRate)
learningRate
- learning rate for this algorithmpublic void setMaxIterations(java.lang.Integer maxIterations)
maxIterations
- iteration limit for this learning algorithmpublic java.lang.Integer getCurrentIteration()
public boolean isPausedLearning()
public void pause()
public void resume()
public void learn(TrainingSet trainingSet)
LearningRule
learn
in class LearningRule
trainingSet
- training setpublic void learn(TrainingSet trainingSet, int maxIterations)
trainingSet
- training set to learnmaxIterations
- maximum numberof iterations to learnpublic void doOneLearningIteration(TrainingSet trainingSet)
trainingSet
- training set to learnpublic abstract void doLearningEpoch(TrainingSet trainingSet)
trainingSet
- training set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |