public class InstanceList.CrossValidationIterator extends Object implements Iterator, Serializable
CrossValidationIterator allows iterating over pairs of
InstanceList, where each pair is split into training/testing
based on nfolds.| Constructor and Description |
|---|
CrossValidationIterator(int _nfolds) |
CrossValidationIterator(int _nfolds,
int seed) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
Object |
next() |
InstanceList[] |
nextSplit()
Returns the next training/testing split.
|
InstanceList[] |
nextSplit(int numTrainFolds)
Returns the next split, given the number of folds you want in
the training data.
|
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic CrossValidationIterator(int _nfolds,
int seed)
_nfolds - number of folds to split InstanceList intoseed - seed for random number used to split InstanceListpublic CrossValidationIterator(int _nfolds)
public InstanceList[] nextSplit()
InstanceList[0] is the larger split (training)
and InstanceList[1] is the smaller split (testing)public InstanceList[] nextSplit(int numTrainFolds)
Copyright © 2019 JULIE Lab, Germany. All rights reserved.