Forecasting by Neural Network

조회 수: 12 (최근 30일)
pradeep kumar
pradeep kumar 2014년 12월 18일
댓글: pradeep kumar 2015년 2월 19일
Hello everyone ! I am entirely new to the "Neural Network Toolbox". However I have explored many example data sets provided in NN toolbox , but i am having trouble in fitting my own case study into it . i am frustrated and completely drained out after following many webinars and searching here. Your help will be highly appreciated . My problem is as follows .
I have the data set which contains monthly demand of 30 vehicle models of a heavy commercial automobile manufacturer for the past 3 years. In short , my datasheet is of size [ 30 X 36 ] , ( 30 vehicle models are represented row wise) .
I want to forecast the future demand of all vehicles by using Neural Network . I have tried using Curve Fitting , Time series (both NAR and NARX) by the default setting and various training algorithms , But still the MSE is not acceptable . Is it just because of my "SMALL data set" ? or anything else ?
Kindly suggest me some method (or some way ) , So that i can work with the same dataset and predict the future values by using Neural Network .
Your coperation will be higly praised . Thank You all in advance ( Please ignore my bad english)
  댓글 수: 10
Greg Heath
Greg Heath 2015년 2월 5일
This performance is not good enough for closeloop prediction. Consider
1. Estimating better values for feedback delays by obtaining the significant delays of the autocorrelation function
2. Determining, by trial and error, the smallest good value for the number of hidden nodes
3. Taking a closer look at my previous posts
greg nncorr narnet
greg narnet Hub
greg narnet Ntrials
greg narnet closeloop
HTH
Greg
pradeep kumar
pradeep kumar 2015년 2월 7일
편집: pradeep kumar 2015년 2월 7일
@ Greg Heath , Respected Sir . As per your instructions i have tried to rectify the network , and the values are as follows .
MSE00 = var(cell2mat(t)) % since my inputs are taken row wise it should not be MSE00 = var(cell2mat(t,1)) .
MSE00 =
1.0021
>> performance
performance =
0.0084
>> nperf = performance/MSE00
nperf =
0.0084
>> ntrnperf = tr.best_perf/MSE00
ntrnperf =
0.0059
>> ntstperf = tr.best_tperf/MSE00
ntstperf =
0.0200
>> nperfc = perfc/MSE00
nperfc =
1.6429
>> NMSE = mse(e)/MSE00
NMSE =
0.0084
I think these values are now upto your expectations . now please tell me how am i able to PREDICT(FORECAST) the next values which are not included in my histrical database . Thanks in advance and have a nice weekend . -Pradeep

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

채택된 답변

Greg Heath
Greg Heath 2015년 2월 15일
It is straightforward. The basic logic is
0. Standardize T using cell2mat and zscore
1. Minimize H subject to NMSEo <= 0.005
neto = narnet(FD,H);
[ Xo Xoi Aoi To ] = preparets( neto,{},{}, T );
neto = configure( neto, Xoi, Aoi);
[ neto Yo Eo Xof Aof ] = train( neto, Xo, To, Xoi, Aoi );
% [ Yo Xof Aof ] = net( Xo, Xoi ,Aoi );
% Eo = gsubtract(To,Yo);
NMSEo = mse(Eo)/mean(var(cell2mat(To}',1))
2. Close the loop on OL neto to obtain CL netc
[ netc Xci Aci ] = closeloop( neto, Xoi, Aoi );
[ Xc Xci Aci Tc ]= preparets( netc,{},{}, T );
[ Yc Xcf Acf ] = netc( Xc, Xci ,Aci );
Ec = gsubtract(Tc,Yc);
NMSEc = mse(Ec)/mean(var(cell2mat(Tc}',1))
3. If NMSEc is not sufficiently small (<= 0.01, 0.05 ???) then train netc initialized with the final weights of neto
[ netc Yc Ec Xcf Acf ] = train( netc, Xc, Tc, Xci, Aci );
% [ Yc Xcf Acf ] = netc( Xc, Xci ,Aci );
% Ec = gsubtract(Tc,Yc);
NMSEc = mse(Ec)/mean(var(cell2mat(Tc}',1))
4. Predict performance Np steps beyond the currently known data
[ Yc2 Xcf2 Acf2 ] = netc( cell(1,Np), Xcf ,Acf );
Hope this helps.
Thank you for formally accepting my answer
Greg
PS I'm sure this is covered in one of my previous posts in the NEWSGROUP or ANSWERS. Search using
greg narnet closeloop
  댓글 수: 2
pradeep kumar
pradeep kumar 2015년 2월 15일
@ Greg Heath : Respected Sir , i got this error , in the 3rd line of your code . kindly help me .
neto = configure( neto, Xoi, Aoi);
Error using network/configure (line 116)
The number of target signals and network outputs do not match.
pradeep kumar
pradeep kumar 2015년 2월 19일
@ Greg Heath , Respected Sir , apart from the above i am getting the following error at the final step . point 4 .Predict performance Np steps beyond the currently known data .
[ Yc2 Xcf2 Acf2 ] = netc( cell(1,Np), Xcf ,Acf );
Error using network/sim (line 267)
Number of input states does not match net.numInputs.
Error in network/subsref (line 14)
case 3, [v,out2,out3] = sim(vin,subs{:});
I want to forecast (predict ) the future value from the modeled Network . Please do me a last favour . Thank You.

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

추가 답변 (1개)

Greg Heath
Greg Heath 2015년 2월 14일
MSE00 = mean(var(cell2mat(T)',1)) % For T cell
MSE00 = mean(var(t',1)) % For t double, series are rows
nperfc is unsatisfactory.
Try training CL netc using the original data but initialized by the final weights of OL neto
If unsatisfactory, design another OL neto. Designing a CL netc from scratch will take too much time AND it will not be guaranteed to be a satisfactory design because the initial weights are random.
Hope this helps.
Greg
  댓글 수: 1
pradeep kumar
pradeep kumar 2015년 2월 14일
@ GReg : how to try training CL netc using the original data but initialized by the final weights of OL neto ? please help me . thankx

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

Community Treasure Hunt

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

Start Hunting!

Translated by