Class InstanceList.StratifiedCrossValidationIterator

  • All Implemented Interfaces:, java.util.Iterator<InstanceList[]>
    Enclosing class:

    public class InstanceList.StratifiedCrossValidationIterator
    extends InstanceList.CrossValidationIterator
    StratifiedCrossValidationIterator allows iterating over pairs of InstanceList, 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.

    George Valkanas (
    See Also:
    Serialized Form
    • Constructor Detail

      • StratifiedCrossValidationIterator

        public StratifiedCrossValidationIterator​(int numFolds)
      • StratifiedCrossValidationIterator

        public StratifiedCrossValidationIterator​(int numFolds,
                                                 int seed)