11 views (last 30 days)

Show older comments

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)

Greg Heath
on 15 Feb 2015

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

Greg Heath
on 14 Feb 2015

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

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

Start Hunting!