public class BatchDataSet extends java.lang.Object implements MLDataSet
| Modifier and Type | Class and Description |
|---|---|
class |
BatchDataSet.BatchedMLIterator
An iterator to be used with the BasicMLDataSet.
|
| Constructor and Description |
|---|
BatchDataSet(MLDataSet theDataset,
GenerateRandom theRandom)
Construct the batch dataset.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(MLData data1)
This operation is not supported by this object.
|
void |
add(MLData inputData,
MLData idealData)
This operation is not supported by this object.
|
void |
add(MLDataPair inputData)
This operation is not supported by this object.
|
void |
advance()
Advance to the next batch.
|
void |
close()
Close this datasource and release any resources obtained by it, including
any iterators created.
|
MLDataPair |
get(int index) |
int |
getBatchSize() |
int |
getCurrentIndex() |
int |
getIdealSize() |
int |
getInputSize() |
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 |
isRandomBatches() |
boolean |
isSupervised() |
java.util.Iterator<MLDataPair> |
iterator() |
MLDataSet |
openAdditional()
This will open an additional batched dataset.
|
void |
setBatchSize(int theSize) |
void |
setCurrentIndex(int currentIndex)
Set the current index, within a batch.
|
void |
setRandomBatches(boolean randomBatches)
Set if random batches should be generated.
|
int |
size() |
public BatchDataSet(MLDataSet theDataset, GenerateRandom theRandom)
theDataset - The source dataset.theRandom - The random number generator.public void setBatchSize(int theSize)
theSize - Set the batch size, but not larger than the dataset.public int getBatchSize()
public java.util.Iterator<MLDataPair> iterator()
iterator in interface java.lang.Iterable<MLDataPair>public int getIdealSize()
getIdealSize in interface MLDataSetpublic int getInputSize()
getInputSize in interface MLDataSetpublic boolean isSupervised()
isSupervised in interface MLDataSetpublic long getRecordCount()
getRecordCount in interface MLDataSetpublic void getRecord(long index,
MLDataPair pair)
public MLDataSet openAdditional()
openAdditional in interface MLDataSetpublic 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 void advance()
public int getCurrentIndex()
public void setCurrentIndex(int currentIndex)
currentIndex - The current index, within a batch.public boolean isRandomBatches()
public void setRandomBatches(boolean randomBatches)
randomBatches - True, if random batches should be used.