Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES

 Documentation /  Neural Networks /  Dynamic Neural Networks /  Functions and Options /

NetInformationLinearizing a Nonlinear Model

8.1.3 Predicting and Simulating

A dynamic model cannot be applied directly on a data input vector as the other neural network types. The reason for this is that the models are dynamic and you have to consider sequences of data to yield simulations and predictions. The commands for this are described in the following.

The one-step ahead prediction (t|t-1) is obtained as described in Section 2.6, Dynamic Neural Networks. It is based on measured outputs up to time t-1.

It is often interesting to check if the model is capable of performing prediction several time-steps ahead; that is, to increase the prediction horizon. Consider, for example, the two-step ahead prediction, (t|t-2), where past values only up to y(t-2) are given. This is accomplished by using the estimate (t-1|t-2) in place of the missing y(t-1) value to do the normal one-step prediction. This procedure may be similarly extended to obtain larger prediction horizons.

If the prediction horizon is infinite, it is said that the model is being used in simulation. Then, measured outputs are not used at all, and all outputs in the regressor are replaced by model outputs.

Predictions can be obtained with the command NetPredict.

Predict future outputs.

The prediction error, which is the difference between predicted and true output, can be obtained using NetPredictionError in the following way.

Obtain the prediction error.

NetPredict and NetPredictionError have the following options.

Options of NetPredict and NetPredictionError.

The two options InitialOutput and InitialInput can be used to set the values of the regressor at the beginning of the prediction. The default is to use the first available value in the submitted data; that is, y(-1), y(-2),... are set identically to y(1) and similarly for u(-1), u(-2),...

You can set InitialOutput and InitialInput to other values according to the following rules.

For single input/output models you can set the options to:

FilledSmallCircle Real numbers; in which case all lagged inputs and outputs are set to these real numbers.

FilledSmallCircleSequences of lagged values that are lists of real-valued numbers, such as {y(-1),y(-2),...,y(-)} or {u(-1),u(-2),...,u(--+1)}.

For multi (input) output models u(t) and y(t) are vectors with the number of components equal to the number of inputs and outputs, respectively. Also the structural indices , , and are vectors. In this case the options InitialOutput and InitialInput can be set to:

FilledSmallCircle Real numbers; in which case the lagged values of all inputs and outputs are set to these real numbers.

FilledSmallCircle Lists of length equal to the number of inputs/outputs; in which case all lagged values of input/output number m are set to the value at position m in the list.

FilledSmallCircle A matrix; {y(-1),y(-2),...,y(-Max[])} and {u(-1),u(-2),...,u(Max[--+1])}, where y(-1) is a list with one component for each output. The rest of the rows of the matrices are set correspondingly.

A model can be simulated using the command NetSimulate. A neural AR model can only be simulated if a noise signal e is submitted in the call.

Simulate the model.

NetSimulate has the following two options.

Options of NetSimulate.

These options were described earlier in this passage in connection to the command NetPredict.

A very convenient command that may be used to evaluate a model is NetComparePlot. It simulates or predicts the output, depending on the option PredictionHorizon, and plots the result together with the supplied output signal. Therefore, you can visually inspect the performance of the neural model. The RMSE is also displayed.

Simulate or predict and compare with true output.

You can change the prediction horizon using the same option PredictionHorizon as in NetPredict and NetPredictionError. Often there are transients in the beginning of the data sequence due to the fact that initial input and output values in the regressor are incorrect; that is, the values used for y(-1), y(-2),... and u(-1), u(-2),... . You can remove the transients by excluding the first part of the data sequence from the comparison. This is done by giving the start and end numbers of the samples to be included in the option ShowRange. Another way to handle the transients is to set the initial values with the options InitialOutput and InitialInput. These options were described earlier in this passage in connection to the command NetPredict.

Options of NetComparePlot.

In addition to these options you can supply any option of MultipleListPlot to modify the given plot.

NetInformationLinearizing a Nonlinear Model


Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: