re-ignore doc - fix exogens usage
[talweg.git] / pkg / R / F_Neighbors.R
index f1aecb5..7144fad 100644 (file)
@@ -164,13 +164,12 @@ NeighborsForecaster = setRefClass(
                        {
                                h_exo = ifelse(simtype=="mix", h[2], h)
 
-                               # TODO: [rnormand] if predict_at == 0h then we should use measures from day minus 1
-                               M = matrix( nrow=1+length(fdays_indices), ncol=1+length(dat[[today]]$exo_hat) )
-                               M[1,] = c( dat[[today]]$level, as.double(dat[[today]]$exo_hat) )
+                               M = matrix( nrow=1+length(fdays_indices), ncol=1+length(dat[[today]]$exo) )
+                               M[1,] = c( dat[[today]]$level, as.double(dat[[today]]$exo) )
                                for (i in seq_along(fdays_indices))
                                {
                                        M[i+1,] = c( dat[[ fdays_indices[i] ]]$level,
-                                               as.double(dat[[ fdays_indices[i] ]]$exo_hat) )
+                                               as.double(dat[[ fdays_indices[i] ]]$exo) )
                                }
 
                                sigma = cov(M) #NOTE: robust covariance is way too slow