Class RandomizedCrossValidation

  • All Implemented Interfaces:
    Holdout

    public class RandomizedCrossValidation
    extends RandomizedHoldout
    RandomizedCrossValidation provides a set of partitions of a database to perform cross-validation. The test sets are not 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.
    • Constructor Detail

      • RandomizedCrossValidation

        public RandomizedCrossValidation​(RandomFactory random,
                                         int nfold)
        Constructor for n-fold cross-validation.
        Parameters:
        random - Random seed
        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