postprocess.tspred {TSPred} | R Documentation |
Postprocess method for tspred
objects
Description
Performs postprocessing of the predicted time series data contained in a tspred
class object
reversing a particular set of transformation methods. Each transformation method is defined
by a processing
object in the list contained in the tspred
class object.
Usage
## S3 method for class 'tspred'
postprocess(obj, ...)
Arguments
obj |
An object of class |
... |
Other parameters passed to the method |
Details
The function postprocess.tspred
recursively calls the method postprocess
on each processing
object contained in obj
in the inverse order
as done by preprocess.tspred
. The postprocessed predictions
resulting from each of these calls is used as input to the next call. Finally, the produced
postprocessed time series predictions are introduced in the structure of the tspred
class object in obj
.
The same transformation method parameters used/computed during preprocessing, duly saved
in the structure of the tspred
class object in obj
, are used for
reversing the transformations during postprocessing.
Value
An object of class tspred
with updated structure containing
postprocessed time series predictions.
Author(s)
Rebecca Pontes Salles
See Also
[tspred()] for defining a particular time series prediction process, and [LT()] for defining a time series transformation method.
Other preprocess:
preprocess.tspred()
,
subset()
Examples
data(CATS)
#Obtaining objects of the processing class
proc1 <- subsetting(test_len=20)
proc2 <- BoxCoxT(lambda=NULL)
proc3 <- WT(level=1, filter="bl14")
#Obtaining objects of the modeling class
modl1 <- ARIMA()
#Obtaining objects of the evaluating class
eval1 <- MSE_eval()
#Defining a time series prediction process
tspred_1 <- tspred(subsetting=proc1,
processing=list(BCT=proc2,
WT=proc3),
modeling=modl1,
evaluating=list(MSE=eval1)
)
summary(tspred_1)
tspred_1 <- subset(tspred_1, data=CATS[3])
tspred_1 <- preprocess(tspred_1,prep_test=FALSE)
tspred_1 <- train(tspred_1)
tspred_1 <- predict(tspred_1, onestep=TRUE)
tspred_1 <- postprocess(tspred_1)