I have a dataset of different products and their possible configurations. I want to build a model which can predict the next part for the product given the previous part/parts. This model will be used in a configurator application, where user will select one part for the product and the next compatible part will be suggested. For example, for a laptop, if user selects an i7 processor, the RAM suggested would be 16gb, after selecting the RAM, a compatible motherboard would be suggested and so on.
The dataset looks something like this
PRODUCT_ID COMPONENT_ID COMPONENT_VALUE STEP_SEQUENCE
A(laptop) Material Plastic 0
A CPU i7 1
A RAM 16gb 2
A HDD 1TB 4
A Screen 15inch 6
B(Mobile) Size 6inch 1
B Display AMOLED 2
B Band LTE 3
A(Laptop) RAM 8gb 1
A HDD 500gb 2
A CPU i3 5
C(Car) Engine v8 1
C Seats 6 2
The problem is that the next value to predict for a product can be based on previous one or more values. Due to this, I cannot keep a fixed window size to create a dataset that can be trained by a neural network(LSTM), As different products have different amount of components.
I cannot use simple row wise classification (Machine Learning) because the output depends on previous input.
Is there a method for multivariate time series classification where I can output value based on previous one value AND more than one values using the same model.
What should be the function to prepare this data for LSTM input?