public class SamplingDataSetIterator extends Object implements DataSetIterator
Constructor and Description |
---|
SamplingDataSetIterator(DataSet sampleFrom,
int batchSize,
int totalNumberSamples) |
SamplingDataSetIterator(DataSet sampleFrom,
int batchSize,
int totalNumberSamples,
boolean replace) |
Modifier and Type | Method and Description |
---|---|
int |
batch()
Batch size
|
int |
cursor()
The current cursor if applicable
|
boolean |
hasNext() |
int |
inputColumns()
Input columns for the dataset
|
DataSet |
next() |
DataSet |
next(int num)
Like the standard next method but allows a
customizable number of examples returned
|
int |
numExamples()
Total number of examples in the dataset
|
void |
remove() |
void |
reset()
Resets the iterator back to the beginning
|
void |
setPreProcessor(DataSetPreProcessor preProcessor)
Set a pre processor
|
int |
totalExamples()
Total examples in the iterator
|
int |
totalOutcomes()
The number of labels for the dataset
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public SamplingDataSetIterator(DataSet sampleFrom, int batchSize, int totalNumberSamples, boolean replace)
sampleFrom
- the dataset to sample frombatchSize
- the batch size to sampletotalNumberSamples
- the sample sizepublic SamplingDataSetIterator(DataSet sampleFrom, int batchSize, int totalNumberSamples)
sampleFrom
- the dataset to sample frombatchSize
- the batch size to sampletotalNumberSamples
- the sample sizepublic int totalExamples()
DataSetIterator
totalExamples
in interface DataSetIterator
public int inputColumns()
DataSetIterator
inputColumns
in interface DataSetIterator
public int totalOutcomes()
DataSetIterator
totalOutcomes
in interface DataSetIterator
public void reset()
DataSetIterator
reset
in interface DataSetIterator
public int batch()
DataSetIterator
batch
in interface DataSetIterator
public int cursor()
DataSetIterator
cursor
in interface DataSetIterator
public int numExamples()
DataSetIterator
numExamples
in interface DataSetIterator
public void setPreProcessor(DataSetPreProcessor preProcessor)
setPreProcessor
in interface DataSetIterator
preProcessor
- a pre processor to setpublic DataSet next(int num)
DataSetIterator
next
in interface DataSetIterator
num
- the number of examplesCopyright © 2015. All Rights Reserved.