org.joone.samples.engine.validation
Class NeuralNetTrainer
- java.lang.Object
-
- org.joone.samples.engine.validation.NeuralNetTrainer
-
- All Implemented Interfaces:
- java.lang.Runnable, java.util.EventListener, NeuralNetListener, NeuralValidationListener
public class NeuralNetTrainer extends java.lang.Object implements java.lang.Runnable, NeuralNetListener, NeuralValidationListener
This class trains and validates a neural network passed as parameter of the constructor and, when the validation phase is finished, it notifies its listeners. The neural network passes as parameter is cloned before to use it, so the calling program can call many copies of this class to train and validate several copies of the same neural network.
-
-
Constructor Summary
Constructors Constructor and Description NeuralNetTrainer(NeuralNet nn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddValidationListener(NeuralValidationListener newListener)voidcicleTerminated(NeuralNetEvent e)voiderrorChanged(NeuralNetEvent e)voidnetStarted(NeuralNetEvent e)voidnetStopped(NeuralNetEvent e)voidnetStoppedError(NeuralNetEvent e, java.lang.String error)voidnetValidated(NeuralValidationEvent event)voidrun()voidstart()Starts the training & validation phases into a separated thread
-
-
-
Constructor Detail
-
NeuralNetTrainer
public NeuralNetTrainer(NeuralNet nn)
-
-
Method Detail
-
addValidationListener
public void addValidationListener(NeuralValidationListener newListener)
-
start
public void start()
Starts the training & validation phases into a separated thread
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
netStopped
public void netStopped(NeuralNetEvent e)
- Specified by:
netStoppedin interfaceNeuralNetListener
-
netValidated
public void netValidated(NeuralValidationEvent event)
- Specified by:
netValidatedin interfaceNeuralValidationListener
-
cicleTerminated
public void cicleTerminated(NeuralNetEvent e)
- Specified by:
cicleTerminatedin interfaceNeuralNetListener
-
netStarted
public void netStarted(NeuralNetEvent e)
- Specified by:
netStartedin interfaceNeuralNetListener
-
errorChanged
public void errorChanged(NeuralNetEvent e)
- Specified by:
errorChangedin interfaceNeuralNetListener
-
netStoppedError
public void netStoppedError(NeuralNetEvent e, java.lang.String error)
- Specified by:
netStoppedErrorin interfaceNeuralNetListener
-
-
DataMelt 3.0 © DataMelt by jWork.ORG