|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.openai.ai.nn.network.Network
This class encapsulates all global info on the neural network and contains information on the architecture type and error type. All layers for the network are contained here as well...
Constructor Summary | |
Network()
Constructor declaration |
|
Network(java.lang.String networkFileName)
Constructor use to create a network from a configuration file. |
Method Summary | |
void |
addCriterionReachedEventListener(CriterionReachedEventListener listener)
Adds a criterion reached event listener. |
void |
addIterationLimitReachedEventListener(IterationLimitReachedEventListener listener)
Adds a iteration limit reached event listener. |
void |
addLayer()
Adds a single layer to the network. |
void |
addLayerEventListener(LayerEventListener listener)
Adds a layer added event listener. |
void |
connect()
Connect the network using the networks' architecture rule. |
Architecture |
getArchitecture()
Get the value of architecture. |
boolean |
getConnected()
Returns whether the network has been connected. |
static boolean |
getDebug()
Get the debug flag. |
double |
getError()
Get the network error. |
double |
getErrorCriterion()
Get the network errorCriterion. |
ErrorType |
getErrorType()
Get the value of errorType. |
java.util.Vector |
getHiddenLayers()
Gets the hidden layers for this network. |
Layer |
getInputLayer()
Gets the input layer for this network. |
Layer |
getLayerAt(int position)
Get a specific layer in the network.. |
Layer |
getLayerForID(long lID)
Get a specific layer identified by its ID. |
java.util.Vector |
getLayers()
Gets all layers for this network. |
boolean |
getLearning()
Get the learning flag. |
java.util.Vector |
getLearningOrder()
Method declaration |
long |
getNextLayerID()
Get ID for the next layer. |
Layer |
getOutputLayer()
Gets the output layer for this network. |
TrainingElement |
getTrainingElement()
Get the training element currently being worked on by the network. |
TrainingSet |
getTrainingSet()
Get the training set to be worked on by the network. |
boolean |
getUseBias()
get the flag for whether this network will use a bias. |
void |
insertLayer(int index,
int layerSize,
java.lang.String name)
Inserts layer of the given size at a given position |
void |
insertRangeOfLayers(int fromIndex,
int[] layerSize)
Inserts range layers of the given size at a given position |
void |
iterate()
Iterates the network once. |
void |
iterate(int iterations)
Iterates the network for a specified number of iterations |
void |
iterateToCriterion()
Iterates the network for a specified number of iterations |
void |
loadConfiguration(java.io.File networkFile)
Creates a network by loading a configuration file. |
void |
loadConfiguration(java.lang.String networkFileName)
Creates a network by loading a configuration file by name. |
void |
loadTrainingData(java.lang.String inputFileName,
java.lang.String outputFileName)
Loads the data from the specified file. |
static void |
main(java.lang.String[] args)
The 'main' of the network. |
void |
reconnect()
Method declaration |
void |
removeCriterionReachedEventListener(CriterionReachedEventListener listener)
Removes a criterion reached event listener. |
void |
removeIterationLimitReachedEventListener(IterationLimitReachedEventListener listener)
Removes a iteration limit reached event listener. |
void |
removeLayer(int index)
Removes layer at a given position |
void |
removeLayerEventListener(LayerEventListener listener)
Removes a layer added event listener. |
void |
removeRangeOfLayers(int fromIndex,
int toIndex)
|
void |
setArchitecture(Architecture v)
Set the value of architecture. |
void |
setConnected(boolean connected)
Set the connected flag. |
void |
setDebug(boolean debug)
Set the debug flag. |
void |
setError(double error)
Set the network error. |
void |
setErrorCriterion(double errorCriterion)
Set the network errorCriterion. |
void |
setErrorType(ErrorType v)
Set the value of errorType. |
void |
setLayerAt(Layer layer,
int position)
Set a specific position in the network to be a specific layer. |
void |
setLayers(java.util.Vector layers)
Sets all layers for this network. |
void |
setLearning(boolean learning)
Set the learning flag. |
void |
setLearningOrder(java.util.Vector learningOrder)
Method declaration |
void |
setNextLayerID(long lLID)
Set ID for the next layer. |
void |
setSize(int i)
Sets the size of this network. |
void |
setTrainingElement(TrainingElement trainingElement)
Set the training element to be worked on by the network. |
void |
setTrainingSet(TrainingSet trainingSet)
Set the training set to be worked on by the network. |
void |
setUseBias(boolean useBias)
Set whether the network will use a bias. |
int |
size()
Returns the layercount |
java.lang.String |
toString()
Returns a string representation of the network useable for debug purposes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Network()
public Network(java.lang.String networkFileName)
networkFileName
- Name of the file to load.Method Detail |
public final void reconnect() throws net.openai.ai.nn.network.NetworkConfigurationException
NetworkConfigurationException
public final void loadConfiguration(java.lang.String networkFileName) throws net.openai.ai.nn.network.NetworkConfigurationException
networkFileName
- The name of the configuration file to load.
net.openai.ai.nn.network.NetworkConfigurationException
public final void loadConfiguration(java.io.File networkFile) throws net.openai.ai.nn.network.NetworkConfigurationException
networkFile
- The configuration file to load.
net.openai.ai.nn.network.NetworkConfigurationException
public final void loadTrainingData(java.lang.String inputFileName, java.lang.String outputFileName)
inputFileName
- The name of the input data file to load.outputFileName
- The name of the output data file to load.public final void iterate(int iterations)
iterations
- The number of times to iterate the network.public final void iterateToCriterion()
public final void iterate()
public final boolean getConnected()
public final void setConnected(boolean connected)
public final void connect() throws net.openai.ai.nn.network.NetworkConfigurationException
net.openai.ai.nn.network.NetworkConfigurationException
public final java.util.Vector getLayers()
public final void setLayers(java.util.Vector layers)
layers
- The set of layers this network will operate on.public final Layer getInputLayer()
public final java.util.Vector getHiddenLayers()
public final Layer getOutputLayer()
public final void setSize(int i)
i
- The number of layers to be held by this network.public void addLayer()
public final Layer getLayerAt(int position)
position
- The position in the network of the layer requested.
public final Layer getLayerForID(long lID)
lID
- ID of the layer
public final void setLayerAt(Layer layer, int position)
position
- The position in the network.layer
- The layer to be set at the specified position.public final boolean getLearning()
public final void setLearning(boolean learning)
learning
- A boolean value which if true sets the
network in learning mode.public java.util.Vector getLearningOrder()
public void setLearningOrder(java.util.Vector learningOrder)
learningOrder
- public final ErrorType getErrorType()
public final void setErrorType(ErrorType v)
v
- Value to assign to errorType.public final Architecture getArchitecture()
public final void setArchitecture(Architecture v)
v
- Value to assign to architecture.public final TrainingSet getTrainingSet()
public final void setTrainingSet(TrainingSet trainingSet)
trainingSet
- The training set for the network.public final TrainingElement getTrainingElement()
public final void setTrainingElement(TrainingElement trainingElement)
trainingElement
- The training element for the network.public final boolean getUseBias()
public final void setUseBias(boolean useBias)
useBias
- Whether the network will use a bias.public final double getError()
public final void setError(double error)
error
- The value of the network error.public final double getErrorCriterion()
public final void setErrorCriterion(double errorCriterion)
errorCriterion
- The value of the network errorCriterion.public long getNextLayerID()
public void setNextLayerID(long lLID)
lLID
- The value of the ID.public static final boolean getDebug()
public final void setDebug(boolean debug)
debug
- A boolean value which if true sets the
network in debug mode.public void addLayerEventListener(LayerEventListener listener)
listener
- listener to add.public void removeLayerEventListener(LayerEventListener listener)
listener
- listener to remove.public void addIterationLimitReachedEventListener(IterationLimitReachedEventListener listener)
listener
- listener to add.public void removeIterationLimitReachedEventListener(IterationLimitReachedEventListener listener)
listener
- listener to remove.public void addCriterionReachedEventListener(CriterionReachedEventListener listener)
listener
- listener to add.public void removeCriterionReachedEventListener(CriterionReachedEventListener listener)
listener
- listener to remove.public void insertLayer(int index, int layerSize, java.lang.String name)
index
- position of layer insertionlayerSize
- size of the layer being insertedpublic void insertRangeOfLayers(int fromIndex, int[] layerSize)
fromIndex
- position of the 1st layer to be insertedpublic void removeLayer(int index)
index
- position of a layer to be removedpublic void removeRangeOfLayers(int fromIndex, int toIndex)
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
args
- Contains the network XML configuration file to load
or name of the BSH script file.public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |