make it generic (with errors)
support training data mean squared error calculation