This program models the data using a radial basis function (rbf) ansatz. The basis functions used are gaussians, with center points chosen to be data from the time series. If the ’DriftOff’ switch is not set, a kind of Coulomb force is 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 program either tests the ansatz by calculating the average forecast error of the model, or makes a i-step prediction using the -L flag, additionally. The ansatz made is:
x_n+1 = a_0 SUM a_i * f_i(x_n)
where x_n is the nth delay vector and f_i is a gaussian centered at the ith center point.
Input
Must be realvector. The output will be alligned with the input.
Parameters
The embedding dimension. Synonymous with flag ’-m’ from TISEAN [default = 2].
Delay used for embedding [default = 1].
Number of centers [default = 10].
Steps to forecast (for the forecast error) [default = 1].
Number of points for the fit. The other points are used to estimate the out of sample error [default = length (X)].
Determines the length of the predicted series [default = 0].
Switch
Deactivates the drift (Coulomb force), which is otherwise on.
Output
This structure contains parameters used for the fit. It has the following fields:
Contains the forecasted points. It’s length is equal to the value of parameter l
Algorithms
The algorithms for this functions have been taken from the TISEAN package.
The following code
# sin_saw is a sinusoid multiplied by a saw function idx = (1:2500).'; sin_saw = (5 + mod (idx, 165) ./15) .* sin (idx.* 2 * pi /32); forc_no = 170; #Number of forecasted points [p,forecast] = rbf (sin_saw(1:end-forc_no), 'm', 2, 'd', 6, 'p',12,... 'n',length(idx)-forc_no, 'l',forc_no); plot (idx(end-forc_no+1:end), sin_saw(end-forc_no+1:end),'b',... idx(end-forc_no+1:end), forecast,'r.') legend ('Actual Data', 'Forecasted Data') legend ('Location','NorthWest') axis tight
Produces the following figure
Figure 1 |
---|
Package: tisean