MATLAB: How to train neural network when given input is a binary vector and output to be a constant integer

binary inputneural networktraining parameters

eg : when i give input as 10111(read as columns,column vector) to network my output should be 4(say). we have training set with which NN can be trained *More importantly how to set constraint parameters like no. of hidden layers,training algorithm,min_grad,max_fail,mu,mu_dec,mu_inc,mu_max to get well trained network in neural network tool box***

Best Answer

You forgot some of the most important information:
1. What do the input and target represent?
2. Are the input and target vectors always 5 and 1 dimensional, respectively?
3. How many input/target pairs do you have?
4. It is not clear if this is classification or regression.
5. No matter which, you will have to make many designs because the default data division
and initial weight assignments are random and not always successful even if all of the other parameters are optimal.
6. Typically, all you need to do is make a good choice for H, the number of hidden nodes,
and design enough nets until you obtain a good random choice of weights and data division.
7. For short examples use the help and doc commands:
help fitnet and doc fitnet for regression
help patternnet and doc patternnet for classification
8. Also check posted examples in the NEWSGROUP and ANSWERS
greg fitnet Ntrials or greg patternnet Ntrials
Hope this helps.
Thank you for formally accepting my answer
Greg