Estimates the average forecast error for a zeroth order fit from a multidimensional time series
Input
This function always assumes that each time series is along the longer dimension of matrix S. It also assumes that every dimension (counting along the shorter dimension) of S is considered a component of the time series.
Parameters
The embedding dimension used. It is synonymous to the second part of flag ’-m’ from TISEAN. The first part of the TISEAN flag is omitted as all of the available components of S are analyzed [default = 1].
Delay used for the embedding [default = 1].
Sets for how many points the error should be calculated [default is for all of the points].
Temporal distance between the reference points [default = 1].
Minimum number of neighbors for the fit [default = 30].
Size of neighbourhood to start with [default = 1/1000].
Factor to increase the neighbourhood size if not enough naighbors were found [default = 1.2].
Steps to be forecast x(n+s) = f(x(n))
[default = 1].
Width of causality window [default = value of parameter ’s’].
Switch
If this switch is set then the program uses only the nearest k neighbor found. This is synonymous with flag ’-K’ from TISEAN.
Outputs
This is a matrix of length equal to the parameter ’s’. It contains the relative forecast error. The first column (row depending on the input) contains the steps forecasted. Relative means that the forecast error is divided by the standard deviation of the vector component.
This is a matrix that contais the individual forecast error for each comonent of each reference point. This is the same as passing ’-V2’ to TISEAN lzo-test.
See also: demo lzo_test, lzo_gm, lzo_run.
Algorithms
The algorithms for this functions have been taken from the TISEAN package.
The following code
idx = (1:10000).'; # sin_saw is a sinusoid multiplied by a saw function. sin_saw = (5 + mod (idx, 165) ./ 15) .* sin (idx.* 2 * pi /32); steps = 250; rel1 = lzo_test (sin_saw, 'm', 2, 'd', 6, 's', steps); rel2 = lzo_test (sin_saw, 'm', 3, 'd', 6, 's', steps); rel3 = lzo_test (sin_saw, 'm', 4, 'd', 1, 's', steps); rel4 = lzo_test (sin_saw, 'm', 4, 'd', 6, 's', steps); plot (rel1(:,1), rel1(:,2), 'r', ... rel2(:,1), rel2(:,2), 'g',... rel3(:,1), rel3(:,2), 'b',... rel4(:,1), rel4(:,2), 'm'); legend ('m = 2, d = 6', 'm = 3, d = 6','m = 4, d = 1', 'm = 4, d = 6'); xlabel ("Forecast time"); ylabel ("Relative forecast error"); axis tight
Produces the following figure
Figure 1 |
---|
Package: tisean