Calculates the Root-mean-square error of cross-validation