projects
/
talweg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix computeError.R
[talweg.git]
/
pkg
/
R
/
computeError.R
diff --git
a/pkg/R/computeError.R
b/pkg/R/computeError.R
index
1fbb2a8
..
3aa028f
100644
(file)
--- a/
pkg/R/computeError.R
+++ b/
pkg/R/computeError.R
@@
-15,7
+15,7
@@
#' @export
computeError = function(data, pred, horizon=data$getStdHorizon())
{
#' @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)
mape_day = rep(0, horizon)
abs_day = rep(0, horizon)
mape_indices = rep(NA, L)
@@
-24,7
+24,7
@@
computeError = function(data, pred, horizon=data$getStdHorizon())
nb_no_NA_data = 0
for (i in seq_len(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)))
serie = data$getSerie(index+1)[1:horizon]
forecast = pred$getForecast(i)[1:horizon]
if (!any(is.na(serie)) && !any(is.na(forecast)))