net.openai.ai.nn.training
Class TrainingSet

java.lang.Object
  |
  +--net.openai.ai.nn.training.TrainingSet
All Implemented Interfaces:
java.io.Serializable

public class TrainingSet
extends java.lang.Object
implements java.io.Serializable

Data to train a neuralnet

Version:
$Id: TrainingSet.java,v 1.8 2002/03/17 18:10:02 tweber Exp $ History:
$Log: TrainingSet.java,v $
Revision 1.8 2002/03/17 18:10:02 tweber
Fixed bug in add/remove outputcolumn

Revision 1.7 2002/03/10 16:01:46 tweber
added methods to change the in- and output columns (add/remove)

Revision 1.6 2002/02/21 02:34:59 gleo
implements the Serializable interface.

Revision 1.5 2002/02/19 22:04:06 tweber
Methods to
- add new (initialised) elements
- remove elements
added
Author:
Gleo
See Also:
Serialized Form

Constructor Summary
TrainingSet()
           
 
Method Summary
 void addElement()
          Adds a new default training element to the system.
 void addElement(TrainingElement element)
          Adds a new training element to the system.
 void addElementAt(int index)
          Insert a element
 void addElementAt(int index, TrainingElement element)
          Insert a element
 void addInputCategory(java.lang.String name)
          Adds a new Inputcategory.
 void addOutputCategory(java.lang.String name)
          Adds a new Outputcategory.
 java.util.Vector getElements()
          Returns a Vector of TrainingElements.
 java.util.Vector getInputCategories()
          Returns a vector containing the names of the categories for the input data.
 TrainingElement getNewElement()
          Returns a new TrainingElement with all columns set to 0
 java.util.Vector getOutputCategories()
          Returns a vector containing the names of the categories for the output data.
 boolean isEmpty()
          Returns whether this training set contains any elements.
 void remove(int index)
          Delete a element
 void removeInputCategory()
          Removes the last Inputcategory.
 void removeOutputCategory()
          Removes the last Outputcategory.
 void setElements(java.util.Vector elements)
          Sets a Vector of TrainingElements.
 void setInputCategories(java.util.Vector inputCategories)
          Sets the categories for thhe input data.
 void setOutputCategories(java.util.Vector outputCategories)
          Sets the categories for the output data..
 int size()
          Returns the number of elements in this set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrainingSet

public TrainingSet()
Method Detail

addElement

public final void addElement(TrainingElement element)
Adds a new training element to the system.

Parameters:
element - The training elements to add to the set/

addElement

public final void addElement()
Adds a new default training element to the system.


addElementAt

public final void addElementAt(int index,
                               TrainingElement element)
Insert a element

Parameters:
index - The element will be inserted at the given index

addElementAt

public final void addElementAt(int index)
Insert a element

Parameters:
index - The element will be inserted at the given index

getElements

public final java.util.Vector getElements()
Returns a Vector of TrainingElements.

Returns:
Vector The training elements for this set.

setElements

public final void setElements(java.util.Vector elements)
Sets a Vector of TrainingElements.

Returns:
Vector The training elements for this set.

getInputCategories

public final java.util.Vector getInputCategories()
Returns a vector containing the names of the categories for the input data.

Returns:
Vector The names of the categories/columns for this training set.

setInputCategories

public final void setInputCategories(java.util.Vector inputCategories)
Sets the categories for thhe input data.


getOutputCategories

public final java.util.Vector getOutputCategories()
Returns a vector containing the names of the categories for the output data.

Returns:
Vector The names of the categories/columns for the output data.

setOutputCategories

public final void setOutputCategories(java.util.Vector outputCategories)
Sets the categories for the output data..


isEmpty

public final boolean isEmpty()
Returns whether this training set contains any elements.

Returns:
boolean Whether this set contains any elements.

size

public final int size()
Returns the number of elements in this set.

Returns:
int The number of elements in this set.

remove

public void remove(int index)
Delete a element

Parameters:
index - Index of the element to be deleted

getNewElement

public TrainingElement getNewElement()
Returns a new TrainingElement with all columns set to 0


addInputCategory

public void addInputCategory(java.lang.String name)
Adds a new Inputcategory. Extends the columnnames and all elements in the set


removeInputCategory

public void removeInputCategory()
Removes the last Inputcategory.


addOutputCategory

public void addOutputCategory(java.lang.String name)
Adds a new Outputcategory. Extends the columnnames and all elements in the set


removeOutputCategory

public void removeOutputCategory()
Removes the last Outputcategory.



Copyright - 2001 OpenAI Labs. All Rights Reserved.