tspred: Time series prediction process

Description Usage Arguments Value Author(s) See Also Examples

View source: R/tspred.r

Description

Constructor for the tspred class representing a time series prediction process. This process may involve subsetting the time series data into training and testing sets, preprocessing/postprocessing the data, modeling, prediction and finally an evaluation of modeling fitness and prediction quality. All these process steps should be based on particular time series transformation methods, a modeling and prediction method, and quality metrics which are defined in a tspred class object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
tspred(
  subsetting = NULL,
  processing = NULL,
  modeling = NULL,
  evaluating = NULL,
  data = NULL,
  n.ahead = NULL,
  one_step = FALSE,
  ...,
  subclass = NULL
)

Arguments

subsetting

A subsetting object regarding subsetting processing.

processing

List of named processing objects used for pre(post)processing the data.

modeling

A modeling object used for time series modeling and prediction.

evaluating

List of named evaluating objects used for prediction/modeling quality evaluation.

data

A list of time series to be pre(post)processed, modelled and/or predicted.

n.ahead

Integer defining the number of observations to be predicted.

one_step

Should the function produce one-step ahead predictions? If FALSE, a multi-step ahead prediction approach is adopted.

...

Other parameters to be encapsulated in the class object.

subclass

Name of new specialized subclass object created in case it is provided.

Value

An object of class tspred.

Author(s)

Rebecca Pontes Salles

See Also

Other constructors: ARIMA(), LT(), MSE_eval(), evaluating(), modeling(), processing()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
	 #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()
  eval2 <- MAPE_eval()

  #Defining a time series prediction process
  tspred_1 <- tspred(subsetting=proc1,
                     processing=list(BCT=proc2,
                                     WT=proc3),
                     modeling=modl1,
                     evaluating=list(MSE=eval1,
                                     MAPE=eval2)
                    )
  summary(tspred_1)

	 #Obtaining objects of the processing class
  proc4 <- SW(window_len = 6)
  proc5 <- MinMax()

  #Obtaining objects of the modeling class
  modl2 <- NNET(size=5,sw=proc4,proc=list(MM=proc5))

  #Defining a time series prediction process
  tspred_2 <- tspred(subsetting=proc1,
                     processing=list(BCT=proc2,
                                     WT=proc3),
                     modeling=modl2,
                     evaluating=list(MSE=eval1,
                                     MAPE=eval2)
                    )
  summary(tspred_2)

TSPred documentation built on Jan. 21, 2021, 5:10 p.m.