hanaml.OnlineARIMA.Rd
hanaml.OnlineARIMA is a R wrapper
hanaml.OnlineARIMA(
order = NULL,
learning.rate = NULL,
epsilon = NULL,
output.fitted = TRUE,
random.state = NULL,
random.initialization = NULL
)
list/vector of integer, optional
Indicate the order (p, d, m).
p: value of the auto regression order.
d: value of the differentiation order.
m: extended order needed to transform all moving-averaging term to AR term.
Defaults to (1, 0, 0).
double, optional
Learning rate. Must be greater than zero.
Default value is calculated according to order(p, d, m).
double, optional
Convergence criterion.
Default value is calculated according to learning.rate, p and m in the order.
logical, optional
Output fitted result and residuals if TRUE.
Defaults to TRUE.
integer, optional
Specifies the seed for random number generator.
0: use the current time (in second) as seed.
Others: use the specified value as seed.
Default to 0.
logical, optional
Whether randomly generate initial state.
FALSE: set all to zero.
TRUE: use random values.
Defaults to FALSE.
Returns an "OnlineARIMA" object and then invoke the fit function will obtain the following attributes:
model: DataFrame
Fitted model.
fitted: DataFrame
Predicted dependent variable values for training data.
Set to NULL if the training data has no row IDs.
Online ARIMA implements an online learning method to estimate the parameters of ARIMA models by reformulating it into a full information online optimization task (without random noise terms), which has no limitations of depending on noise terms and accessing the entire large-scale dataset in advance.
data, DataFrame
key, character, optional
endog, character, optional
learning.rate, double, optional
epsilon, double, optional
Input DataFrame data:
> data$Collect()
TIMESTAMP Y
1 1 450
2 2 806
3 3 647
4 4 -3300
5 5 5308
......
Create a OnlineARIMA object without the data:
> onlinearima <- hanaml.OnlineARIMA(order=c(4,0,8), output.fitted=TRUE, learning.rate=0.00001)
Invoke fit function:
> onlinearima$fit(data)
Output:
> onlinearima$model
KEY VALUE
1 lrate 1e-05
2 fitted 1
3 d 0
4 mp 12
5 epsilon 2.4e-09
.......
> onlinearima$fitted
TIMESTAMP FITTED RESIDUALS
1 1 900.000000 -450.00000
2 2 1612.000000 -806.00000
3 3 1182.976801 -535.97680
4 4 -6855.679157 3555.67916
......
New coming input DataFrame data2:
> data2$Collect()
TIMESTAMP Y
1 101 386
2 102 -7807
3 103 3374
4 104 6074
5 105 241
......
Invoke the fit function again, learning.rate
and epsilon
could be re-assigned:
onlinearima$fit(data2)
Output:
> onlinearima$model
KEY VALUE
1 lrate 1e-05
2 fitted 1
3 d 0
4 mp 12
5 epsilon 2.4e-09
.......
> onlinearima$fitted
TIMESTAMP FITTED RESIDUALS
1 101 772.0000 -386.000000
2 102 -15662.6630 7855.663020
3 103 7509.2051 -4135.205060
4 104 13960.8733 -7886.873345
5 105 -1702.2340 1943.234045
.....