{'fraction_non_alphanumeric': 0.016113744075829384, 'fraction_numerical': 0.0, 'mean_word_length': 5.285714285714286, '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}}
ECM and MM algorithms for normal mixtures with constrained parameters

EM algorithms for obtaining maximum likelihood estimates of parameters in finite normal mixture models are well-known, and certain types of constraints on the parameter space, such as the equality of variance assumption, are very common. Here, we consider more general constraints on the parameter space for finite mixtures of normal components. Surprisingly, these simple extensions have not been explored in the literature. We show how the MLE problem yields to an EM generalization known as an ECM algorithm. For certain types of variance constraints, yet another generalization of EM, known as MM algorithms, is required. After a brief explanation of these algorithmic ideas, we demonstrate how they may be applied to parameter estimation and hypothesis testing in finite mixtures of normal components in the presence of linear constraints on both mean and variance parameters. We provide implementations of these algorithms in the mixtools package for the R statistical software.