org.vizzini.ai.neuralnetwork
Class NeuralNetworkTrainer

java.lang.Object
  extended by org.vizzini.ai.neuralnetwork.NeuralNetworkTrainer

public class NeuralNetworkTrainer
extends Object

Provides a neural network trainer.

Since:
v0.1
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
NeuralNetworkTrainer()
           
 
Method Summary
protected  void adjustWeights()
          Adjust the network weights.
protected  void clearDeltaWeights()
          Clear the delta weights.
 double getAlpha()
           
 double getBeta()
           
 INeuralNetwork getNetwork()
           
protected  void logArray(String title, double[] array)
          Log the given array.
protected  void logDeltaWeights()
          Log the delta weights.
 void setAlpha(double alpha)
          Set the value of the momentum constant.
 void setBeta(double beta)
          Set the value of the learning constant.
 void setNeuralNetwork(INeuralNetwork network)
          Set the neural network to be trained.
 double train(double[][] ins, double[][] outs)
          Train this network with the given training sets.
protected  double train(double[] ins, double[] outs)
          Train the neural network with the given training set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NeuralNetworkTrainer

public NeuralNetworkTrainer()
Method Detail

getAlpha

public double getAlpha()
Returns:
Return alpha.

getBeta

public double getBeta()
Returns:
Return beta.

getNetwork

public INeuralNetwork getNetwork()
Returns:
Return network.

setAlpha

public void setAlpha(double alpha)
Set the value of the momentum constant.


setBeta

public void setBeta(double beta)
Set the value of the learning constant.


setNeuralNetwork

public void setNeuralNetwork(INeuralNetwork network)
Set the neural network to be trained.

Since:
v0.1

train

public double train(double[][] ins,
                    double[][] outs)
Train this network with the given training sets.


adjustWeights

protected void adjustWeights()
Adjust the network weights.

Since:
v0.3

clearDeltaWeights

protected void clearDeltaWeights()
Clear the delta weights.

Since:
v0.3

logArray

protected void logArray(String title,
                        double[] array)
Log the given array.

Parameters:
title - Title.
array - Array.
Since:
v0.3

logDeltaWeights

protected void logDeltaWeights()
Log the delta weights.

Since:
v0.3

train

protected double train(double[] ins,
                       double[] outs)
Train the neural network with the given training set.



Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02