Class WekaTrainForecaster

  • 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 WekaTrainForecaster
    extends AbstractTransformer
    Trains a forecaster based on the incoming dataset and outputs the built model alongside the training header (in a model container).

    Input/output:
    - accepts:
       weka.core.Instances
    - generates:
       adams.flow.container.WekaForecastModelContainer


    Container information:
    - adams.flow.container.WekaForecastModelContainer: Model, Header, Dataset, Transformed

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: WekaTrainForecaster
     
    -annotation <adams.core.base.BaseText> (property: annotations)
        The annotations to attach to this actor.
        default: 
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
        default: false
     
    -forecaster <adams.flow.core.CallableActorReference> (property: forecaster)
        The Weka forecaster to train on the input data.
        default: WekaForecasterSetup
     
    -store-transformed <boolean> (property: storeTransformed)
        If enabled, the transformed data is stored as well in the output container 
        in case the forecaster implements weka.classifiers.timeseries.core.TSLagUser.
        default: false
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_StoreTransformed

        protected boolean m_StoreTransformed
        whether to store the transformed data as well.
    • Constructor Detail

      • WekaTrainForecaster

        public WekaTrainForecaster()
    • Method Detail

      • setForecaster

        public void setForecaster​(CallableActorReference value)
        Sets the name of the callable forecaster to use.
        Parameters:
        value - the name
      • getForecaster

        public CallableActorReference getForecaster()
        Returns the name of the callable forecaster in use.
        Returns:
        the name
      • forecasterTipText

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

        public void setStoreTransformed​(boolean value)
        Sets whether to store the transformed data as well.
        Parameters:
        value - true if store the transformed data
      • getStoreTransformed

        public boolean getStoreTransformed()
        Returns whether to store the transformed data as well.
        Returns:
        true if transformed data stored
      • storeTransformedTipText

        public String storeTransformedTipText()
        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:
        weka.core.Instances.class
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
        Returns:
        adams.flow.container.WekaForecastModelContainer.class
      • getForecasterInstance

        protected weka.classifiers.timeseries.AbstractForecaster getForecasterInstance()
        Returns an instance of the callable forecaster.
        Returns:
        the forecaster
      • doExecute

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