|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.openforecast.models.AbstractForecastingModel
public abstract class AbstractForecastingModel
This class implements a variety of methods that are common across all forecasting models. In particular, the calculation of the accuracy indicators can be generalized, and is therefore implemented in the method, calculateAccuracyIndicators.
calculateAccuracyIndicators(net.sourceforge.openforecast.DataSet)
Field Summary | |
---|---|
protected net.sourceforge.openforecast.models.AccuracyIndicators |
accuracyIndicators
The accuracy indicators, or measures of accuracy, obtained by applying this forecasting model to the initial data set. |
protected boolean |
initialized
Remembers whether this model has been properly initialized. |
Constructor Summary | |
---|---|
protected |
AbstractForecastingModel()
Default constructor. |
Method Summary | |
---|---|
protected void |
calculateAccuracyIndicators(DataSet dataSet)
A helper method to calculate the various accuracy indicators when applying the given DataSet to the current forecasting model. |
DataSet |
forecast(DataSet dataSet)
Using the current model parameters (initialized in init), apply the forecast model to the given data set. |
double |
getAIC()
Returns the Akaike Information Criteria obtained from applying the current forecasting model to the initial data set to try and predict each data point. |
double |
getBias()
Returns the bias - the arithmetic mean of the errors - obtained from applying the current forecasting model to the initial data set to try and predict each data point. |
double |
getMAD()
Returns the mean absolute deviation obtained from applying the current forecasting model to the initial data set to try and predict each data point. |
double |
getMAPE()
Returns the mean absolute percentage error obtained from applying the current forecasting model to the initial data set to try and predict each data point. |
double |
getMSE()
Returns the mean square of the errors (MSE) obtained from applying the current forecasting model to the initial data set to try and predict each data point. |
double |
getSAE()
Returns the Sum of Absolute Errors (SAE) obtained by applying the current forecasting model to the initial data set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sourceforge.openforecast.ForecastingModel |
---|
forecast, getForecastType, getNumberOfPredictors, init, toString |
Field Detail |
---|
protected net.sourceforge.openforecast.models.AccuracyIndicators accuracyIndicators
protected boolean initialized
Constructor Detail |
---|
protected AbstractForecastingModel()
Method Detail |
---|
public double getAIC()
getAIC
in interface ForecastingModel
ModelNotInitializedException
- if getAIC is called before the
model has been initialized with a call to init.public double getBias()
getBias
in interface ForecastingModel
ModelNotInitializedException
- if getBias is called before the
model has been initialized with a call to init.public double getMAD()
getMAD
in interface ForecastingModel
ModelNotInitializedException
- if getMAD is called before the
model has been initialized with a call to init.public double getMAPE()
getMAPE
in interface ForecastingModel
ModelNotInitializedException
- if getMAPE is called before the
model has been initialized with a call to init.public double getMSE()
getMSE
in interface ForecastingModel
ModelNotInitializedException
- if getMSE is called before the
model has been initialized with a call to init.public double getSAE()
getSAE
in interface ForecastingModel
ModelNotInitializedException
- if getSAE is called before the
model has been initialized with a call to init.public DataSet forecast(DataSet dataSet)
forecast
in interface ForecastingModel
dataSet
- the set of data points for which forecast values (for
the dependent variable) are required.
ModelNotInitializedException
- if getMSE is called before the
model has been initialized with a call to init.protected void calculateAccuracyIndicators(DataSet dataSet)
dataSet
- the DataSet to use to evaluate this model, and to
calculate the accuracy indicators against.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |