adapt Bruno method into package, add 'operational' mode
[talweg.git] / pkg / R / computeForecast.R
index ca8badd..ef46dd3 100644 (file)
@@ -56,6 +56,8 @@ computeForecast = function(data, indices, forecaster, pjump, predict_from,
        predict_from = as.integer(predict_from)[1]
        if (! predict_from %in% 1:length(data$getSerie(1)))
                stop("predict_from in [1,24] (hours)")
+       if (hasArg("opera") && !list(...)$opera && memory < Inf)
+               memory <- Inf #finite memory in training mode makes no sense
        horizon = as.integer(horizon)[1]
        if (horizon<=predict_from || horizon>length(data$getSerie(1)))
                stop("Horizon in [predict_from+1,24] (hours)")