Contents

narnet

Nonlinear autoregressive neural network

Syntax

narnet(feedbackDelays,hiddenSizes,trainFcn)

Description

NAR (nonlinear autoregressive) neural networks can be trained to predict a time series from that series past values.

narnet(feedbackDelays,hiddenSizes,trainFcn) takes these arguments,

feedbackDelays

Row vector of increasing 0 or positive delays (default = 1:2)

hiddenSizes

Row vector of one or more hidden layer sizes (default = 10)

trainFcn

Training function (default = 'trainlm')

and returns a NAR neural network.

Examples

Here a NAR network is used to solve a simple time series problem.

T = simplenar_dataset;
net = narnet(1:2,10);
[Xs,Xi,Ai,Ts] = preparets(net,{},{},T);
net = train(net,Xs,Ts,Xi,Ai);
view(net)
Y = net(Xs,Xi);
perf = perform(net,Ts,Y)
perf =

   1.0100e-09

Was this topic helpful?