Class DisjointCrossValidation

  • All Implemented Interfaces:
    Holdout

    public class DisjointCrossValidation
    extends RandomizedHoldout
    DisjointCrossValidation provides a set of partitions of a database to perform cross-validation. The test sets are guaranteed to be disjoint.
    Since:
    0.7.0
    Author:
    Arthur Zimek
    • Field Detail

      • nfold

        protected int nfold
        Holds the number of folds, current fold.
      • fold

        protected int fold
        Holds the number of folds, current fold.
      • assignment

        protected int[] assignment
        Partition assignment and size.
      • sizes

        protected int[] sizes
        Partition assignment and size.
    • Constructor Detail

      • DisjointCrossValidation

        public DisjointCrossValidation​(RandomFactory random,
                                       int nfold)
        Constructor.
        Parameters:
        random - Random seeding
        nfold - Number of folds.
    • Method Detail

      • numberOfPartitions

        public int numberOfPartitions()
        Description copied from interface: Holdout
        How many partitions to test.
        Returns:
        Number of partitions.
      • nextPartitioning

        public TrainingAndTestSet nextPartitioning()
        Description copied from interface: Holdout
        Get the next partitioning of the given holdout.
        Returns:
        Next partitioning of the data set