hanaml.AccuracyMeasure is a R wrapper for SAP HANA PAL accuracy measure algorithm.

hanaml.AccuracyMeasure(data, evaluation.metric)

Arguments

data

DataFrame
DataFrame containing the data for accuracy measure calculations.
It needs to contain two columns that correspond to true values and predicted values, respectively.

evaluation.metric

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.

Value

  • DataFrame
    Results of the forecast accuracy measurement, structured as follows:

    • STAT_NAME: name of the accuracy measures.

    • STAT_VALUE: values of the accuracy measures.

Details

Measures are used to check the accuracy of the forecast made by SAP HANA PAL algorithms.

Examples

Input dataFrame data:

> data$Collect()
  ACTUALCOL FORECASTCOL
1      1130        1270
2      2410        2340
3      2210        2310
4      2500        2340

Invoke the function:

> am <- hanaml.AccuracyMeasure(data,
                               evaluation.metric = list("mse","mpe"))

Output:

> am$Collect()
  STAT_NAME    STAT_VALUE
1       MPE -1.902426e-02
2       MSE  1.502500e+04