The mean square error value is calculated while the ANN is being trained. Some functions are implemented, to use and manipulate this error value. The
fann_get_MSE
function returns the error value and the
fann_reset_MSE
resets the error value. The following explains how the mean square error
value is calculated, to give an idea of the value's ability to reveal the quality of the training.
If d is the desired output of an output neuron and y is the actual output of the neuron, the square error is (d - y) squared. If two output neurons exists, then the mean square error for these two neurons is the average of the two square errors.
When training with the fann_train_on_file
function, an error value is printed. This
error value is the mean square error for all the training data. Meaning that it is the average of all the square errors in each of the training pairs.