hanaml.BrownExponentialSmoothing {hana.ml.r}R Documentation

BrownExponentialSmoothing

Description

hanaml.BrownExponentialSmoothing is a R wrapper for PAL Brown Exponential Smoothing algorithm.

Usage

hanaml.BrownExponentialSmoothing (conn.context,
                                  data,
                                  key = NULL,
                                  endog = NULL,
                                  alpha = NULL,
                                  delta = NULL,
                                  forecast.num = NULL,
                                  adaptive.method = NULL,
                                  accuracy.measure = NULL,
                                  ignore.zero = NULL,
                                  expost.flag = NULL)

Arguments

conn.context

ConnectionContext
The connection to the SAP HANA system.

data

DataFrame
DataFrame containing the data.

key

character, optional
Name of the ID column.
Defaults to the first column.

endog

character, optional
The endogenous variable, i.e. time series.
Defaults to the first non-ID column.

alpha

double, optional
The smoothing constant alpha for brown exponential smoothing or the initialization value for adaptive brown exponential smoothing (0 < alpha < 1). - Defaults to 0.1 when Brown exponential smoothing
- Defaults to 0.2 when Adaptive brown exponential smoothing

delta

double, optional
Value of weighted for At and Mt. Only valid when 'adaptive_method' is TRUE. Defaults to 0.2

forecast.num

integer, optional
Number of values to be forecast.
Defaults to 0.

adaptive.method

logical, optional
- FALSE: Brown exponential smoothing.
- TRUE: Adaptive brown exponential smoothing. Defaults to FALSE.

accuracy.measure

character or list of characters, optional
Specifies measure name.

  • mpe: Mean percentage error.

  • mse: Mean squared error.

  • rmse: Root mean squared error.

  • et: Error total.

  • mad: Mean absolute deviation.

  • mase: Out-of-sample mean absolute scaled error.

  • wmape: Weighted mean absolute percentage error.

  • smape: Symmetric mean absolute percentage error.

  • mape: Mean absolute percentage error.

No default value.

ignore.zero

logical, optional
- FALSE: Uses zero values in the input dataset when calculating "mpe" or "mape".
- TRUE: Ignores zero values in the input dataset when calculating "mpe" or "mape".
Only valid when accuracy_measure is "mpe" or "mape".
Defaults to FALSE.

expost.flag

logical, optional
- FALSE: Does not output the expost forecast, and just outputs the forecast values.
- TRUE: Outputs the expost forecast and the forecast values.
Defaults to TRUE.

Details

The brown exponential smoothing model is suitable to model the time series with trend but without seasonality. In PAL, both non-adaptive and adaptive brown linear exponential smoothing are provided.

Value

Return a list of two DataFrame:

Examples

## Not run: 
Input DataFrame data:
> data$Collect()
     ID RAWDATA
  1   1     143
  2   2     152
  3   3     161
  4   4     139
  ......
  20 20     227
  21 21     223
  22 22     242
  23 23     239
  24 24     266

  besm <- hanaml.BrownExponentialSmoothing(conn.context = conn,
                                           data = data,
                                           alpha=0.1,
                                           forecast.num=6,
                                           adaptive.method=FALSE,
                                           accuracy.measure='mse',
                                           expost.flag=TRUE)
Output:
> besm[[2]]$Collect()
  STAT_NAME    STAT_VALUE
1       MSE       474.142

## End(Not run)

[Package hana.ml.r version 1.0.8 Index]