MATLAB: How can i find the best ann architecture

annDeep Learning Toolboxrainfall

i need some help for building the best performance ann architecture for rainfall forecasting in a village in indonesia with 360 data (months in 30 years). First of all i am a beginner in ann also matlab, i just have a brief understanding of them, just a little bit. iam using nntool in matlab for processing (gui version), i dont even know how to get the syntax from the nntool gui in command window, why am i not using time series ann tools? because its to complicated, just need the simple net to process. Here is the problems and questions:
1.i have a problem for initializing or preparing the data, i.e iam using 2×120 input matrices with 2 inputs and 120 variables, and 1×120 for data target, i just want to predict the data in the next 1 year (it will be 12 data in months), all of the data is rainfall data. My understanding and logic of that kind of data construction is like this "if we have 360 data, and have 2 inputs variables, just divide the data into 3 so it can have same data samples for inputs and targets (cause i think that data target samples must be equal with the input samples), is that logic correct or wrong? just need to know how to prepare our data.
2.the training test of that architecture is really bad (using default training parameters) the mse is around 10^3-10^4, before that i have some questions, is it the performance value in training gui (nntraintool) at the progress table shows the real mse of ann performance? cause i just assume it like that, or if its wrong, how can i get the mse? I just need the mse, the %error and the predicted data for the final conclusion. what is probably the best training parameter for rainfall data (seasonal data)?enter image description here
3.next question is already mentioned in above, is it possible to shows or create the code or syntax from nntool gui? and if it yes how?
for the number of input's nodes, iam using the lagged correlation from the time series scatter plots of the data when it achieve the stasionary (the significant ACF and PACF) and the data divides for training, test and validation using random. iam sorry for my bad explanation (and also english) hope everyone could understand it. Thank you.

Best Answer

>why am i not using time series ann tools?
because its to complicated,
Ridiculous.
1. The help and doc documentation will walk you through the basics.
help narnet
doc narnet
2. Other example datasets are available
help nndatasets
doc nndatasets
3. You may have to design multiple nets to mitigate bad sets of random initial weights.
4. I have posted many design examples in the NEWSGROUP and ANSWERS. For example, search using
narnet greg
5. A quick example of an "o"penloop design:
T = simplenar_dataset;
neto = narnet(1:2,10);
[Xo,Xoi,Aoi,To] = preparets(neto,{},{},T);
to = cell2mat(To); varto = var(to,1)% MSE reference
Ntrials = 10
rng('default')
for i = 1:Ntrials
neto = configure(neto,Xo,To);% Random weight init
[ neto tro Yo Eo Xof Aof ] = train(net,Xo,To,Xoi,Aoi);
%[ Yo Xof Aof ] = neto(Xo,Xoi,Aoi);
% Eo = gsubtract(To,Yo);
view(neto)
NMSEo(i,1) = mse(Eo)/varto % Desire < 0.005
end
6. Modify to either save the net with the smallest normalized MSE or to break if NMSEo < 0.005 is encountered.
Post again if help is needed
Hope this helps.
Thank you for formally accepting my answer
Greg