projects
/
talweg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
'update'
[talweg.git]
/
pkg
/
R
/
computeForecast.R
diff --git
a/pkg/R/computeForecast.R
b/pkg/R/computeForecast.R
index
c778d66
..
e1b29b6
100644
(file)
--- a/
pkg/R/computeForecast.R
+++ b/
pkg/R/computeForecast.R
@@
-27,6
+27,7
@@
#' @param memory Data depth (in days) to be used for prediction.
#' @param horizon Last time step to predict.
#' @param ncores Number of cores for parallel execution (1 to disable).
#' @param memory Data depth (in days) to be used for prediction.
#' @param horizon Last time step to predict.
#' @param ncores Number of cores for parallel execution (1 to disable).
+#' @param verbose TRUE to print basic traces (runs beginnings)
#' @param ... Additional parameters for the forecasting models.
#'
#' @return An object of class Forecast
#' @param ... Additional parameters for the forecasting models.
#'
#' @return An object of class Forecast
@@
-60,7
+61,7
@@
#' } }
#' @export
computeForecast = function(data, indices, forecaster, pjump, predict_from,
#' } }
#' @export
computeForecast = function(data, indices, forecaster, pjump, predict_from,
- memory=Inf, horizon=length(data$getSerie(1)), ncores=3, ...)
+ memory=Inf, horizon=length(data$getSerie(1)), ncores=3,
verbose=FALSE,
...)
{
# (basic) Arguments sanity checks
predict_from = as.integer(predict_from)[1]
{
# (basic) Arguments sanity checks
predict_from = as.integer(predict_from)[1]
@@
-89,6
+90,8
@@
computeForecast = function(data, indices, forecaster, pjump, predict_from,
computeOneForecast <- function(i)
{
computeOneForecast <- function(i)
{
+ if (verbose)
+ print(paste("Index",i))
list(
"forecast" = forecaster$predictSerie(data,i,memory,predict_from,horizon,...),
"params" = forecaster$getParameters(),
list(
"forecast" = forecaster$predictSerie(data,i,memory,predict_from,horizon,...),
"params" = forecaster$getParameters(),