Package adams.flow.container
Class WekaTrainTestSetContainer
- java.lang.Object
-
- adams.flow.container.AbstractContainer
-
- adams.flow.container.WekaTrainTestSetContainer
-
- All Implemented Interfaces:
CloneHandler<Container>,GlobalInfoSupporter,SpreadSheetSupporter,Container,Serializable
public class WekaTrainTestSetContainer extends AbstractContainer
A container for storing train and test set.
Optionally, random seed, fold number and fold count can be stored as well.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringVALUE_FOLD_COUNTthe identifier for the fold count.static StringVALUE_FOLD_NUMBERthe identifier for the fold number.static StringVALUE_SEEDthe identifier for the random seed.static StringVALUE_TESTthe identifier for the test data.static StringVALUE_TEST_ORIGINALINDICESthe identifier for the original indices (test).static StringVALUE_TRAINthe identifier for the training data.static StringVALUE_TRAIN_ORIGINALINDICESthe identifier for the original indices (train).-
Fields inherited from class adams.flow.container.AbstractContainer
m_AdditionalNames, m_Help, m_Values
-
-
Constructor Summary
Constructors Constructor Description WekaTrainTestSetContainer()Initializes the container.WekaTrainTestSetContainer(weka.core.Instances train, weka.core.Instances test)Initializes the container.WekaTrainTestSetContainer(weka.core.Instances train, weka.core.Instances test, Long seed)Initializes the container.WekaTrainTestSetContainer(weka.core.Instances train, weka.core.Instances test, Long seed, Integer foldNumber, Integer foldCount)Initializes the container.WekaTrainTestSetContainer(weka.core.Instances train, weka.core.Instances test, Long seed, Integer foldNumber, Integer foldCount, int[] trainOriginal, int[] testOriginal)Initializes the container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinitHelp()Initializes the help strings.booleanisValid()Checks whether the setup of the container is valid.Iterator<String>names()Returns all value names that can be used (theoretically).-
Methods inherited from class adams.flow.container.AbstractContainer
addAdditionalName, addHelp, addHelp, addHelp, checkDefaultConstructor, getClone, getHelp, getValue, getValue, globalInfo, hasHelp, hasValue, isValidName, removeAdditionalName, setValue, store, stored, toSpreadSheet, toString
-
-
-
-
Field Detail
-
VALUE_TRAIN
public static final String VALUE_TRAIN
the identifier for the training data.- See Also:
- Constant Field Values
-
VALUE_TRAIN_ORIGINALINDICES
public static final String VALUE_TRAIN_ORIGINALINDICES
the identifier for the original indices (train).- See Also:
- Constant Field Values
-
VALUE_TEST
public static final String VALUE_TEST
the identifier for the test data.- See Also:
- Constant Field Values
-
VALUE_TEST_ORIGINALINDICES
public static final String VALUE_TEST_ORIGINALINDICES
the identifier for the original indices (test).- See Also:
- Constant Field Values
-
VALUE_SEED
public static final String VALUE_SEED
the identifier for the random seed.- See Also:
- Constant Field Values
-
VALUE_FOLD_NUMBER
public static final String VALUE_FOLD_NUMBER
the identifier for the fold number.- See Also:
- Constant Field Values
-
VALUE_FOLD_COUNT
public static final String VALUE_FOLD_COUNT
the identifier for the fold count.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WekaTrainTestSetContainer
public WekaTrainTestSetContainer()
Initializes the container.
Only used for generating help information.
-
WekaTrainTestSetContainer
public WekaTrainTestSetContainer(weka.core.Instances train, weka.core.Instances test)Initializes the container.- Parameters:
train- the training settest- the test data
-
WekaTrainTestSetContainer
public WekaTrainTestSetContainer(weka.core.Instances train, weka.core.Instances test, Long seed)Initializes the container.- Parameters:
train- the training settest- the test dataseed- the seed value, can be null
-
WekaTrainTestSetContainer
public WekaTrainTestSetContainer(weka.core.Instances train, weka.core.Instances test, Long seed, Integer foldNumber, Integer foldCount)Initializes the container.- Parameters:
train- the training settest- the test dataseed- the seed value, can be nullfoldNumber- the fold numberfoldCount- the fold count
-
WekaTrainTestSetContainer
public WekaTrainTestSetContainer(weka.core.Instances train, weka.core.Instances test, Long seed, Integer foldNumber, Integer foldCount, int[] trainOriginal, int[] testOriginal)Initializes the container.- Parameters:
train- the training settest- the test dataseed- the seed value, can be nullfoldNumber- the fold numberfoldCount- the fold count
-
-
Method Detail
-
initHelp
protected void initHelp()
Initializes the help strings.- Overrides:
initHelpin classAbstractContainer
-
names
public Iterator<String> names()
Returns all value names that can be used (theoretically).- Specified by:
namesin interfaceContainer- Specified by:
namesin classAbstractContainer- Returns:
- enumeration over all possible value names
-
isValid
public boolean isValid()
Checks whether the setup of the container is valid.- Specified by:
isValidin interfaceContainer- Specified by:
isValidin classAbstractContainer- Returns:
- true if all the necessary values are available
-
-