Package adams.data.splitgenerator
Interface SplitGenerator<I,O>
-
- Type Parameters:
I
- the input dataO
- the output data
- All Superinterfaces:
Destroyable
,Iterator<O>
,OptionHandler
,Randomizable
,Serializable
- All Known Subinterfaces:
CrossValidationFoldGenerator<I,O>
,CrossValidationFoldGenerator
,RandomSplitGenerator<I,O>
,RandomSplitGenerator
,SplitGenerator
,StratifiableSplitGenerator<I,O>
- All Known Implementing Classes:
AbstractSplitGenerator
,AbstractSplitGenerator
,BestBinnedNumericClassRandomSplitGenerator
,BinnedNumericClassCrossValidationFoldGenerator
,BinnedNumericClassRandomSplitGenerator
,DefaultCrossValidationFoldGenerator
,DefaultCrossValidationFoldGenerator
,DefaultRandomSplitGenerator
,DefaultRandomSplitGenerator
,GroupedBinnedNumericClassCrossValidationFoldGenerator
,GroupedBinnedNumericClassRandomSplitGenerator
,GroupedCrossValidationFoldGenerator
,GroupedCrossValidationFoldGeneratorUsingNumericClassValues
,GroupedRandomSplitGenerator
,LeaveOneOutByValueGenerator
,MultiLevelSplitGenerator
public interface SplitGenerator<I,O> extends Serializable, OptionHandler, Iterator<O>, Randomizable
Interface for classes that generate dataset splits.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description I
getData()
Returns the original data.boolean
hasNext()
Returns true if the iteration has more elements.void
initializeIterator()
Initializes the iterator (gets implicitly called, when calling next()).O
next()
Returns the next element in the iteration.void
remove()
Unsupported.void
setData(I value)
Sets the original data.String
toString()
Returns a short description of the generator.-
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
-
-
-
-
Method Detail
-
setData
void setData(I value)
Sets the original data.- Parameters:
value
- the data
-
getData
I getData()
Returns the original data.- Returns:
- the data
-
initializeIterator
void initializeIterator()
Initializes the iterator (gets implicitly called, when calling next()).
-
hasNext
boolean hasNext()
Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)
-
next
O next()
Returns the next element in the iteration.- Specified by:
next
in interfaceIterator<I>
- Returns:
- the next element in the iteration.
- Throws:
NoSuchElementException
- iteration has no more elements.
-
-