|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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) 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 |
---|
protected double learningRate
protected int currentIteration
protected int maxIterations
protected boolean iterationsLimited
Constructor Detail |
---|
public IterativeLearning()
Method Detail |
---|
public double getLearningRate()
public void setLearningRate(double learningRate)
learningRate
- learning rate for this algorithmpublic void setMaxIterations(int maxIterations)
maxIterations
- iteration limit for this learning algorithmpublic Integer getCurrentIteration()
public boolean isPausedLearning()
public void pause()
public void resume()
protected void onStart()
onStart
in class LearningRule
protected void beforeEpoch()
protected void afterEpoch()
public final void learn(DataSet trainingSet)
LearningRule
learn
in class LearningRule
trainingSet
- training setpublic void learn(DataSet trainingSet, int maxIterations)
trainingSet
- training set to learnmaxIterations
- maximum numberof iterations to learnpublic void doOneLearningIteration(DataSet trainingSet)
trainingSet
- training set to learnpublic abstract void doLearningEpoch(DataSet trainingSet)
trainingSet
- training set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |