adams.flow.container
Class WekaTrainTestSetContainer

java.lang.Object
  extended by adams.flow.container.AbstractContainer
      extended by adams.flow.container.WekaTrainTestSetContainer
All Implemented Interfaces:
CloneHandler<AbstractContainer>, 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: 4584 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
static String VALUE_FOLD_COUNT
          the identifier for the fold count.
static String VALUE_FOLD_NUMBER
          the identifier for the fold number.
static String VALUE_SEED
          the identifier for the random seed.
static String VALUE_TEST
          the identifier for the test data.
static String VALUE_TRAIN
          the identifier for the training data.
 
Fields inherited from class adams.flow.container.AbstractContainer
m_AdditionalNames, m_Values
 
Constructor Summary
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.
 
Method Summary
 boolean isValid()
          Checks whether the setup of the container is valid.
 Enumeration<String> names()
          Returns all value names that can be used (theoretically).
 
Methods inherited from class adams.flow.container.AbstractContainer
addAdditionalName, checkDefaultConstructor, getClone, getValue, hasValue, isValidName, removeAdditionalName, setValue, store, stored, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VALUE_TRAIN

public static final String VALUE_TRAIN
the identifier for the training data.

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_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 set
test - the test data

WekaTrainTestSetContainer

public WekaTrainTestSetContainer(weka.core.Instances train,
                                 weka.core.Instances test,
                                 Long seed)
Initializes the container.

Parameters:
train - the training set
test - the test data
seed - 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 set
test - the test data
seed - the seed value, can be null
foldNumber - the fold number
foldCount - the fold count
Method Detail

names

public Enumeration<String> names()
Returns all value names that can be used (theoretically).

Specified by:
names in class AbstractContainer
Returns:
enumeration over all possible value names

isValid

public boolean isValid()
Checks whether the setup of the container is valid.

Specified by:
isValid in class AbstractContainer
Returns:
true if all the necessary values are available


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.