[ I N ] = size(x)
[O N ]= size(t)
1. For precision computing transform to zero mean and unit biased variance data (zx = zscore(x',1)', etc)
2. First time through use as many defaults as possible (trainlm with trn/val/tst =21/5/5 or trainbr with /25/0/6)
> What, I have done is used the first 25 data points and trained and tested > the network using nftool, remaing 6 data points I have used the trained > network to predict and selected that network which gave me the least > error in the output.
Very insufficient detail. Network type? No. of hidden nodes? No. of candidate designs with different initial weights? How did you avoid overfitting the network and memorizing training data?(val or trainbr?)
Many designs are needed to eliminate unfortunate values of initial weights and make sure that the network is not overfit (more weights than than the 26 training equations) and overtrained (memorizing training data without val or trainbr)).
First practice with MATLAB datasets to make sure you have enough data to obtain a good design.
Next use as many defaults as possible.
If no validation set use trainbr instead of trainlm.
If you are not using trainbr, try to minimize the number of hidden nodes.
Next time you post provide more details
Hope this helps.
Thank you for formally accepting my answer