rbf {RTisean} | R Documentation |
Models data using a radial basis function ansatz. The basis functions used are Gaussians, with center points chosen to be data from the time series. A kind of Coulomb force can be applied to them to let them drift a bit in order to distribute them more uniformly. The variance of the Gaussians is set to the average distance between the centers. This fuction either tests the ansatz by calculating the average forecast error of the model or makes a prediction.
rbf(series, l, x = 0, c = 1, m = 2, d = 1, p = 10, X = FALSE, s = 1, n, L)
series |
a vector or a matrix. |
l |
number of data to use. |
x |
number of lines to be ignored. |
c |
column to be read. |
m |
embedding dimension. |
d |
delay. |
p |
number of centers. |
X |
deactivate drift (Coulomb force). |
s |
steps to forecast. |
n |
number of points for the fit. |
L |
length of the predicted series. |
The ansatz made is:
x_{t+1}=a_0+ sum_{a_i}{phi(x_t)}
where x_t is the tth delay vector and phi is a Gaussian centered at the ith center point.
A list composed by:
centers |
The matrix of the cohordinates of the center points. |
variance |
The variance used for the Gaussians. |
coeff |
The coefficients (weights) of the basis functions used for the model. |
error |
The in-sample prediction error. |
pred |
The predicted points, if the L parameter was set >0. |
## Not run: dat<-sin(1:10000)+rnorm(10000)/5 rbfout<-rbf(dat,L=100,n=9900) pred<-rbfout$pred plot(dat[9901:10000],t="l",xlab="Time",ylab="Sin data") lines(pred,col=2) ## End(Not run)