Navigation

Operators and Keywords

Function List:

C++ API

Function File: [pars, forecast] = rbf (X)
Function File: [pars, forecast] = rbf (X, paramName, paramValue, …)

Models the data making a polynomial ansatz.

Input

X

Must be realvector. The output will be alligned with the input.

Parameters

m

The embedding dimension. Synonymous with flag ’-m’ from TISEAN [default = 2].

d

Delay used for embedding [default = 1].

p

Order of the polynomial [default = 2].

n

Number of points for the fit. The other points are used to estimate the out of sample error [default = length (X)].

l

The length of the predicted series [default = 0].

Output

pars

This structure contains parameters used for the fit. It has the following fields:

  • free - contains the number of free parameters of the fit
  • norm - contains the norm used for the fit
  • coeffs - contains the coefficients used for the fit
  • err - err(1) is the in sample error, and err(2) is the out of sample error (if it exists)
forecast

Contains the forecasted points. It’s length is equal to the value of parameter l

See also: demo polynom.

Algorithms

The algorithms for this functions have been taken from the TISEAN package.

Demonstration 1

The following code

 idx = (1:2500).';
 # sin_saw is a sinusoid multiplied by a saw function
 sin_saw = (5 + mod (idx, 165) ./15) .* sin (idx.* 2 * pi /32);

 forc_no = 170; %Number of forecasted points
 [p,forecast]  = polynom (sin_saw(1:end-forc_no), 'm', 2, 'd', 6, 'p', 4,
                          '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')
 axis tight

Produces the following figure

Figure 1

Package: tisean