This excellent article on the implementation of the hidden Markov model in C # does a fair job of classifying a single bit sequence based on training data.
How to change the algorithm or create it (several HMM?) To support the classification of several simultaneous bit sequences?
Example
Instead of classifying only one thread:
double t1 = hmm.Evaluate(new int[] { 0,1 });
double t2 = hmm.Evaluate(new int[] { 0,1,1,1 });
Rather, classify a stream with two bits:
double t1 = hmm.Evaluate(new int[] { [0, 0], [0, 1] });
double t2 = hmm.Evaluate(new int[] { [0, 0], [1, 1], [0, 1], [1, 1] });
Or even better, three threads:
double t1 = hmm.Evaluate(new int[] { [0, 0, 1], [0, 0, 1] });
double t2 = hmm.Evaluate(new int[] { [0, 0, 1], [1, 1, 0], [0, 1, 1], [1, 1, 1] });
Obviously, training data will also be expanded.