#' @export
computeError = function(data, pred, horizon=data$getStdHorizon())
{
- L = forecast$getSize()
+ L = pred$getSize()
mape_day = rep(0, horizon)
abs_day = rep(0, horizon)
mape_indices = rep(NA, L)
nb_no_NA_data = 0
for (i in seq_len(L))
{
- index = forecast$getIndexInData(i)
+ index = pred$getIndexInData(i)
serie = data$getSerie(index+1)[1:horizon]
forecast = pred$getForecast(i)[1:horizon]
if (!any(is.na(serie)) && !any(is.na(forecast)))