projects
/
talweg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update following 23/05 TODOs
[talweg.git]
/
pkg
/
R
/
J_Zero.R
diff --git
a/pkg/R/J_Zero.R
b/pkg/R/J_Zero.R
index
fb15e3d
..
16b6ed5
100644
(file)
--- a/
pkg/R/J_Zero.R
+++ b/
pkg/R/J_Zero.R
@@
-1,6
+1,6
@@
#' getZeroJumpPredict
#'
#' getZeroJumpPredict
#'
-#'
Just predict zero "jump" (for reference, benchmarking at least)
.
+#'
"Reset level to 0": jump by -A where A is the last observed value
.
#'
#' @inheritParams computeForecast
#' @param today Index of the current day (predict tomorrow)
#'
#' @inheritParams computeForecast
#' @param today Index of the current day (predict tomorrow)
@@
-10,5
+10,6
@@
#'
getZeroJumpPredict = function(data, today, memory, horizon, params, ...)
{
#'
getZeroJumpPredict = function(data, today, memory, horizon, params, ...)
{
- 0
+ list(...)$first_pred - ifelse( predict_from >= 2,
+ data$getSerie(today)[predict_from-1], tail(data$getSerie(today-1),1) )
}
}