How can i predict data by using neural network from input after fitting the data??

Illustration
Atiyo Banerjee - 2021-07-23T10:11:29+00:00
Question: How can i predict data by using neural network from input after fitting the data??

I used Neural Network fitting tool for training my data and got outputs for each target that i supplied to the network. Those outputs are well within the error range and give a good fit for the network. But, now i want to predict output based on input samples not included within the data set that i previously provided to the nnftool for getting the outputs. Please tell me how i can do that? The input samples are withing the training set range.  

Expert Answer

Profile picture of Prashant Kumar Prashant Kumar answered . 2025-11-20

Incorrect understanding:
 
Generalization: Ability to perform well on nontraining data
 
Overfitting: Number of training equations, Ntrneq, not being sufficiently larger than the number of unknown weights, Nw, can be a cause of DECREASED generalization.
 
Mitigation: Either increase Ndof and/or use validation stopping(default) and/or use regularization (e.g., TRAINBR)
Insufficient information:
 
 size(input)  = [ I N ] = [ ? ? ]
 size(target) = [ O N ] = [ ? ? ]
 default number of training examples Ntrn = N-2*round(0.15*N) = ?
 number of training equations Ntrneq = Ntrn*O
 reference mean-square errors
       MSEtrn00  = mean(var(trntarget',1)) % Biased
       MSEtrn00a = mean(var(trntarget',0))% DOF adjusted
       MSEval00  = mean(var(valtarget',1)) % Unbiased
       MSEtst00  = mean(var(tsttarget',1)) % Unbiased

 number of hidden nodes, H = ?
 number of unknown weights Nw = (I+1)*H+(H+1)*O = ?
 number of estimation degrees of freedom Ndof = Ntrneq-Nw = ?
normalized-mean-squuare-errors
      SSEtrn  = sse(trntarget-trnoutput)
      MSEtrn  = SSEtrn/Ntrneq   % mse(trntarget-trnoutput)
      MSEtrna = SSEtrn/Ndof
      NMSEtrn =  MSEtrn/MSEtrn00
      NMSEtrna = MSEtrna/MSEtrn00a
      NMSEval  = MSEval/MSEval00
      NMSEtst  = MSEtst/MSEtst00


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!