{'fraction_non_alphanumeric': 0.02092675635276532, 'fraction_numerical': 0.0, 'mean_word_length': 5.199074074074074, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Bounds on the probability of misclassification among hidden Markov models

Given a sequence of observations, classification among two known hidden Markov models (HMMs) can be accomplished with a classifier that minimizes the probability of error (i.e., the probability of misclassification) by enforcing the maximum a posteriori probability (MAP) rule. For this MAP classifier, we are interested in assessing the a priori probability of error (before any observations are made), something that can be obtained (as a function of the length of the sequence of observations) by summing up the probability of error over all possible observation sequences of the given length. To avoid the high complexity of computing the exact probability of error, we devise techniques for merging different observation sequences, and obtain corresponding upper bounds by summing up the probabilities of error over the merged sequences. We show that if one employs a deterministic finite automaton (DFA) to capture the merging of different sequences of observations (of the same length), then Markov chain theory can be used to efficiently determine a corresponding upper bound on the probability of misclassification. The result is a class of upper bounds that can be computed with polynomial complexity in the size of the two HMMs and the size of the DFA.