a few fixes
[talweg.git] / pkg / R / computeError.R
index 0b1771f..c3bc4f3 100644 (file)
@@ -16,8 +16,8 @@
 computeError = function(data, pred, predict_from, horizon=length(data$getSerie(1)))
 {
        L = pred$getSize()
-       mape_day = rep(0, horizon)
-       abs_day = rep(0, horizon)
+       mape_day = rep(0, horizon-predict_from+1)
+       abs_day = rep(0, horizon-predict_from+1)
        mape_indices = rep(NA, L)
        abs_indices = rep(NA, L)