|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.generation5.nn.NeuralNetworkTrainer
org.generation5.nn.KohonenTrainer
This class implements the Kohonen training algorithm. The class implements the training algorithm as a two-stage process: phase one reduces the neighbourhood radius slowly to one, while the learning constant k is reduced from 0.9 to 0.1. Phase two increases the number of training points slightly, keeps the neighbourhood size constant at one, and reduces the learning rate from 0.1 to 0.
| Field Summary | |
protected int |
currentIteration
The current training iteration. |
protected double |
deltaK
The amount at which k should be reduced. |
protected boolean |
hasFinished
Denotes whether the network has finished training. |
protected KohonenNN |
kohonenNN
The Kohonen network. |
protected int |
phaseOne
The number of phase one training iterations. |
protected int |
phaseTwo
The number of phase two training iterations. |
protected int |
reductionStep
The number of iterations to train before reducing the neighbourhood size. |
protected double[] |
trainData
The training data. |
protected int |
trainingSteps
The training steps per iteration. |
| Fields inherited from class org.generation5.nn.NeuralNetworkTrainer |
notifier |
| Constructor Summary | |
KohonenTrainer()
Creates a new instance of KohonenTrainer |
|
| Method Summary | |
void |
doStep()
Iterates one step of the Kohonen training algorithm. |
int |
getCurrentIteration()
Returns the current iteration. |
NeuralNetwork |
getNetwork()
Return the network being used. |
int |
getPhase()
Return the phase being used by the Kohonen network (1 or 2). |
abstract double[] |
getTrainingPoint()
Abstract method to allow a deriving class to return a valid training point. |
void |
init()
Initializes the trainer. |
boolean |
isComplete()
Returns whether the training is complete ( hasFinished). |
void |
setNetwork(NeuralNetwork net)
Set the Kohonen network to use in the trainer. |
void |
setPhases(int p1,
int p2)
Set the number of iterations for the two training phases. |
| Methods inherited from class org.generation5.nn.NeuralNetworkTrainer |
reset, run, setNotifier |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int phaseOne
protected int phaseTwo
protected int trainingSteps
protected int reductionStep
protected int currentIteration
protected double deltaK
protected double[] trainData
protected boolean hasFinished
protected KohonenNN kohonenNN
| Constructor Detail |
public KohonenTrainer()
| Method Detail |
public void setPhases(int p1,
int p2)
p1 - the number of phase one iterations.p2 - the number of phase two iterations.public abstract double[] getTrainingPoint()
public void doStep()
doStep in interface SteppabledoStep in class NeuralNetworkTrainerpublic void init()
init in interface Steppableinit in class NeuralNetworkTrainerpublic void setNetwork(NeuralNetwork net)
setNetwork in class NeuralNetworkTrainernet - the Kohonen network to use.public NeuralNetwork getNetwork()
getNetwork in class NeuralNetworkTrainerpublic boolean isComplete()
hasFinished).
isComplete in class NeuralNetworkTrainerhasFinishedpublic int getCurrentIteration()
public int getPhase()
|
This documentation is part of the Generation5 JDK.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||