Package cc.mallet.types
Class InstanceList.StratifiedCrossValidationIterator
- java.lang.Object
-
- cc.mallet.types.InstanceList.CrossValidationIterator
-
- cc.mallet.types.InstanceList.StratifiedCrossValidationIterator
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.Iterator<InstanceList[]>
- Enclosing class:
- InstanceList
public class InstanceList.StratifiedCrossValidationIterator extends InstanceList.CrossValidationIterator
StratifiedCrossValidationIterator
allows iterating over pairs ofInstanceList
, where each pair is split into training/testing based on nfolds, and each fold maintains the distribution properties of the original InstanceList as much as possible.If the target alphabet of this
InstanceList
, which we split for cross validation, is null, then classic cross validation is used instead. TODO: Implement stratified split, even when the target alphabet is null.- Author:
- George Valkanas (lebiathan@gmail.com)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StratifiedCrossValidationIterator(int numFolds)
StratifiedCrossValidationIterator(int numFolds, int seed)
-