MATLAB: How i will get the predicted output from this neural network program

data predictionneural network

also any corrections pls tell me,
% Target Vector T = [1 4 9 16 25 36 49 64 81 100]; % T=T';
% Input Vector p =[1 2 3 4 5 6 7 8 9 10]; % p = p';
% Number of hidden neurons S1 = 20;
% Create Network net = newelm(p,T,S1);
% Train Network pseq = con2seq(p); Tseq = con2seq(T); net = train(net,pseq,Tseq);
% Test the network Y = sim(net,pseq); z = seq2con(Y); diff1 = T – z{1,1};

Best Answer

Part of a longer answer isanswer is:
1. The plotted I/O relation is simple and can, for interpolation, be modelled, WITHOUT feedback (e.g. newfit (newff) or fitnet (feedforwardnet), with a SMALL number of hidden nodes, H.
2. However, for future value prediction, feedback from hidden (newelm) and or output (narxnet) nodes is desired.
3. The ranges of P and T are large enough to seriously consider standardization (e.g., zscore or mapstd)
4. More data is needed to yield sufficiently large training, validation and test subsets in order to convincingly illustrate either interpolation (e.g., trn/val/tst are intermingled) or prediction (trn precedes val and tst).
5. If the number of estimated weights, Nw, exceeds the number of training equations, Neq, the net is OVERFIT and OVERTRAINING MITIGATION MEASURES , e.g.,
a. Reduce H and minimize the degree-of-freedom-adjusted training MSE :
MSEtrna = SSEtrn/(Neq-Nw) with the stopping goal MSEtrna <= 0.01*var(Ttrn).
b. Validation set stopping
c. Regularization via msereg
should be employed to prevent poor performance on nontraining data.
6. A more interesting problem than the current one is to try to design a net that will predict nontraining outputs with MSEtst <= 0.01*var(Ttst) using P = [Ptrn,Pval,Ptst] = 0:100; T = P.^2;
Greg