Class WekaExperiment

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ErrorHandler, InputConsumer, OutputProducer, Serializable, Comparable

    public class WekaExperiment
    extends AbstractTransformer
    Represents a Weka experiment, stored in a file. Can be setup from inside the flow.
    Via the input port, additional datasets can be inserted into the experiment. This allows one to define a template experiment and then just run it over various datasets without every having to change the experiment setup itself.

    Input/output:
    - accepts:
       adams.flow.core.Unknown
       java.io.File
       java.io.File[]
       java.lang.String
       java.lang.String[]
    - generates:
       weka.experiment.Experiment


    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to
        the console (0 = off).
        default: 0
        minimum: 0
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: Experiment
     
    -annotation <adams.core.base.BaseText> (property: annotations)
        The annotations to attach to this actor.
        default:
     
    -skip (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded
        as it is.
     
    -file <adams.data.ExperimentFile> (property: experimentFile)
        The file the experiment is stored in.
        default: .
     
    -no-check (property: noCheck)
        If set to true, the experiment file must not be present at setUp-time; necessary
        if file gets generated on-the-fly.
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_NoCheck

        protected boolean m_NoCheck
        whether not to check for experiment file to exist (e.g., when it generated on the fly).
    • Constructor Detail

      • WekaExperiment

        public WekaExperiment()
    • Method Detail

      • setExperimentFile

        public void setExperimentFile​(WekaExperimentFile value)
        Sets the file the experiment is stored in.
        Parameters:
        value - the file
      • getExperimentFile

        public WekaExperimentFile getExperimentFile()
        Returns the file the experiment is stored in.
        Returns:
        the file
      • experimentFileTipText

        public String experimentFileTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setNoCheck

        public void setNoCheck​(boolean value)
        Sets whether to avoid the check at setUp time whether the experiment file is present or not.
        Parameters:
        value - true if the file need not be there
      • getNoCheck

        public boolean getNoCheck()
        Returns whether to avoid the check at setUp time whether the experiment file is present or not.
        Returns:
        true if the file need not be there
      • noCheckTipText

        public String noCheckTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Returns:
        adams.flow.core.Unknown.class, java.io.File.class, java.io.File[].class, java.lang.String.class, java.lang.String[].class
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
        Returns:
        weka.experiment.Experiment.class