pytorch-forecasting icon indicating copy to clipboard operation
pytorch-forecasting copied to clipboard

How to split the data into train, test, and validation

Open sauravsingh-couture opened this issue 10 months ago • 1 comments

  • PyTorch-Forecasting version: 1.0.0
  • PyTorch version: 2.0.1
  • Python version: 3.8
  • Operating System: Linux

I have data of 17 months, so my time_idx ranges from 0-16. There are total 3664 unique ids in my data. So my data has total rows 62288. I just want to split my data into train, val, and test.

  • Train data ranges from 0 to 14 time_idx
  • Val data should have 15 time_idx
  • Test data should have 16 time_idx

So how would I achieve it from inbuilt class TimeSeriesDataset and inbuilt class method .from_dataset?

sauravsingh-couture avatar Apr 05 '24 11:04 sauravsingh-couture

You can refer to this example. See Cell 5 where trainingand validation are defined.

ivanightingale avatar May 07 '24 16:05 ivanightingale