public class FileDataSetIterator extends BaseFileIterator<DataSet,DataSetPreProcessor> implements DataSetIterator
batchSize, list, order, position, preProcessor, rng| Constructor and Description |
|---|
FileDataSetIterator(File... rootDirs)
Create a FileDataSetIterator with the following default settings:
- Recursive: files in subdirectories are included - Randomization: order of examples is randomized with a random RNG seed - Batch size: default (as in the stored DataSets - no splitting/combining) - File extensions: no filtering - all files in directory are assumed to be a DataSet |
FileDataSetIterator(File rootDir)
Create a FileDataSetIterator with the following default settings:
- Recursive: files in subdirectories are included - Randomization: order of examples is randomized with a random RNG seed - Batch size: default (as in the stored DataSets - no splitting/combining) - File extensions: no filtering - all files in directory are assumed to be a DataSet |
FileDataSetIterator(File[] rootDirs,
boolean recursive,
Random rng,
int batchSize,
String... validExtensions)
Create a FileDataSetIterator with all settings specified
|
FileDataSetIterator(File rootDir,
boolean recursive,
Random rng,
int batchSize,
String... validExtensions)
Create a FileDataSetIterator with all settings specified
|
FileDataSetIterator(File rootDir,
int batchSize)
Create a FileDataSetIterator with the specified batch size, and the following default settings:
- Recursive: files in subdirectories are included - Randomization: order of examples is randomized with a random RNG seed - File extensions: no filtering - all files in directory are assumed to be a DataSet |
FileDataSetIterator(File rootDir,
int batchSize,
String... validExtensions)
Create a FileDataSetIterator with the specified batch size, filtering based on file extensions, and the
following default settings:
- Recursive: files in subdirectories are included - Randomization: order of examples is randomized with a random RNG seed |
FileDataSetIterator(File rootDir,
String... validExtensions)
Create a FileDataSetIterator with filtering based on file extensions, and the following default settings:
- Recursive: files in subdirectories are included - Randomization: order of examples is randomized with a random RNG seed - Batch size: default (as in the stored DataSets - no splitting/combining) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyPreprocessor(DataSet toPreProcess) |
int |
batch() |
int |
inputColumns() |
protected DataSet |
load(File f) |
protected DataSet |
merge(List<DataSet> toMerge) |
DataSet |
next(int num) |
protected long |
sizeOf(DataSet of) |
protected List<DataSet> |
split(DataSet toSplit) |
int |
totalOutcomes() |
asyncSupported, hasNext, mergeAndStoreRemainder, next, remove, reset, resetSupportedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasyncSupported, getLabels, getPreProcessor, reset, resetSupported, setPreProcessorforEachRemaining, hasNext, next, removepublic FileDataSetIterator(File rootDir)
rootDir - Root directory containing the DataSet objectspublic FileDataSetIterator(File... rootDirs)
rootDirs - Root directories containing the DataSet objects. DataSets from all of these directories will
be included in the iterator outputpublic FileDataSetIterator(File rootDir, int batchSize)
rootDir - Root directory containing the saved DataSet objectsbatchSize - Batch size. If > 0, DataSets will be split/recombined as required. If <= 0, DataSets will
simply be loaded and returned unmodifiedpublic FileDataSetIterator(File rootDir, String... validExtensions)
rootDir - Root directory containing the saved DataSet objectsvalidExtensions - May be null. If non-null, only files with one of the specified extensions will be usedpublic FileDataSetIterator(File rootDir, int batchSize, String... validExtensions)
rootDir - Root directory containing the saved DataSet objectsbatchSize - Batch size. If > 0, DataSets will be split/recombined as required. If <= 0, DataSets will
simply be loaded and returned unmodifiedvalidExtensions - May be null. If non-null, only files with one of the specified extensions will be usedpublic FileDataSetIterator(File rootDir, boolean recursive, Random rng, int batchSize, String... validExtensions)
rootDir - Root directory containing the saved DataSet objectsrecursive - If true: include files in subdirectoriesrng - May be null. If non-null, use this to randomize orderbatchSize - Batch size. If > 0, DataSets will be split/recombined as required. If <= 0, DataSets will
simply be loaded and returned unmodifiedvalidExtensions - May be null. If non-null, only files with one of the specified extensions will be usedpublic FileDataSetIterator(File[] rootDirs, boolean recursive, Random rng, int batchSize, String... validExtensions)
rootDirs - Root directories containing the DataSet objects. DataSets from all of these directories will
be included in the iterator outputrecursive - If true: include files in subdirectoriesrng - May be null. If non-null, use this to randomize orderbatchSize - Batch size. If > 0, DataSets will be split/recombined as required. If <= 0, DataSets will
simply be loaded and returned unmodifiedvalidExtensions - May be null. If non-null, only files with one of the specified extensions will be usedprotected DataSet load(File f)
load in class BaseFileIterator<DataSet,DataSetPreProcessor>protected long sizeOf(DataSet of)
sizeOf in class BaseFileIterator<DataSet,DataSetPreProcessor>protected List<DataSet> split(DataSet toSplit)
split in class BaseFileIterator<DataSet,DataSetPreProcessor>protected DataSet merge(List<DataSet> toMerge)
merge in class BaseFileIterator<DataSet,DataSetPreProcessor>protected void applyPreprocessor(DataSet toPreProcess)
applyPreprocessor in class BaseFileIterator<DataSet,DataSetPreProcessor>public DataSet next(int num)
next in interface DataSetIteratorpublic int inputColumns()
inputColumns in interface DataSetIteratorpublic int totalOutcomes()
totalOutcomes in interface DataSetIteratorpublic int batch()
batch in interface DataSetIteratorCopyright © 2021. All rights reserved.