# Predicting Sequence based on Tabular Features

I have a dataset regarding a specific junction on a piece of road and the cars that will cross that junction. I am trying to predict the order that cars will pass the specific junction given a set of tabular features. My dataset looks similar to the following:

Target      car1_type  car2_type  car3_type      car1_positionId   car2_positionId   car3_positionId ...
3,1,2       1          2          3              3                 6                 8
2,1,3       8          4          9              1                 4                 2

My features inlcude the type of car (car_type) as well as the position of each car (car_positionId). The position represents a region of road that the car is on. Each row above represents an observed case of 3 cars crossing a junction.

I am trying to predict the target column (the order that the cars will pass over the junction) based on the features given. There is additional complexity in that I also do not know how many cars there will be. There could be just one (trivial case) or there could be up to 20.

My question is what machine learning algorithm could I use to help me predict the order.

• It's not clear to me what your features represent, actually it looks like they don't provide any information: as far as I understand the cars ids are not features, they're just "names" for the cars. Even the cars positions ids don't seem to represent any particular order, do they? In other words, which indications would a human use in order to guess the target order? – Erwan Nov 13 '19 at 11:29
• I have updated the question. Car ids are in fact the type of car (which can be slow or fast etc). For the position, a human would know where the position was and could see which car is furthest away from the junction – Daniel Wyatt Nov 14 '19 at 11:28
• @DanielWyatt Is 20 is an actual upper limit or just an example? – serali Nov 14 '19 at 11:48
• An example. However the actual upper limit should be around that – Daniel Wyatt Nov 14 '19 at 11:51