Closed tboussaid closed 3 days ago
Hi, thanks for using our library! The problem might be in the shapes of the scalers' parameters. When the scalers are fitted in the SpatioTemporalDataModule
, the library sets them properly according to the data. In particular, the operation done in the datamodule is:
scaler = scaler.fit(data, mask=mask, keepdims=True)
with keepdims=True
ensuring that the scaler's parameters and the data to be scaled have the same shape. Thus, if you want to set the scalers manually, you must ensure that the shapes match by adding dummy one-sized dimensions.
Hi,
I am using the library to train models on data that were already scaled (using sklearn MinMaxScaler). I wanted to use directly TSL Scalers to make it more flexible and neat. I create a
SpatioTemporalDataset
as follows:When printing the dataset through
print(torch_dataset)
, I get:However when I try to get the first sample via
torch_dataset[0]
, I get the following error:I don't see what's the problem here. Could you suggest any solution?
The scalers argument is also available for a
SpatioTemporalDataModule
, is there any difference between applying the scalers inSpatioTemporalDataModule
or inSpatioTemporalDataset
?Thank you in advance for your help.
Best,