org.encog.ml.data.versatile
public class MatrixMLDataSet extends Object implements MLDataSet
Modifier and Type | Class and Description |
---|---|
class |
MatrixMLDataSet.MatrixMLDataSetIterator
An iterator to be used with the MatrixMLDataSet.
|
Constructor and Description |
---|
MatrixMLDataSet()
The default constructor.
|
MatrixMLDataSet(double[][] theData,
int theCalculatedInputSize,
int theCalculatedIdealSize)
Construct the dataset with no mask.
|
MatrixMLDataSet(double[][] theData,
int inputCount,
int idealCount,
int[] theMask)
Construct the dataset from a 2D double array..
|
MatrixMLDataSet(MatrixMLDataSet data,
int[] mask)
Construct the dataset from another matrix dataset.
|
Modifier and Type | Method and Description |
---|---|
void |
add(MLData data1)
Add a object to the dataset.
|
void |
add(MLData inputData,
MLData idealData)
Add a set of input and ideal data to the dataset.
|
void |
add(MLDataPair inputData)
Add a an object to the dataset.
|
void |
close()
Close this datasource and release any resources obtained by it, including
any iterators created.
|
MLDataPair |
get(int index) |
int |
getCalculatedIdealSize() |
int |
getCalculatedInputSize() |
double[][] |
getData() |
int |
getIdealSize() |
int |
getInputSize() |
int |
getLagWindowSize() |
int |
getLeadWindowSize() |
int[] |
getMask() |
void |
getRecord(long index,
MLDataPair pair)
Read an individual record, specified by index, in random order.
|
long |
getRecordCount()
Determine the total number of records in the set.
|
boolean |
isSupervised() |
Iterator<MLDataPair> |
iterator() |
MLDataSet |
openAdditional()
Opens an additional instance of this dataset.
|
void |
setCalculatedIdealSize(int calculatedIdealSize) |
void |
setCalculatedInputSize(int calculatedInputSize) |
void |
setData(double[][] data) |
void |
setLagWindowSize(int lagWindowSize) |
void |
setLeadWindowSize(int leadWindowSize) |
int |
size() |
public MatrixMLDataSet()
public MatrixMLDataSet(double[][] theData, int theCalculatedInputSize, int theCalculatedIdealSize)
theData
- The backing array.theCalculatedInputSize
- The input size.theCalculatedIdealSize
- The ideal size.public MatrixMLDataSet(double[][] theData, int inputCount, int idealCount, int[] theMask)
theData
- The data.inputCount
- The input count.idealCount
- The ideal count.theMask
- The mask.public MatrixMLDataSet(MatrixMLDataSet data, int[] mask)
theData
- The data.inputCount
- The input count.idealCount
- The ideal count.theMask
- The mask.public int[] getMask()
public Iterator<MLDataPair> iterator()
iterator
in interface Iterable<MLDataPair>
public int getIdealSize()
getIdealSize
in interface MLDataSet
public int getInputSize()
getInputSize
in interface MLDataSet
public boolean isSupervised()
isSupervised
in interface MLDataSet
public long getRecordCount()
getRecordCount
in interface MLDataSet
public void getRecord(long index, MLDataPair pair)
public MLDataSet openAdditional()
openAdditional
in interface MLDataSet
public void add(MLData data1)
public void add(MLData inputData, MLData idealData)
public void add(MLDataPair inputData)
public void close()
public MLDataPair get(int index)
public int getCalculatedInputSize()
public void setCalculatedInputSize(int calculatedInputSize)
calculatedInputSize
- the calculatedInputSize to setpublic int getCalculatedIdealSize()
public void setCalculatedIdealSize(int calculatedIdealSize)
calculatedIdealSize
- the calculatedIdealSize to setpublic double[][] getData()
public void setData(double[][] data)
data
- the data to setpublic int getLagWindowSize()
public void setLagWindowSize(int lagWindowSize)
lagWindowSize
- the lagWindowSize to setpublic int getLeadWindowSize()
public void setLeadWindowSize(int leadWindowSize)
leadWindowSize
- the leadWindowSize to setCopyright © 2014. All Rights Reserved.