org.encog.ml.data.buffer
public class BufferedMLDataSet extends Object implements MLDataSet, Serializable
Modifier and Type | Field and Description |
---|---|
static String |
ERROR_ADD
Error message for ADD.
|
static String |
ERROR_REMOVE
Error message for REMOVE.
|
Constructor and Description |
---|
BufferedMLDataSet(File binaryFile)
Construct the dataset using the specified binary file.
|
Modifier and Type | Method and Description |
---|---|
void |
add(MLData data1)
Add only input data, for an unsupervised dataset.
|
void |
add(MLData inputData,
MLData idealData)
Add both the input and ideal data.
|
void |
add(MLDataPair pair)
Add a data pair of both input and ideal data.
|
void |
beginLoad(int inputSize,
int idealSize)
Begin loading to the binary file.
|
void |
close()
Close the dataset.
|
void |
endLoad()
This method should be called once all the data has been loaded.
|
MLDataPair |
get(int index) |
EncogEGBFile |
getEGB() |
File |
getFile() |
int |
getIdealSize() |
int |
getInputSize() |
BufferedMLDataSet |
getOwner() |
void |
getRecord(long index,
MLDataPair pair)
Read an individual record.
|
long |
getRecordCount()
Determine the total number of records in the set.
|
boolean |
isSupervised() |
Iterator<MLDataPair> |
iterator() |
void |
load(MLDataSet training)
Load the specified training set.
|
MLDataSet |
loadToMemory()
Load the binary dataset to memory.
|
void |
open()
Open the binary file for reading.
|
BufferedMLDataSet |
openAdditional()
Opens an additional instance of this dataset.
|
void |
removeAdditional(BufferedMLDataSet child)
Remove an additional dataset that was created.
|
void |
setOwner(BufferedMLDataSet theOwner)
Set the owner of this dataset.
|
int |
size() |
public static final String ERROR_ADD
public static final String ERROR_REMOVE
public BufferedMLDataSet(File binaryFile)
binaryFile
- The file to use.public void open()
public Iterator<MLDataPair> iterator()
iterator
in interface Iterable<MLDataPair>
public long getRecordCount()
MLDataSet
getRecordCount
in interface MLDataSet
public void getRecord(long index, MLDataPair pair)
public BufferedMLDataSet openAdditional()
MLDataSet
openAdditional
in interface MLDataSet
public void add(MLData data1)
public void add(MLDataPair pair)
public int getIdealSize()
getIdealSize
in interface MLDataSet
public int getInputSize()
getInputSize
in interface MLDataSet
public boolean isSupervised()
isSupervised
in interface MLDataSet
public BufferedMLDataSet getOwner()
public void setOwner(BufferedMLDataSet theOwner)
theOwner
- The owner.public void removeAdditional(BufferedMLDataSet child)
child
- The additional dataset to remove.public void beginLoad(int inputSize, int idealSize)
inputSize
- The input size.idealSize
- The ideal size.public void endLoad()
public File getFile()
public EncogEGBFile getEGB()
public MLDataSet loadToMemory()
public void load(MLDataSet training)
training
- The training set to load.public MLDataPair get(int index)
Copyright © 2014. All Rights Reserved.