Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.joone.net
Class NeuralNetValidator

    java.lang.Object
      org.joone.net.NeuralNetValidator

All Implemented Interfaces:
  java.lang.Runnable, java.util.EventListener, NeuralNetListener

    public class NeuralNetValidator

extends java.lang.Object
implements java.lang.Runnable, NeuralNetListener

This class is useful to validate a neural network. It simply sets some parameters of the neural network passed as parameter and starts itself in a separated thread, notifying a listener when the validation step finishes.

Author:
  pmarrone

Constructor Summary
`NeuralNetValidator(NeuralNet nn)`

Method Summary
`void` | `addValidationListener(NeuralValidationListener newListener)`
`void` | `cicleTerminated(NeuralNetEvent e)`
`void` | `errorChanged(NeuralNetEvent e)`
`void` | `fireNetValidated()`
`NeuralNet` | `getNeuralNet()` Gets the network to validate (or has been validated).
`void` | `netStarted(NeuralNetEvent e)`
`void` | `netStopped(NeuralNetEvent e)`
`void` | `netStoppedError(NeuralNetEvent e, java.lang.String error)`
`void` | `run()`
`void` | `start()` Starts the validation into a separated thread
`void` | `useTrainingData(boolean anUse)` By default the validator validates a neural network with validation data, however by calling this method before calling the `start()` method, one can decide if the network should be validated with validation data (the parameter `anUse` should be `false`) or by using the training data (the parameter `anUse` should be `true`).
`protected void` | `validate()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NeuralNetValidator

    public NeuralNetValidator(NeuralNet nn)

Method Detail

### addValidationListener

    public void addValidationListener(NeuralValidationListener newListener)

### validate

    protected void validate()

### fireNetValidated

    public void fireNetValidated()

### useTrainingData

    public void useTrainingData(boolean anUse)

  By default the validator validates a neural network with validation data, however by calling this method before calling the `start()` method, one can decide if the network should be validated with validation data (the parameter `anUse` should be `false`) or by using the training data (the parameter `anUse` should be `true`).

  Parameters:
    `anUse` - `true` if we should use training data for validation, `false` if we should use the validation data for validation (default).

### start

    public void start()

  Starts the validation into a separated thread

### run

    public void run()

  Specified by:
    `run` in interface `java.lang.Runnable`

### netStopped

    public void netStopped(NeuralNetEvent e)

  Specified by:
    `netStopped` in interface `NeuralNetListener`

### cicleTerminated

    public void cicleTerminated(NeuralNetEvent e)

  Specified by:
    `cicleTerminated` in interface `NeuralNetListener`

### netStarted

    public void netStarted(NeuralNetEvent e)

  Specified by:
    `netStarted` in interface `NeuralNetListener`

### errorChanged

    public void errorChanged(NeuralNetEvent e)

  Specified by:
    `errorChanged` in interface `NeuralNetListener`

### netStoppedError

    public void netStoppedError(NeuralNetEvent e,
                                java.lang.String error)

  Specified by:
    `netStoppedError` in interface `NeuralNetListener`

### getNeuralNet

    public NeuralNet getNeuralNet()

  Gets the network to validate (or has been validated).

  Returns:
    the netork to validate (or the network that has been validated).

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit Feedback to pmarrone@users.sourceforge.net