"Aaron Williams" wrote in message <email@example.com>... > When you use the train function in the neural network toolbox, how do you get the cost function from the outputs? Or are there any other ways to get the cost functions for a perceptron using batch learning? >
[ net tr Y E Xf Af ] = train( net, x, t, Xi, Ai);
Investigate the training record by typing
tr = tr
If training stops because tr.stop = 'Validation set stop.' then tr.best_epoch is max_fail epochs before the end of training at tr.num_epochs.