predict.AdditiveModelForecast.RdSimilar to other predict methods, this function predicts fitted values from a fitted "AdditiveModelForecast" object.
# S3 method for AdditiveModelForecast predict( model, data, logistic.growth.capacity = NULL, interval.width = NULL, uncertainty.samples = NULL )
| model |
|
|---|---|
| data |
|
| logistic.growth.capacity |
|
| interval.width |
|
| uncertainty.samples |
|
S3 methods
Predicted values are returned as a DataFrame, structured as follows.
ID column: type timestamp.
YHAT: type DOUBLE, representing predicted values.
YHAT_LOWER: type DOUBLE, lower bound of confidence region.
YHAT_UPPER: type DOUBLE, upper bound of confidence region.
Input DataFrame data2:
> data2$Collect() TIMESTAMP X 1 2007-12-11 -0.6361264 2 2007-12-12 3.0925087 3 2007-12-13 -0.7373356 4 2007-12-14 -3.1421910
Call the function with a "AdditiveModelForecast" object amf and obtain the result:
> res <- predict(amf, data2) TIMESTAMP YHAT YHAT_LOWER YHAT_UPPER 1 2007-12-11 0.1378272 -1.922812 2.2191343 2 2007-12-12 -0.5874185 -2.610632 1.4819355 3 2007-12-13 -1.3126642 -3.376615 0.5591713 4 2007-12-14 -2.0379099 -4.086953 0.1144007