Main Content

ploterrcorr

Plot autocorrelation of error time series

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);

Figure Neural Network Training (05-Sep-2024 18:40:34) contains an object of type uigridlayout.

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

Figure Error Autocorrelation (ploterrcorr) contains an axes object. The axes object with title Autocorrelation of Error 1, xlabel Lag, ylabel Correlation contains 4 objects of type bar, line. These objects represent Correlations, Zero Correlation, Confidence Limit.

Version History

Introduced in R2010b