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:
- java.lang.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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidanalyze()Analyze the input and determine max, min, mean, etc.voiddefineInput(ColumnDefinition col)Define an input column.voiddefineMultipleOutputsOthersInput(ColumnDefinition[] outputColumns)Define multiple output columns, all others as inputs.voiddefineOutput(ColumnDefinition col)Define an output column.voiddefineSingleOutputOthersInput(ColumnDefinition outputColumn)Define a single column as an output column, all others as inputs.ColumnDefinitiondefineSourceColumn(java.lang.String name, ColumnType colType)Define a source column.ColumnDefinitiondefineSourceColumn(java.lang.String name, int index, ColumnType colType)Define a source column.voiddivide(java.util.List<DataDivision> dataDivisionList, boolean shuffle, GenerateRandom rnd)Divide, and optionally shuffle, the dataset.NormalizationHelpergetNormHelper()voidnormalize()Normalize the data set, and allocate memory to hold it.voidsetNormHelper(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
-
-
-
-
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(java.lang.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(java.util.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(java.lang.String name, ColumnType colType)
Define a source column.- Parameters:
name- The name of the source column.colType- The column type.- Returns:
- The column definition.
-
defineMultipleOutputsOthersInput
public void defineMultipleOutputsOthersInput(ColumnDefinition[] outputColumns)
Define multiple output columns, all others as inputs.- Parameters:
outputColumns- The output columns.
-
-
DMelt 3.0 © DataMelt by jWork.ORG