org.encog.ml.data.versatile

## Class VersatileMLDataSet

- java.lang.Object
- - org.encog.ml.data.versatile.MatrixMLDataSet
  - - org.encog.ml.data.versatile.VersatileMLDataSet

- All Implemented Interfaces:
    Iterable<MLDataPair>, MLDataSet

      public class VersatileMLDataSet
      extends MatrixMLDataSet

  The versatile dataset supports several advanced features. 1. it can directly read and normalize from a CSV file. 2. It supports virtual time-boxing for time series data (the data is NOT expanded in memory). 3. It can easily be segmented into smaller datasets.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.encog.ml.data.versatile.MatrixMLDataSet

      `MatrixMLDataSet.MatrixMLDataSetIterator`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VersatileMLDataSet(VersatileDataSource theSource)` Construct the data source.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `analyze()` Analyze the input and determine max, min, mean, etc.
    `void` | `defineInput(ColumnDefinition col)` Define an input column.
    `void` | `defineOutput(ColumnDefinition col)` Define an output column.
    `void` | `defineSingleOutputOthersInput(ColumnDefinition outputColumn)` Define a single column as an output column, all others as inputs.
    `ColumnDefinition` | `defineSourceColumn(String name, ColumnType colType)` Define a source column.
    `ColumnDefinition` | `defineSourceColumn(String name, int index, ColumnType colType)` Define a source column.
    `void` | `divide(List<DataDivision> dataDivisionList, boolean shuffle, GenerateRandom rnd)` Divide, and optionally shuffle, the dataset.
    `NormalizationHelper` | `getNormHelper()`
    `void` | `normalize()` Normalize the data set, and allocate memory to hold it.
    `void` | `setNormHelper(NormalizationHelper helper)`

    - ### Methods inherited from class org.encog.ml.data.versatile.MatrixMLDataSet

      `add, add, add, close, get, getCalculatedIdealSize, getCalculatedInputSize, getData, getIdealSize, getInputSize, getLagWindowSize, getLeadWindowSize, getMask, getRecord, getRecordCount, isSupervised, iterator, openAdditional, setCalculatedIdealSize, setCalculatedInputSize, setData, setLagWindowSize, setLeadWindowSize, size`

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

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

- - ### Constructor Detail

    - #### VersatileMLDataSet

          public VersatileMLDataSet(VersatileDataSource theSource)

      Construct the data source.
      Parameters:
        `theSource` - The data source.

  - ### Method Detail

    - #### analyze

          public void analyze()

      Analyze the input and determine max, min, mean, etc.

    - #### normalize

          public void normalize()

      Normalize the data set, and allocate memory to hold it.

    - #### defineSourceColumn

          public ColumnDefinition defineSourceColumn(String name,
                                            int index,
                                            ColumnType colType)

      Define a source column. Used when the file does not contain headings.
      Parameters:
        `name` - The name of the column.
        `index` - The index of the column.
        `colType` - The column type.
      Returns:
        The column definition.

    - #### getNormHelper

          public NormalizationHelper getNormHelper()

      Returns:
        the helper

    - #### setNormHelper

          public void setNormHelper(NormalizationHelper helper)

      Parameters:
        `helper` - the helper to set

    - #### divide

          public void divide(List<DataDivision> dataDivisionList,
                    boolean shuffle,
                    GenerateRandom rnd)

      Divide, and optionally shuffle, the dataset.
      Parameters:
        `dataDivisionList` - The desired divisions.
        `shuffle` - True, if we should shuffle.
        `rnd` - Random number generator, often with a specific seed.

    - #### defineOutput

          public void defineOutput(ColumnDefinition col)

      Define an output column.
      Parameters:
        `col` - The output column.

    - #### defineInput

          public void defineInput(ColumnDefinition col)

      Define an input column.
      Parameters:
        `col` - The input column.

    - #### defineSingleOutputOthersInput

          public void defineSingleOutputOthersInput(ColumnDefinition outputColumn)

      Define a single column as an output column, all others as inputs.
      Parameters:
        `outputColumn` - The output column.

    - #### defineSourceColumn

          public ColumnDefinition defineSourceColumn(String name,
                                            ColumnType colType)

      Define a source column.
      Parameters:
        `name` - The name of the source column.
        `colType` - The column type.
      Returns:
        The column definition.

Copyright © 2014. All Rights Reserved.