PredictNonlinear
uses SMap
to evaluate
prediction accuracy as a function of the localisation parameter
theta
.
PredictNonlinear(pathIn = "./", dataFile = "", dataFrame = NULL,
pathOut = "./", predictFile = "", lib = "", pred = "", theta = "",
E = 1, Tp = 1, knn = 0, tau = -1, exclusionRadius = 0,
columns = "", target = "", embedded = FALSE, verbose = FALSE,
validLib = vector(), numThreads = 4, showPlot = TRUE)
A data.frame with columns Theta, rho
.
path to dataFile
.
.csv format data file name. The first column must be a time index or time values. The first row must be column names.
input data.frame. The first column must be a time index or time values. The columns must be named.
path for predictFile
containing output predictions.
output file name.
string with start and stop indices of input data rows used to create the library of observations. A single contiguous range is supported.
string with start and stop indices of input data rows used for predictions. A single contiguous range is supported.
A whitespace delimeted string with values of the S-map
localisation parameter. An empty string will use default values of
[0.01 0.1 0.3 0.5 0.75 1 1.5 2 3 4 5 6 7 8 9]
.
embedding dimension.
prediction horizon (number of time column rows).
number of nearest neighbors. If knn=0, knn is set to the library size.
lag of time delay embedding specified as number of time column rows.
excludes vectors from the search space of nearest neighbors if their relative time index is within exclusionRadius.
string of whitespace separated column name(s) in the input data used to create the library.
column name in the input data used for prediction.
logical specifying if the input data are embedded.
logical to produce additional console reporting.
logical vector the same length as the number of data rows. Any data row represented in this vector as FALSE, will not be included in the library.
number of parallel threads for computation.
logical to plot results.
The localisation parameter theta
weights nearest
neighbors according to exp( (-theta D / D_avg) ) where D is the
distance between the observation vector and neighbor, D_avg the mean
distance. If theta = 0, weights are uniformally unity corresponding
to a global autoregressive model. As theta increases, neighbors in
closer proximity to the observation are considered.
data(TentMapNoise)
theta.rho = PredictNonlinear( dataFrame = TentMapNoise, E = 2,
lib = "1 100", pred = "201 500", columns = "TentMap",
target = "TentMap", showPlot = FALSE )
Run the code above in your browser using DataLab