Skip to content

Instantly share code, notes, and snippets.

@h3ik0th
Created May 15, 2022 14:51
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/f5af0f05e2b32f73c59bc773bd044c9e to your computer and use it in GitHub Desktop.
Save h3ik0th/f5af0f05e2b32f73c59bc773bd044c9e to your computer and use it in GitHub Desktop.
# combine feature and time covariates along component dimension: axis=1
ts_cov = ts_covF.concatenate( covT.slice_intersect(ts_covF), axis=1 ) # unscaled F+T
cov_t = covF_t.concatenate( covT_t.slice_intersect(covF_t), axis=1 ) # scaled F+T
cov_ttrain = covF_ttrain.concatenate( covT_ttrain.slice_intersect(covF_ttrain), axis=1 ) # scaled F+T training set
cov_ttest = covF_ttest.concatenate( covT_ttest.slice_intersect(covF_ttest), axis=1 ) # scaled F+T test set
pd.options.display.float_format = '{:.2f}'.format
print("first and last row of unscaled covariates:")
ts_cov.pd_dataframe().iloc[[0,-1]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment