Tests sisal with example datasets or time series data.
The function uses the training part of an example dataset or
user-supplied numeric data interpreted as a time series.
testSisal(dataset = c("tsToy", "laser", "poland", "toy"), nData = Inf,
FUN = "sisal", lags = NULL, stepsAhead = 1,
noiseSd = 0.2, verbose = 1, …)the dataset to use. A numeric vector
containing time series data or one of "tsToy" (the default),
"laser", "poland" and "toy".
a numeric value containing the number of
observations to use. If larger than the number of observations in
the dataset, all of the data will be used (the default).
a numeric or integer vector. When
using time series data (dataset is numeric,
"laser", "poland" or "tsToy"), the function
creates lagged versions of the time series to be used as input
variables in sisal. The lags are specified here.
These are non-negative integral values where 0 means the latest
observation, 1 is the previous observation etc. The default values
for "laser", "poland" and "tsToy" are
0:19, 0:14 and 0:9, respectively.
an integral value specifying how many steps ahead to predict in a time series setting. The default is 1.
standard deviation of noise to be used with the
"toy" dataset. The base noise is always the
same (stored with the dataset) and only scaled to match this
setting.
a numeric or integer verbosity level.
This function only has two verbosity levels (0 and larger than 0),
but the value is also propagated to FUN.
arguments passed to FUN.
The value returned by function FUN, when called with the
given dataset (processed by this function) and
parameters. See the help page of the relevant function,
e.g. sisal.
The function recognizes if a numeric dataset
is the "laser" or "poland" dataset. In case repeated
experiments will be performed on those datasets, it is best to explicitly
fetch them with sisalData before using this function.
Doing so reduces the amount of network traffic and makes offline work
possible.
See sisalData, toy.learn and
tsToy.learn for documentation on the datasets.
The performance of the models returned by this functions can be
evaluated using bootMSE, which uses a separate test part
of the dataset.
# NOT RUN {
foo <- testSisal(dataset="toy", hbranches=2, max.width=2, Mtimes=5,
use.ridge=TRUE)
print(foo)
names(foo)
# }
Run the code above in your browser using DataLab