Fixed bug un calculation of the error in execute_learn_algorithm.