0
$\begingroup$

Is it possible to create an LSTM in PyTorch where the time steps are varying? For example, heights where measurements are taken at various times. The data might look like this:

Person id Inches tall Date
1 12 2020-01-01
1 15 2020-03-09
1 32 2020-04-01
1 40 2021-01-01
2 38 2020-05-20
...

Given a history of 4 heights and dates, I'd like to get a prediction of a height at a particular date:

lstm(torch.tensor[(21, '2020-01-02'),
                  (23, '2020-02-02'),
                  (29, '2020-04-12'),
                  (41, '2020-12-02')],
     '2022-01-01')

I passed in '2022-01-01' after the 4 tuples above because I want to get the prediction for my height on this date.

Is this possible? How can I do this?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.