You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I imported the data and converted it into time series, set the target and covariates, divided the training set, test set, and validation set, and normalized them separately. It is not clear to me how to divide the training set, test set, and validation set and scaling them after stacking or concatenating more than two covariates.
If I set:
past_covariates = concatenate([A, B, C, D], axis=1)
stacked_covariates = past_covariates1.stack([past_covariates2, past_covariates3, ..., past_covariatesN])
how to divide and scale past covariates?
Below is my code, the division and standardization of training sets, test sets and validation sets also seem troublesome, please give me some suggestions.
Your code looks great; you fit the Scaler on the training split of the target and then, apply it to the validation and test sets before concatenating them together.
Having a multivariate covariates does not change anything, the Scaler will process them individually (independently from the others components ranges) so you can keep your code as it is. Not sure to understand what your problem is here?
Your code looks great; you fit the Scaler on the training split of the target and then, apply it to the validation and test sets before concatenating them together.↳
Having a multivariate covariates does not change anything, the Scaler will process them individually (independently from the others components ranges) so you can keep your code as it is. Not sure to understand what your problem is here?↳
Thank you for your reply. I was wondering if I need to stack or concatenate covariates, and after stacking can I still divide and standardize them according to the existing code. Now I got it according to your reply~
If the new covariates can be considered as new components, and not "temporal continuation" of existing components, you indeed need to stack them.
The code will continue to work as long as the new covariates (components) are added before fitting the scaler for the first time (otherwise, it will complain about the dimensions of the series).
I imported the data and converted it into time series, set the target and covariates, divided the training set, test set, and validation set, and normalized them separately. It is not clear to me how to divide the training set, test set, and validation set and scaling them after stacking or concatenating more than two covariates.
If I set:
past_covariates = concatenate([A, B, C, D], axis=1)
stacked_covariates = past_covariates1.stack([past_covariates2, past_covariates3, ..., past_covariatesN])
how to divide and scale past covariates?
Below is my code, the division and standardization of training sets, test sets and validation sets also seem troublesome, please give me some suggestions.
The text was updated successfully, but these errors were encountered: