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

## org.neuroph.core.learning
Class TrainingSet

    java.lang.Object
      org.neuroph.core.learning.TrainingSet

All Implemented Interfaces:
  java.io.Serializable

    public class TrainingSet

extends java.lang.Object
implements java.io.Serializable

A set of training elements for training neural network.

See Also:
  Serialized Form

Constructor Summary
`TrainingSet()` Creates an instance of new empty training set
`TrainingSet(int inputVectorSize)` Creates an instance of new empty training set
`TrainingSet(int inputVectorSize, int outputVectorSize)` Creates an instance of new empty training set
`TrainingSet(java.lang.String label)` Creates an instance of new empty training set with given label

Method Summary
`void` | `addElement(TrainingElement el)` Adds new training element to this training set
`void` | `clear()` Removes all alements from training set
`TrainingElement` | `elementAt(int idx)` Returns training element at specified index position
`java.util.Enumeration<TrainingElement>` | `elements()` Returns Enumeration for iterating training elements collection
`java.lang.String` | `getFilePath()` Returns full file path for this training set
`java.lang.String` | `getLabel()` Returns label for this training set
`boolean` | `isEmpty()` Returns true if training set is empty, false otherwise
`java.util.Iterator<TrainingElement>` | `iterator()` Returns Iterator for iterating training elements collection
`static TrainingSet` | `load(java.lang.String filePath)` Loads training set from the specified file
`void` | `removeElementAt(int idx)` Removes training element at specified index position
`void` | `save()` Saves this training set to file specified in its filePath field
`void` | `save(java.lang.String filePath)` Saves this training set to the specified file
`void` | `setFilePath(java.lang.String filePath)` Sets full file path for this training set
`void` | `setLabel(java.lang.String label)` Sets label for this training set
`int` | `size()` Returns number of training elements in this training set set
`java.lang.String` | `toString()` Returns label of this training set
`java.util.Vector<TrainingElement>` | `trainingElements()` Returns training elements collection

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

Constructor Detail

### TrainingSet

    public TrainingSet()

  Creates an instance of new empty training set

### TrainingSet

    public TrainingSet(java.lang.String label)

  Creates an instance of new empty training set with given label

  Parameters:
    `label` - training set label

### TrainingSet

    public TrainingSet(int inputVectorSize)

  Creates an instance of new empty training set

  Parameters:
    `inputVectorSize` -

### TrainingSet

    public TrainingSet(int inputVectorSize,
                       int outputVectorSize)

  Creates an instance of new empty training set

  Parameters:
    `inputVectorSize` -
    `outputVectorSize` -

Method Detail

### addElement

    public void addElement(TrainingElement el)
                    throws VectorSizeMismatchException

  Adds new training element to this training set

  Parameters:
    `el` - training element to add
  Throws:
    `VectorSizeMismatchException`

### removeElementAt

    public void removeElementAt(int idx)

  Removes training element at specified index position

  Parameters:
    `idx` - position of element to remove

### elements

    public java.util.Enumeration<TrainingElement> elements()

  Returns Enumeration for iterating training elements collection

  Returns:
    Enumeration for iterating training elements collection

### iterator

    public java.util.Iterator<TrainingElement> iterator()

  Returns Iterator for iterating training elements collection

  Returns:
    Iterator for iterating training elements collection

### trainingElements

    public java.util.Vector<TrainingElement> trainingElements()

  Returns training elements collection

  Returns:
    training elements collection

### elementAt

    public TrainingElement elementAt(int idx)

  Returns training element at specified index position

  Parameters:
    `idx` - index position of training element to return
  Returns:
    training element at specified index position

### clear

    public void clear()

  Removes all alements from training set

### isEmpty

    public boolean isEmpty()

  Returns true if training set is empty, false otherwise

  Returns:
    true if training set is empty, false otherwise

### size

    public int size()

  Returns number of training elements in this training set set

  Returns:
    number of training elements in this training set set

### getLabel

    public java.lang.String getLabel()

  Returns label for this training set

  Returns:
    label for this training set

### setLabel

    public void setLabel(java.lang.String label)

  Sets label for this training set

  Parameters:
    `label` - label for this training set

### setFilePath

    public void setFilePath(java.lang.String filePath)

  Sets full file path for this training set

  Parameters:
    `filePath` -

### getFilePath

    public java.lang.String getFilePath()

  Returns full file path for this training set

  Returns:
    full file path for this training set

### toString

    public java.lang.String toString()

  Returns label of this training set

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    label of this training set

### save

    public void save(java.lang.String filePath)

  Saves this training set to the specified file

  Parameters:
    `filePath` -

### save

    public void save()

  Saves this training set to file specified in its filePath field

### load

    public static TrainingSet load(java.lang.String filePath)

  Loads training set from the specified file

  Parameters:
    `filePath` - training set file
  Returns:
    loded training set

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