hanaml.VarianceTest.Rdhanaml.VarianceTest is a R wrapper for SAP HANA PAL Variance Test.
hanaml.VarianceTest(data, key, sigma.num, thread.ratio = NULL, data.col = NULL)
| data |
|
|---|---|
| key |
|
| sigma.num |
|
| thread.ratio |
|
| data.col | character, optional |
Returns a list of two DataFrame:
DataFrame 1
Sampling results, structured as follows:
DATA_ID: name as shown in input DataFrame.
IS_OUT_OF_RANGE: 0 -> in bounds, 1 -> out of bounds.
DataFrame 2
Statistic results, structured as follows:
STAT_NAME: statistic name.
STAT_VALUE: statistic value.
Variance Test is a method to identify the outliers of n number of numeric data xi where 0 < i < n+1, using the mean and the standard deviation(sigma) of n number of numeric data.
Input DataFrame data:
> data$Collect()
ID X
1 0 25
2 1 20
3 2 23
4 3 29
5 4 26
...
18 17 23
19 18 25
20 19 103
Call the function:
> vt <- hanaml.VarianceTest(data, key = "ID", sigma.num = 3.0)
Output:
> vt[[2]]$Collect() ID IS_OUT_OF_RANGE 1 0 0 2 1 0 3 2 0 ... 18 17 0 19 18 0 20 19 1