weka.classifiers.timeseries.eval
Class TSEvalModule

java.lang.Object
  extended by weka.classifiers.timeseries.eval.TSEvalModule
Direct Known Subclasses:
ErrorModule

public abstract class TSEvalModule
extends java.lang.Object


Constructor Summary
TSEvalModule()
           
 
Method Summary
abstract  double[] calculateMeasure()
          Calculate the measure that this module represents.
abstract  void evaluateForInstance(java.util.List<NumericPrediction> forecasts, Instance inst)
          Evaluate the given forecast(s) with respect to the given test instance.
abstract  java.lang.String getDefinition()
          Return the mathematical formula that this evaluation module computes.
abstract  java.lang.String getDescription()
          Return the longer (single sentence) description of this evaluation module
abstract  java.lang.String getEvalName()
          Return the short identifying name of this evaluation module
static TSEvalModule getModule(java.lang.String moduleName)
          Factory method for obtaining a named evaluation module.
static java.util.List<TSEvalModule> getModuleList()
           
 java.util.List<java.lang.String> getTargetFields()
          Get the list of target field names.
abstract  void reset()
          Reset the module
 void setTargetFields(java.util.List<java.lang.String> targets)
          Set a list of target field names.
abstract  java.lang.String toSummaryString()
          Return the summary description of the computed measure for each target.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TSEvalModule

public TSEvalModule()
Method Detail

getModuleList

public static java.util.List<TSEvalModule> getModuleList()

getModule

public static TSEvalModule getModule(java.lang.String moduleName)
                              throws java.lang.IllegalArgumentException
Factory method for obtaining a named evaluation module.

Parameters:
moduleName - the name of the module to obtain
Returns:
the named module
Throws:
java.lang.IllegalArgumentException - if the supplied module name is unknown

reset

public abstract void reset()
Reset the module


getEvalName

public abstract java.lang.String getEvalName()
Return the short identifying name of this evaluation module

Returns:
the short identifying name of this evaluation module

getDescription

public abstract java.lang.String getDescription()
Return the longer (single sentence) description of this evaluation module

Returns:
the longer description of this module

getDefinition

public abstract java.lang.String getDefinition()
Return the mathematical formula that this evaluation module computes.

Returns:
the mathematical formula that this module computes.

evaluateForInstance

public abstract void evaluateForInstance(java.util.List<NumericPrediction> forecasts,
                                         Instance inst)
                                  throws java.lang.Exception
Evaluate the given forecast(s) with respect to the given test instance. Targets with missing values are ignored.

Parameters:
forecasts - a List of forecasted values. Each element corresponds to one of the targets and is assumed to be in the same order as the list of targets supplied to the setTargetFields() method.
Throws:
java.lang.Exception - if the evaluation can't be completed for some reason.

calculateMeasure

public abstract double[] calculateMeasure()
                                   throws java.lang.Exception
Calculate the measure that this module represents.

Returns:
the value of the measure for this module for each of the target(s).
Throws:
java.lang.Exception - if the measure can't be computed for some reason.

toSummaryString

public abstract java.lang.String toSummaryString()
                                          throws java.lang.Exception
Return the summary description of the computed measure for each target.

Returns:
the summary string description of the computed measure.
Throws:
java.lang.Exception - if the measure can't be computed for some reason.

setTargetFields

public void setTargetFields(java.util.List<java.lang.String> targets)
Set a list of target field names. This list must be the same as that provided to the TSForecaster via TSForecast.setFieldsToForecast()

Parameters:
targets - a List of target field names

getTargetFields

public java.util.List<java.lang.String> getTargetFields()
Get the list of target field names.

Returns:
the list of target field names.