On 24 July 2013 21:32, Ben Harrison <h...@student.unimelb.edu.au> wrote: > On 24 July 2013 19:25, ONKELINX, Thierry <thierry.onkel...@inbo.be> wrote: >> Try rescaling your data prior to splitting it up into a training and test >> set. Otherwise you end up with two different ways of scaling.
> I still cannot understand how I can sensibly revert the scaling of the values. I understand more now about the scaling attributes. I think the following fixes my earlier errors: # Unscale the predictions: descale <- attr(testing, 'scaled:scale')[["MEAS_TC"]] decentre <- attr(testing, 'scaled:center')[["MEAS_TC"]] predicted.tc <- lapply(tc.xyf.prediction$prediction, function(x) x * descale + decentre) ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.