{'fraction_non_alphanumeric': 0.018957345971563982, 'fraction_numerical': 0.002369668246445498, 'mean_word_length': 5.530927835051546, '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}}
A numerical filtering method for linear state‐space models with Markov switching

A class of discrete‐time random processes arising in engineering and econometrics applications consists of a linear state‐space model whose parameters are modulated by the state of a finite‐state Markov chain. Typical filtering approaches are collapsing methods, which approximate filtered distributions by mixtures of Gaussians, each Gaussian corresponding to one possibility of the recent history of the Markov chain, and particle methods. This article presents an alternative approach to filtering these processes based on keeping track of the values of the underlying filtered density and its characteristic function on grids. We prove that it has favorable convergence properties under certain assumptions. On the other hand, as a grid method, it suffers from the curse of dimensionality, and so is only suitable for low‐dimensional systems. We compare our method to collapsing filters and a particle filter with examples, and find that it can outperform them on 1‐ and 2‐dimensional problems, but loses its speed advantage on 3‐dimensional systems. Meanwhile, our method has a proven theoretical convergence rate that is probably not achieved by collapsing and particle methods.