public class DataSetIteratorSplitter extends Object
| Modifier and Type | Field and Description |
|---|---|
protected DataSetIterator |
backedIterator |
protected AtomicLong |
counter |
protected DataSet |
firstTrain |
protected long |
numArbitrarySets |
protected long |
numTest |
protected long |
numTrain |
protected int |
partNumber |
protected double |
ratio |
protected double[] |
ratios |
protected AtomicBoolean |
resetPending |
protected int[] |
splits |
protected long |
totalExamples |
| Constructor and Description |
|---|
DataSetIteratorSplitter(@NonNull DataSetIterator baseIterator,
int[] splits) |
DataSetIteratorSplitter(@NonNull DataSetIterator baseIterator,
long totalBatches,
double ratio)
The only constructor
|
DataSetIteratorSplitter(@NonNull DataSetIterator baseIterator,
long totalBatches,
double[] ratios) |
| Modifier and Type | Method and Description |
|---|---|
List<DataSetIterator> |
getIterators() |
DataSetIterator |
getTestIterator()
Deprecated.
|
DataSetIterator |
getTrainIterator()
Deprecated.
|
protected DataSetIterator backedIterator
protected final long totalExamples
protected final double ratio
protected final double[] ratios
protected final long numTrain
protected final long numTest
protected final long numArbitrarySets
protected final int[] splits
protected AtomicLong counter
protected AtomicBoolean resetPending
protected DataSet firstTrain
protected int partNumber
public DataSetIteratorSplitter(@NonNull
@NonNull DataSetIterator baseIterator,
long totalBatches,
double ratio)
baseIterator - - iterator to be wrapped and splittotalBatches - - total batches in baseIteratorratio - - train/test split ratiopublic DataSetIteratorSplitter(@NonNull
@NonNull DataSetIterator baseIterator,
long totalBatches,
double[] ratios)
public DataSetIteratorSplitter(@NonNull
@NonNull DataSetIterator baseIterator,
int[] splits)
public List<DataSetIterator> getIterators()
@Deprecated public DataSetIterator getTrainIterator()
@Deprecated public DataSetIterator getTestIterator()
Copyright © 2021. All rights reserved.