I need to come up with an algorithm that finds differences in the sequence of each product's routing (or sequence of processes). There are several processes aligned together and each process's been operated under specified equipment.
if there are four processes(A - B - C - D) until the final product and in each process, there are several types of equipment (for example, a1, a2, a3, a4) that operate process A.
The routing for each product can be shown below:
If it turned out product 5 to be a defective product, we may conclude that in the B process, the equipment b4 has most likely caused an issue to the product5.
I want the equipment b4 to be the output of this algorithm and maybe the most possible causes of the defective product 5.
I label-encoded to each piece of equipment by column to implement an equipment learning model and calculate shapeley values for each column to see what process caused an issue. The problem is that in some cases there are few defective products that cause an extreme data imbalance between normal and faulty products' routing
So, approach 1 seems not very positive on this problem.
If you could suggest other feasible algorithms what would it be?