Validates the virtual sensor through a test set of data
Method of virtualsensor object.
Given a matrix ut (optional) of dimensions containing T measures of the system inputs, a matrix yt of dimensions containing T measures of the measurable system outpute and a vector zt with T elements containing T measures of the output to estimate, this method estimates z from ut and yt and performs a comparison with the provided output zt. ut, yt and zt can also be cell arrays; each element of them corresponds to a time evolution of inputs and outputs starting from different initial conditions.
The Root Mean Square and the maximum error between z and zt are returned. A plot of the measured and estimated output and of the relative and absolute error between them is performed.
[zh err] = validate(object,yt,zt,[options])
yt and zt are matrices (or cell arrays of matrices) defining the test set. options is a structure with the following fields:
- plot: if it is 1, a plot of z, zt and the relative and absolute error is performed. Defalut value: 1.
- initialCondition: initial condition for the estimate of z. This condition is used until all the data at needed time instants are available. This field can be an array, indicating a different initial condition for all the elements of the cell arrays zt, or a scalar, if the same initial condition must be used for all elements of the cell arrays. Default initial condition is 0.
zh is the estimated output and err is a struct with fields MAX and RMSE containing the maximum and root mean square error respectively.
[zh err] = validate(object,ut,yt,zt,[options])
- Tomaso Poggi (firstname.lastname@example.org)
Copyright is with:
- Copyright (C) 2010 University of Genoa, Italy.