Class WekaTrainTestSetContainer

  • All Implemented Interfaces:
    adams.core.CloneHandler<adams.flow.container.Container>, adams.core.GlobalInfoSupporter, adams.data.spreadsheet.SpreadSheetSupporter, adams.flow.container.Container, Serializable

    public class WekaTrainTestSetContainer
    extends adams.flow.container.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
    • 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
      • 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 set
        test - the test data
        seed - the seed value, can be null
        foldNumber - the fold number
        foldCount - the fold count
    • Method Detail

      • initHelp

        protected void initHelp()
        Initializes the help strings.
        Overrides:
        initHelp in class adams.flow.container.AbstractContainer
      • names

        public Iterator<String> names()
        Returns all value names that can be used (theoretically).
        Specified by:
        names in interface adams.flow.container.Container
        Specified by:
        names in class adams.flow.container.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 interface adams.flow.container.Container
        Specified by:
        isValid in class adams.flow.container.AbstractContainer
        Returns:
        true if all the necessary values are available