- predicted_shape = self$predictShape(data, today, memory, horizon, ...)
- predicted_delta = private$.pjump(data,today,memory,horizon,private$.params,...)
- # Predicted shape is aligned it on the end of current day + jump
- predicted_shape+tail(data$getSerie(today),1)-predicted_shape[1]+predicted_delta
+ predicted_shape <- self$predictShape(data,today,memory,predict_from,horizon,...)
+ predicted_delta <-
+ if (is.null(private$.pjump))
+ NULL
+ else
+ private$.pjump(data,today,memory,predict_from,horizon,private$.params,...)
+
+ # Predicted shape is aligned on the end of current day + jump (if jump!=NULL)
+ c( data$getSerie(today)[if (predict_from>=2) 1:(predict_from-1) else c()],
+ predicted_shape + ifelse( is.null(private$.pjump),
+ 0,
+ predicted_delta - predicted_shape[1] +
+ ifelse(predict_from>=2,
+ data$getSerie(today)[predict_from-1], tail(data$getSerie(today-1),1)) ) )