Interface DataSetIterator
-
- All Superinterfaces:
Iterator<DataSet>,Serializable
- All Known Subinterfaces:
ParallelDataSetIterator
- All Known Implementing Classes:
AsyncDataSetIterator,BaseDatasetIterator,CachingDataSetIterator,ExistingMiniBatchDataSetIterator,KFoldIterator,MiniBatchFileDataSetIterator,MultipleEpochsIterator,SamplingDataSetIterator,SingletonDataSetIterator,TestDataSetIterator,ViewIterator
public interface DataSetIterator extends Iterator<DataSet>, Serializable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanasyncSupported()Does this DataSetIterator support asynchronous prefetching of multiple DataSet objects? Most DataSetIterators do, but in some cases it may not make sense to wrap this iterator in an iterator that does asynchronous prefetching.intbatch()Batch sizeList<String>getLabels()Get dataset iterator class labels, if any.DataSetPreProcessorgetPreProcessor()Returns preprocessors, if definedintinputColumns()Input columns for the datasetDataSetnext(int num)Like the standard next method but allows a customizable number of examples returnedvoidreset()Resets the iterator back to the beginningbooleanresetSupported()Is resetting supported by this DataSetIterator? Many DataSetIterators do support resetting, but some don'tvoidsetPreProcessor(DataSetPreProcessor preProcessor)Set a pre processorinttotalOutcomes()The number of labels for the dataset-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
-
-
-
Method Detail
-
next
DataSet next(int num)
Like the standard next method but allows a customizable number of examples returned- Parameters:
num- the number of examples- Returns:
- the next data applyTransformToDestination
-
inputColumns
int inputColumns()
Input columns for the dataset- Returns:
-
totalOutcomes
int totalOutcomes()
The number of labels for the dataset- Returns:
-
resetSupported
boolean resetSupported()
Is resetting supported by this DataSetIterator? Many DataSetIterators do support resetting, but some don't- Returns:
- true if reset method is supported; false otherwise
-
asyncSupported
boolean asyncSupported()
Does this DataSetIterator support asynchronous prefetching of multiple DataSet objects? Most DataSetIterators do, but in some cases it may not make sense to wrap this iterator in an iterator that does asynchronous prefetching. For example, it would not make sense to use asynchronous prefetching for the following types of iterators: (a) Iterators that store their full contents in memory already (b) Iterators that re-use features/labels arrays (as future next() calls will overwrite past contents) (c) Iterators that already implement some level of asynchronous prefetching (d) Iterators that may return different data depending on when the next() method is called- Returns:
- true if asynchronous prefetching from this iterator is OK; false if asynchronous prefetching should not be used with this iterator
-
reset
void reset()
Resets the iterator back to the beginning
-
batch
int batch()
Batch size- Returns:
-
setPreProcessor
void setPreProcessor(DataSetPreProcessor preProcessor)
Set a pre processor- Parameters:
preProcessor- a pre processor to set
-
getPreProcessor
DataSetPreProcessor getPreProcessor()
Returns preprocessors, if defined- Returns:
-
-