A class to perform double exponential smoothing on a time series. More...
#include <forecast.h>
Public Member Functions | |
void | applyForecast (Forecast *, const Date[], unsigned int, bool) |
DoubleExponential (double a=initial_alfa, double g=initial_gamma) | |
double | generateForecast (Forecast *fcst, const double history[], unsigned int count, const double madWeight[], bool debug) |
string | getName () |
Static Public Member Functions | |
static void | setInitialAlfa (double x) |
static void | setInitialGamma (double x) |
static void | setMaxAlfa (double x) |
static void | setMaxGamma (double x) |
static void | setMinAlfa (double x) |
static void | setMinGamma (double x) |
A class to perform double exponential smoothing on a time series.
Definition at line 370 of file forecast.h.
module_forecast::Forecast::DoubleExponential::DoubleExponential | ( | double | a = initial_alfa , |
|
double | g = initial_gamma | |||
) | [inline] |
Constructor.
Definition at line 421 of file forecast.h.
void module_forecast::Forecast::DoubleExponential::applyForecast | ( | Forecast * | forecast, | |
const Date | buckets[], | |||
unsigned int | bucketcount, | |||
bool | debug | |||
) | [virtual] |
Forecast value updating.
Implements module_forecast::Forecast::ForecastMethod.
Definition at line 397 of file timeseries.cpp.
double module_forecast::Forecast::DoubleExponential::generateForecast | ( | Forecast * | fcst, | |
const double | history[], | |||
unsigned int | count, | |||
const double | madWeight[], | |||
bool | debug | |||
) | [virtual] |
Forecast evaluation.
Implements module_forecast::Forecast::ForecastMethod.
Definition at line 268 of file timeseries.cpp.
string module_forecast::Forecast::DoubleExponential::getName | ( | ) | [inline, virtual] |
The name of the method.
Implements module_forecast::Forecast::ForecastMethod.
Definition at line 485 of file forecast.h.
static void module_forecast::Forecast::DoubleExponential::setInitialAlfa | ( | double | x | ) | [inline, static] |
Update the initial value for the alfa parameter.
Definition at line 432 of file forecast.h.
static void module_forecast::Forecast::DoubleExponential::setInitialGamma | ( | double | x | ) | [inline, static] |
Update the initial value for the alfa parameter.
The default value is 0.05.
Setting this parameter to too low a value can create false positives: the double exponential method is selected for a time series without a real trend. A single exponential is better for such cases.
Definition at line 462 of file forecast.h.
static void module_forecast::Forecast::DoubleExponential::setMaxAlfa | ( | double | x | ) | [inline, static] |
Update the maximum value for the alfa parameter.
Definition at line 448 of file forecast.h.
static void module_forecast::Forecast::DoubleExponential::setMaxGamma | ( | double | x | ) | [inline, static] |
Update the maximum value for the alfa parameter.
Definition at line 478 of file forecast.h.
static void module_forecast::Forecast::DoubleExponential::setMinAlfa | ( | double | x | ) | [inline, static] |
Update the minimum value for the alfa parameter.
Definition at line 440 of file forecast.h.
static void module_forecast::Forecast::DoubleExponential::setMinGamma | ( | double | x | ) | [inline, static] |
Update the minimum value for the alfa parameter.
Definition at line 470 of file forecast.h.