Package adams.data.splitgenerator
Interface CrossValidationFoldGenerator<I,O>
-
- Type Parameters:
I
- the input dataO
- the output data
- All Superinterfaces:
Destroyable
,Iterator<O>
,OptionHandler
,Randomizable
,Serializable
,SplitGenerator<I,O>
- All Known Subinterfaces:
CrossValidationFoldGenerator
- All Known Implementing Classes:
BinnedNumericClassCrossValidationFoldGenerator
,DefaultCrossValidationFoldGenerator
,DefaultCrossValidationFoldGenerator
,GroupedBinnedNumericClassCrossValidationFoldGenerator
,GroupedCrossValidationFoldGenerator
,GroupedCrossValidationFoldGeneratorUsingNumericClassValues
public interface CrossValidationFoldGenerator<I,O> extends SplitGenerator<I,O>
Interface for generating cross-validation folds.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int[]
crossValidationIndices()
Returns the cross-validation indices.int
getActualNumFolds()
Returns the actual number of folds used (eg when using LOO).int
getNumFolds()
Returns the number of folds.boolean
getRandomize()
Returns whether to randomize the data.void
setNumFolds(int value)
Sets the number of folds to use.void
setRandomize(boolean value)
Sets whether to randomize the data.-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
Methods inherited from interface adams.core.Randomizable
getSeed, seedTipText, setSeed
-
Methods inherited from interface adams.data.splitgenerator.SplitGenerator
getData, hasNext, initializeIterator, next, remove, setData, toString
-
-
-
-
Method Detail
-
setNumFolds
void setNumFolds(int value)
Sets the number of folds to use.- Parameters:
value
- the number of folds, less than 2 for LOO
-
getNumFolds
int getNumFolds()
Returns the number of folds.- Returns:
- the number of folds
-
getActualNumFolds
int getActualNumFolds()
Returns the actual number of folds used (eg when using LOO).- Returns:
- the actual number of folds
-
setRandomize
void setRandomize(boolean value)
Sets whether to randomize the data.- Parameters:
value
- true if to randomize the data
-
getRandomize
boolean getRandomize()
Returns whether to randomize the data.- Returns:
- true if to randomize the data
-
crossValidationIndices
int[] crossValidationIndices()
Returns the cross-validation indices.- Returns:
- the indices
-
-