Skip to content

Instantly share code, notes, and snippets.

@h3ik0th
Created May 15, 2022 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save h3ik0th/57f00ef0292c42d9ddc466d8b7e8aff3 to your computer and use it in GitHub Desktop.
Save h3ik0th/57f00ef0292c42d9ddc466d8b7e8aff3 to your computer and use it in GitHub Desktop.
# choose forecast horizon: k hours beyond end of test set
k = 12
n_FC = k + len(ts_ttest) # length of test set + k hours
print("forecast beyond end of training set:", n_FC,
"hours beyond", ts_ttrain.end_time())
# last 24 hours of feature covariates available => copy them to future 24 hours:
covF_t_fut = covF_t.concatenate( other=covF_t.tail(size=24),
ignore_time_axes=True)
# combine feature and time covariates:
cov_t_fut = covF_t_fut.concatenate(covT_t.slice_intersect(covF_t_fut), axis=1)
cov_t_fut.pd_dataframe().iloc[[0,-1]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment