base function for annealing: doesn't actually modify the data, but shows a speedy way of error calculation