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.Classifier
m_Classifier
the base classifier.protected double
m_ConfidenceLevel
the confidence level (0-1).protected String
m_ForecastFields
the fields to forecast (comma-separated list).protected LagMakerOptions
m_LagMaker
the lag maker options.protected int
m_NumStepsConfidenceIntervals
the number of steps for confidence intervals.protected String
m_OverlayFields
the 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 String
classifierTipText()
Returns the tip text for this property.String
confidenceLevelTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.String
forecastFieldsTipText()
Returns the tip text for this property.weka.classifiers.timeseries.AbstractForecaster
generate()
Generates an instance of aAbstractForecaster
.weka.classifiers.Classifier
getClassifier()
Returns the classifier in use.double
getConfidenceLevel()
Returns the confidence level (0-1).String
getForecastFields()
Returns the fields to forecast.LagMakerOptions
getLagMaker()
Returns the lag options.int
getNumStepsConfidenceIntervals()
Returns the number of steps to generate confidence intervals for.String
getOverlayFields()
Returns the fields to overlay.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.String
globalInfo()
Returns a string describing the object.String
lagMakerTipText()
Returns the tip text for this property.String
numStepsConfidenceIntervalsTipText()
Returns the tip text for this property.String
overlayFieldsTipText()
Returns the tip text for this property.void
setClassifier(weka.classifiers.Classifier value)
Sets the classifier to use.void
setConfidenceLevel(double value)
Sets the confidence level to use.void
setForecastFields(String value)
Sets the fields to forecast.void
setLagMaker(LagMakerOptions value)
Sets the lag options to use.void
setNumStepsConfidenceIntervals(int value)
Sets the number of steps to generate confidence intervals for.void
setOverlayFields(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:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in 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:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractForecasterGenerator
- Returns:
- null if no info available, otherwise short string
-
generate
public weka.classifiers.timeseries.AbstractForecaster generate() throws Exception
Generates an instance of aAbstractForecaster
.- Specified by:
generate
in classAbstractForecasterGenerator
- Returns:
- the forecaster instance
- Throws:
Exception
- if the setup fails
-
-