Class WekaForecasterGenerator

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, SizeOfHandler, Serializable

    public class WekaForecasterGenerator
    extends AbstractForecasterGenerator
    Outputs a configured instance of a Weka Forecaster.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -classifier <weka.classifiers.Classifier> (property: classifier)
        The Weka classifier to train on the input data.
        default: weka.classifiers.functions.LinearRegression -S 0 -R 1.0E-8
     
    -forecast-fields <java.lang.String> (property: forecastFields)
        The fields to forecast (comma-separated list).
        default: Value
     
    -overlay-fields <java.lang.String> (property: overlayFields)
        The fields to overlay (comma-separated list).
        default: 
     
    -lag-maker <adams.flow.core.LagMakerOptions> (property: lagMaker)
        The lag maker options.
        default: adams.flow.core.LagMakerOptions
     
    -num-steps-confidence-intervals <int> (property: numStepsConfidenceIntervals)
        The number of steps to generate confidence intervals for.
        default: 0
        minimum: 0
     
    -confidence-level <double> (property: confidenceLevel)
        The confidence level to use (0-1).
        default: 0.95
        minimum: 0.0
        maximum: 1.0
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Classifier

        protected weka.classifiers.Classifier m_Classifier
        the base classifier.
      • m_ForecastFields

        protected String m_ForecastFields
        the fields to forecast (comma-separated list).
      • m_OverlayFields

        protected String m_OverlayFields
        the fields to overlay (comma-separated list).
      • m_NumStepsConfidenceIntervals

        protected int m_NumStepsConfidenceIntervals
        the number of steps for confidence intervals.
      • m_ConfidenceLevel

        protected double m_ConfidenceLevel
        the confidence level (0-1).
    • Constructor Detail

      • WekaForecasterGenerator

        public WekaForecasterGenerator()
    • Method Detail

      • setClassifier

        public void setClassifier​(weka.classifiers.Classifier value)
        Sets the classifier to use.
        Parameters:
        value - the classifier
      • getClassifier

        public weka.classifiers.Classifier getClassifier()
        Returns the classifier in use.
        Returns:
        the classifier
      • classifierTipText

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

        public void setForecastFields​(String value)
        Sets the fields to forecast.
        Parameters:
        value - the fields (comma-separated list)
      • getForecastFields

        public String getForecastFields()
        Returns the fields to forecast.
        Returns:
        the fields (comma-separated list)
      • forecastFieldsTipText

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

        public void setOverlayFields​(String value)
        Sets the fields to overlay.
        Parameters:
        value - the fields (comma-separated list)
      • getOverlayFields

        public String getOverlayFields()
        Returns the fields to overlay.
        Returns:
        the fields (comma-separated list)
      • overlayFieldsTipText

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

        public void setNumStepsConfidenceIntervals​(int value)
        Sets the number of steps to generate confidence intervals for.
        Parameters:
        value - the number of steps
      • getNumStepsConfidenceIntervals

        public int getNumStepsConfidenceIntervals()
        Returns the number of steps to generate confidence intervals for.
        Returns:
        the number of steps
      • numStepsConfidenceIntervalsTipText

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

        public void setConfidenceLevel​(double value)
        Sets the confidence level to use.
        Parameters:
        value - the level
      • getConfidenceLevel

        public double getConfidenceLevel()
        Returns the confidence level (0-1).
        Returns:
        the level
      • confidenceLevelTipText

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

        public void setLagMaker​(LagMakerOptions value)
        Sets the lag options to use.
        Parameters:
        value - the lag options
      • getLagMaker

        public LagMakerOptions getLagMaker()
        Returns the lag options.
        Returns:
        the lag options
      • lagMakerTipText

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

        public weka.classifiers.timeseries.AbstractForecaster generate()
                                                                throws Exception
        Generates an instance of a AbstractForecaster.
        Specified by:
        generate in class AbstractForecasterGenerator
        Returns:
        the forecaster instance
        Throws:
        Exception - if the setup fails