Class DefaultCrossValidationFoldGenerator

    • Field Detail

      • m_NumFolds

        protected int m_NumFolds
        the number of folds.
      • m_ActualNumFolds

        protected int m_ActualNumFolds
        the actual number of folds.
      • m_Stratify

        protected boolean m_Stratify
        whether to stratify the data (in case of nominal class).
      • m_CurrentFold

        protected transient int m_CurrentFold
        the current fold.
      • m_Randomize

        protected boolean m_Randomize
        whether to randomize the data.
    • Constructor Detail

      • DefaultCrossValidationFoldGenerator

        public DefaultCrossValidationFoldGenerator()
        Initializes the generator.
      • DefaultCrossValidationFoldGenerator

        public DefaultCrossValidationFoldGenerator​(Dataset data,
                                                   int numFolds,
                                                   long seed,
                                                   boolean stratify)
        Initializes the generator.
        Parameters:
        data - the full dataset
        numFolds - the number of folds, leave-one-out if less than 2
        seed - the seed for randomization
        stratify - whether to perform stratified CV
      • DefaultCrossValidationFoldGenerator

        public DefaultCrossValidationFoldGenerator​(Dataset data,
                                                   int numFolds,
                                                   long seed,
                                                   boolean randomize,
                                                   boolean stratify)
        Initializes the generator.
        Parameters:
        data - the full dataset
        numFolds - the number of folds, leave-one-out if less than 2
        seed - the seed value
        randomize - whether to randomize the data
        stratify - whether to perform stratified CV