Skip to content

Is window in forecasting correct? #4

@gedeck

Description

@gedeck

The window has length 13, should it be length 12?

# code for forecasting one month ahead with sliding window 
forecast.ts <- c()
window <- norm_train.ts[(nTrain-12):nTrain]
for (i in 1:36) {
  x <- array(data=window, dim=c(1, ninput, 1)) 
  pred <- predict(lstm_model, x, batch_size=1) 
  window <-  c(window[2:length(window)], pred[1]) 
  forecast.ts <- c(forecast.ts, pred[1])
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions