Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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

Nonlinear Autoregressive Neural Network

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

Introduced in R2010b

Was this topic helpful?