Class StratifiedCrossValidation

  • All Implemented Interfaces:

    public class StratifiedCrossValidation
    extends AbstractHoldout
    A stratified n-fold crossvalidation to distribute the data to n buckets where each bucket exhibits approximately the same distribution of classes as does the complete data set. The buckets are disjoint. The distribution is deterministic.
    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, sizes
      • sizes

        protected int[] sizes
        Partition assignment, sizes
    • Constructor Detail

      • StratifiedCrossValidation

        public StratifiedCrossValidation​(int nfold)
        Provides a stratified crossvalidation. Setting parameter N_P to the OptionHandler.
    • Method Detail

      • numberOfPartitions

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

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