Event prediction sequence I need to create an app to predict events.

I'll explain my requirements: I've a set of intermediate events (eg.: 1, 2, 3...9) and a set of final event (eg.: A for OK and B for KO). This events bring a correlation id to relate each other.

What ML algorithm can I use to predict if a sequence of events could cause a future KO event (B in my example) or not?

I need an unsupervised algorithm.

Any idea about the algorithm?
Maybe sequential association rules could be applied here. Please check spmf java library, section 'Sequential Rule Mining'.