Contenido principal

ploterrcorr

R2026b

(To be removed) Plot autocorrelation of error time series

ploterrcorr will be removed in a future release. For more information, see Transition Legacy Neural Network Code to dlnetwork Workflows.

For advice on updating your code, see Version History.

Syntax

ploterrcorr(error)
ploterrcorr(errors,'outputIndex',outIdx)

Description

ploterrcorr(error) takes an error time series and plots the autocorrelation of errors across varying lags. The autocorrelation at zero lag is equal to the mean-squared error.

ploterrcorr(errors,'outputIndex',outIdx) uses the optional property name/value pair to define which output error autocorrelation is plotted. The default is 1.

Examples

Plot Autocorrelation of Errors

Here a NARX network is used to solve a time series problem.

[X,T] = simplenarx_dataset;
net = narxnet(1:2,20);
[Xs,Xi,Ai,Ts] = preparets(net,X,{},T);
net = train(net,Xs,Ts,Xi,Ai);

Training finished after 9 epochs with mean squared error performance of 0.00692

Y = net(Xs,Xi,Ai);
E = gsubtract(Ts,Y);
ploterrcorr(E)

Autocorrelation of Error 1 across lags -20 to 20, with peak at lag 0 and confidence limits shown

Version History

Introduced in R2010b

collapse all