#'
#' @param data Object of class \code{Data} output of \code{getData}
#' @param pred Object of class \code{Forecast} output of \code{computeForecast}
-#' @param horizon Horizon where to compute the error
-#' (<= horizon used in \code{computeForecast})
+#' @param predict_from First time step to consider (>= predict_from used in
+#' \code{computeForecast()})
+#' @param horizon Horizon where to compute the error (<= horizon used in
+#' \code{computeForecast})
#'
#' @return A list (abs,MAPE) of lists (day,indices). The "indices" slots contain series
#' of size L where L is the number of predicted days; i-th value is the averaged error
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)