Package com.tibco.patterns.learn.training

## Class VectorSet

- java.lang.Object
- - com.tibco.patterns.learn.training.RLinkDataSet<VectorExample>
  - - com.tibco.patterns.learn.training.VectorSet

- All Implemented Interfaces:
    `java.lang.Iterable<VectorExample>`

      public final class VectorSet
      extends RLinkDataSet<VectorExample>

  A container for storing a set of VectorExample training examples. Each example contains a feature vector and a label.

- - ### Field Summary

    - ### Fields inherited from class com.tibco.patterns.learn.training.RLinkDataSet

      `examples`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `VectorSet​(int nFeatures)` | Creates empty dataset.
    `VectorSet​(int nFeatures, int initialCapacity)` | Creates empty dataset.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `VectorSet` | `createDataSet()` |

    - ### Methods inherited from class com.tibco.patterns.learn.training.RLinkDataSet

      `add, clearPredictions, getNFeatures, iterator, size, toString, verifyDatasetProportion`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### VectorSet

          public VectorSet​(int nFeatures)

      Creates empty dataset.
      Parameters:
        `nFeatures` - - number of model features in each example of this dataset

    - #### VectorSet

          public VectorSet​(int nFeatures,
                           int initialCapacity)

      Creates empty dataset. Use when the number of examples that will be added is already known.
      Parameters:
        `nFeatures` - - number of model features in each example of this dataset
        `initialCapacity` - - number of examples that will be stored in this dataset

  - ### Method Detail

    - #### createDataSet

          public VectorSet createDataSet()

      Specified by:
        `createDataSet` in class `RLinkDataSet<VectorExample>`
      Returns:
        a new empty VectorSet. The number of features is same as for this object.