Predict a sequence given many sequences

I'm trying to find an algorithm that would fit this use case:

My data: a bunch of fixed-size integer arrays, e.g.

[0,2,3,4,5]
[1,2,3,1,5]
[4,1,2,4,5]
...


Input: an array of integers, and output: prediction for the rest of the array, e.g.

[0,1] -> [2,4,2]
[3] -> [1,3,2,5,5]
[3,2,4,1] -> [4]

• cool question! wish i had the answer... – Dave Kielpinski Apr 2 '20 at 1:51
• This is really too broad a question to answer without some knowledge of the domain (ie how the data was constructed). For example, is there significance to the position in the array - is the probability of 2 following an initial zero related to the possibility of 2 after a zero in second place? – Josh Friedlander Apr 2 '20 at 21:18
• If so, this sounds parallel to next word/ next n-gram models in NLP, except with a vocab of only 10 words. HMMs and LSTMs could work for this. – Josh Friedlander Apr 2 '20 at 21:20
• Are you using a rolling window as your input data? – Donald S Jun 14 '20 at 5:04
• If so, do you expect the same performance for each test example? – Donald S Jun 14 '20 at 5:05