Add capability to measure error of predictions