Class RandomSplitGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.data.splitgenerator.generic.randomsplit.RandomSplitGenerator
-
- All Implemented Interfaces:
LoggingLevelHandler,LoggingSupporter,SizeOfHandler,Serializable
public class RandomSplitGenerator extends CustomLoggingLevelObject
Generates generic random splits.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Randomizationm_Randomizationthe randomization scheme.protected Splitterm_Splitterthe splitter scheme.-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description RandomSplitGenerator()Initializes the cross-validation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> SplitPair<Binnable<T>>generate(List<Binnable<T>> data)Generates the split.RandomizationgetRandomization()Returns the randomization scheme in use.SplittergetSplitter()Returns the splitter scheme in use.voidreset()Resets the scheme.voidsetRandomization(Randomization value)Sets the randomization scheme to use.voidsetSplitter(Splitter value)Sets the splitter scheme to use.-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Randomization
protected Randomization m_Randomization
the randomization scheme.
-
m_Splitter
protected Splitter m_Splitter
the splitter scheme.
-
-
Method Detail
-
reset
public void reset()
Resets the scheme.
-
setRandomization
public void setRandomization(Randomization value)
Sets the randomization scheme to use.- Parameters:
value- the scheme
-
getRandomization
public Randomization getRandomization()
Returns the randomization scheme in use.- Returns:
- the scheme
-
setSplitter
public void setSplitter(Splitter value)
Sets the splitter scheme to use.- Parameters:
value- the scheme
-
getSplitter
public Splitter getSplitter()
Returns the splitter scheme in use.- Returns:
- the scheme
-
generate
public <T> SplitPair<Binnable<T>> generate(List<Binnable<T>> data)
Generates the split. Temporarily adds the original index to the Binnable meta-data, usingWrapping.TMP_INDEXas key.- Type Parameters:
T- the payload type- Parameters:
data- the data to generate the pairs from- Returns:
- the fold pairs
-
-