How to use the trained network to predict future values?

조회 수: 17 (최근 30일)
Dmitrii
Dmitrii 2013년 10월 15일
댓글: MUKESH KUMAR 2020년 5월 6일
Hi! I have created neural network using nnstart: NAR; d = 10. After training I saved network in workspase (name: net). Now can I use this trained network to predict future 10 values?

채택된 답변

Greg Heath
Greg Heath 2013년 10월 17일
If the new data immediately follows the data used to design and test the net, the following syntax should have been used
[ net tr Ys Es Xsf Asf ] = train(net,Xs,Ts,Xi,Ai);
Xinew = Xsf; Ainew = Asf;
Ysnew = net(Xsnew,Xinew,Ainew);
Otherwise
Xinew = Xnew(:,1:d); Xsnew = Xnew(:,d+1:end)
but Ainew is not known.
I would try the mean of the previously used test target data rather than use zeros. Perhaps several designs using values in the interval [mean-stdv,mean+stdv] would be useful.
Hope this helps.
Thank you for formally accepting my answer
Greg
  댓글 수: 1
Greg Heath
Greg Heath 2013년 10월 23일
This is similar to asking for the solution of a 2nd order differential equation when you know the forcing function but don't know the initial conditions.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Jonathan LeSage
Jonathan LeSage 2013년 10월 15일
Once you have trained a network, you can use your net as a function. In your case, the outputs of the neural network could be found via outputs = net(inputs).
Here is some additional documentation that you might find helpful:
Hope this helps and best of luck!
  댓글 수: 1
MUKESH KUMAR
MUKESH KUMAR 2020년 5월 6일
showing error,
"Error using network/sim (line 266)
Number of inputs does not match net.numInputs."

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by