Where to transform and inverse-transform
Hi!
I’m working on a LSTM to predict price changes. The data has to be transformed (standardized) when training/validering and later inverse-transformed when predicting in production.
I’m using the LightningModule as well as the LightingDataModule, but I’m not sure where to apply the StandardScaler’s transform and more specifically; where to save the scaler-parameters and where to apply the inverse-transform on the predictions. And ideeas?
// R
Assuming that you are using pytorch TensorDataset, you can apply transform inside setup and inverse transform inside predict_step itself.