It depents... you have to try different values and keep the one that gives you the lowest error...
Making a NN behave ok its trial and error most of the times...
You have to check the testing and training error if possible at runtime, and when you see that test error is increasing while train error decreases that meen that your NN overtrains. So you have to decrease epochs, learning rate, monentum. Atherwise you will might have to increase one or some of these parameters.
You must check cross-validation 372-375 pp. Neural Networks for Pattern Recognition Christopher M. Bishop. Stop the training when you see test error is increasing.
There are several things that affect the error, the initial process (transformation), the selection of input, number of neurons, learning algorithm, learning rate and even activation function. We have to choose correct combination between input and number of neurons in hidden layer for the best NN. I agree with Mr Christos Kannas.
i want to use adapt function in matlab to adapt a Recurrent Neural Network, i want to know if i must use Ai and Pi each time i update the net, or the function will take it from the network.
You can do it by several ways. Either by changing the internal structure like number of neurons and layers and epoch etc. or by using optimization algorithms. I am sure that the thesis of my student which was about the sensitivity analysis on ANN can be useful for you.
Article A Sensitivity Analysis on Application of Artificial Neural N...