Class WekaForecasterGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.source.wekaforecastersetup.AbstractForecasterGenerator
-
- adams.flow.source.wekaforecastersetup.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 Summary
Fields Modifier and Type Field Description protected weka.classifiers.Classifierm_Classifierthe base classifier.protected doublem_ConfidenceLevelthe confidence level (0-1).protected Stringm_ForecastFieldsthe fields to forecast (comma-separated list).protected LagMakerOptionsm_LagMakerthe lag maker options.protected intm_NumStepsConfidenceIntervalsthe number of steps for confidence intervals.protected Stringm_OverlayFieldsthe fields to overlay (comma-separated list).-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description WekaForecasterGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringclassifierTipText()Returns the tip text for this property.StringconfidenceLevelTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.StringforecastFieldsTipText()Returns the tip text for this property.weka.classifiers.timeseries.AbstractForecastergenerate()Generates an instance of aAbstractForecaster.weka.classifiers.ClassifiergetClassifier()Returns the classifier in use.doublegetConfidenceLevel()Returns the confidence level (0-1).StringgetForecastFields()Returns the fields to forecast.LagMakerOptionsgetLagMaker()Returns the lag options.intgetNumStepsConfidenceIntervals()Returns the number of steps to generate confidence intervals for.StringgetOverlayFields()Returns the fields to overlay.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.StringglobalInfo()Returns a string describing the object.StringlagMakerTipText()Returns the tip text for this property.StringnumStepsConfidenceIntervalsTipText()Returns the tip text for this property.StringoverlayFieldsTipText()Returns the tip text for this property.voidsetClassifier(weka.classifiers.Classifier value)Sets the classifier to use.voidsetConfidenceLevel(double value)Sets the confidence level to use.voidsetForecastFields(String value)Sets the fields to forecast.voidsetLagMaker(LagMakerOptions value)Sets the lag options to use.voidsetNumStepsConfidenceIntervals(int value)Sets the number of steps to generate confidence intervals for.voidsetOverlayFields(String value)Sets the fields to overlay.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
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_LagMaker
protected LagMakerOptions m_LagMaker
the lag maker options.
-
m_NumStepsConfidenceIntervals
protected int m_NumStepsConfidenceIntervals
the number of steps for confidence intervals.
-
m_ConfidenceLevel
protected double m_ConfidenceLevel
the confidence level (0-1).
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
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.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractForecasterGenerator- Returns:
- null if no info available, otherwise short string
-
generate
public weka.classifiers.timeseries.AbstractForecaster generate() throws ExceptionGenerates an instance of aAbstractForecaster.- Specified by:
generatein classAbstractForecasterGenerator- Returns:
- the forecaster instance
- Throws:
Exception- if the setup fails
-
-