Compute loss functions for a set of different model structures of single-output ARX type.
Syntax
v = arxstruc(ze,zv,NN)
v = arxstruc(ze,zv,NN,maxsize)
Description
NN is a matrix that defines a number of different structures of the ARX type. Each row of NN is of the form
nn = [na nb nk]
with the same interpretation as described for arx. See struc for easy generation of typical NN matrices for single-input systems.
Each of ze and zv are matrices containing output-input data [y u]. For multi-input systems, u has the corresponding number of columns, while for time series, no u is present. Models for each of the model structures defined by NN are estimated using the data set ze. The loss functions (normalized sum of squared prediction errors) are then computed for these models when applied to the validation data set zv. The data sets, ze and zv, need not be of equal size. They could, however, be the same sets, in which case the computation is faster.
Note that arxstruc is intended for single-output systems only.
v is returned with the loss functions in its first row. The remaining rows of v contain the transpose of NN, so that the orders and delays are given just below the corresponding loss functions. The last column of v contains the number of data points in ze. The selection of a suitable model structure based on the information in v is best done using selstruc. See Section 8 in the Tutorial for advice on model structure selection, cross-validation, and the like.
See auxvar for an explanation of maxsize.
Examples
Compare first to fifth order models with one delay using cross-validation on the second half of the data set, and then select the order that gives the best fit to the validation data set:
NN = struc(1:5,1:5,1);
V = arxstruc(z(1:200,:),z(201:400,:),NN);
nn = selstruc(V,0);
th = arx(z,nn);
See Also
arx, ivstruc, selstruc, struc
[ Previous | Help Desk | Next ]