From here to infinity: sparse finite versus Dirichlet process mixtures in model-based clustering

In model-based clustering mixture models are used to group data points into clusters. A useful concept introduced for Gaussian mixtures by Malsiner Walli et al. (Stat Comput 26:303–324, 2016) are sparse finite mixtures, where the prior distribution on the weight distribution of a mixture with K components is chosen in such a way that a priori the number of clusters in the data is random and is allowed to be smaller than K with high probability. The number of clusters is then inferred a posteriori from the data. The present paper makes the following contributions in the context of sparse finite mixture modelling. First, it is illustrated that the concept of sparse finite mixture is very generic and easily extended to cluster various types of non-Gaussian data, in particular discrete data and continuous multivariate data arising from non-Gaussian clusters. Second, sparse finite mixtures are compared to Dirichlet process mixtures with respect to their ability to identify the number of clusters. For both model classes, a random hyper prior is considered for the parameters determining the weight distribution. By suitable matching of these priors, it is shown that the choice of this hyper prior is far more influential on the cluster solution than whether a sparse finite mixture or a Dirichlet process mixture is taken into consideration.


Introduction
In the present paper, interest lies in the use of mixture models to cluster data points into groups of similar objects; see Frühwirth-Schnatter et al. (2018) for a review of mixture analysis. Following the pioneering papers of Banfield and Raftery (1993) and Bensmail et al. (1997), model-based clustering using finite mixture models has found numerous applications, see Grün (2018) for a comprehensive review.
For finite mixtures, the number K of components is an unknown, but fixed quantity and the need to specifiy K in advance is considered one of the major drawbacks of applying finite mixture models in a clustering context. Many methods have been suggested to estimate K from the data such as BIC (Keribin 2000), marginal likelihoods (Frühwirth-Schnatter 2004), or the integrated classification likelihood (Biernacki et al. 2000), but typically these methods require to fit several finite mixture models with increasing K . Alternatively, one-sweep methods such as reversible jump MCMC (Richardson and Green 1997;Dellaportas and Papageorgiou 2006) have been suggested, but are challenging to implement.
As an alternative to finite mixtures, Dirichlet process mixtures (Ferguson 1983;Escobar and West 1995) were applied in a clustering context by Quintana and Iglesias (2003) and Medvedovic et al. (2004), among many others. Using a Dirichlet process prior (Ferguson 1973(Ferguson , 1974 for the parameters generating the data points, Dirichlet process mixtures allow infinite components by construction. Posterior inference focuses on the partitions and clusters induced by the Dirichlet process prior on the data points. The number of non-empty clusters is random by construction and can be inferred from the data using easily implemented Markov chain Monte Carlo samplers, see e.g. Müller and Mitra (2013).
Recently, the concept of sparse finite mixtures has been introduced within the framework of Bayesian model-based clustering (Malsiner Walli et al. 2016, 2017) as a bridge between standard finite mixture and Dirichlet process mixture models. Based on theoretical results derived by Rousseau and Mengersen (2011), the sparse finite mixture approach relies on specifying a sparse symmetric Dirichlet prior D K (e 0 ) on the weight distribution of an overfitting finite mixture distribution, where the number of components is larger than the number of clusters in the data. By choosing small values for the hyperpararmeter e 0 , the sparse Dirichlet prior is designed to favour weights close to zero. Malsiner Walli et al. (2017) investigate the partitions induced by such a sparse finite mixture model and show that the corresponding number of clusters created in the data is not fixed a priori. Rather, as for Dirichlet process mixtures, it is random by construction and can be inferred from the data using common Markov chain Monte Carlo methods.
The present paper makes two contributions in the context of sparse finite mixture modelling. As a first contribution, it is illustrated that the concept of sparse finite mixtures, which was originally developed and investigated in the framework of Gaussian mixtures, is very generic and can be easily extended to cluster a broad range of non-Gaussian data, in particular discrete data and continuous multivariate data arising from non-Gaussian clusters, see also Malsiner-Walli et al. (2018). As mentioned above, an advantage of sparse finite mixtures is that model selection with respect to the number of clusters is possible within one-sweep samplers without the need to design sophisticated proposals within trans-dimensional approaches such as reversible jump MCMC. Performing model selection without computer-intensive methods is of particular interest for mixtures of non-Gaussian components where the calculation of the marginal likelihood can be cumbersome and almost impossible for large K . A wide range of applications, including sparse Poisson mixtures, sparse mixtures of generalised linear models for count data, and sparse latent class models for multivariate categorical data, demonstrate that sparse finite mixtures provide a useful method for selecting the number of clusters for such data.
A second aim of the paper is to compare sparse finite mixtures to Dirichlet process mixtures with respect to their ability to identify the number of clusters. As shown by Green and Richardson (2001), a K component finite mixture model with symmetric Dirichlet prior D K (α/K ) on the weights approximates a Dirichlet process mixture with concentration parameter α as K increases. For α given, this sequence of finite mixtures increasingly becomes sparse, as e 0 = α/K decreases with increasing K and the Dirichlet process mixture can be seen as the limiting case of a sparse finite mixture with K = ∞. Both for sparse finite mixtures and Dirichlet process mixtures, the number of non-empty clusters is random a priori and can be estimated from the data. Since Dirichlet process mixtures can be inconsistent with respect to the number of components (Miller and Harrison 2013), sparse finite mixtures appear to be an attractive alternative which shares many interesting features with Dirichlet process mixtures.
Finite mixture and Dirichlet process mixture models are generally considered to be quite different approaches. Irrespectively of this, the aim of the paper is not to discuss pros and cons of the two model classes. Rather, it will be shown that both model classes yield similar inference with respect to the number of clusters, once the hyper prior for α is matched to hyper priors on e 0 that induces sparsity. Comparisons between sparse finite mixtures and Dirichlet process mixtures in applications based on Poisson mixtures, mixtures of generalised linear models, and latent class models illustrate that the choice of the hyper prior on e 0 and α is far more influential on the cluster solution than which of the two model classes is taken into consideration.
The rest of the paper is organized as follows. Section 2 summarizes the concept of sparse finite mixtures and investigates their relationship to Dirichlet process mixtures. Section 3 reviews various finite mixture models with non-Gaussian components. Section 4 contains an extensive simulation study where the performance of sparse finite mixtures and Dirichlet process mixtures in regard to model selection and clustering behavior is investigated in detail for latent class models. In Sect. 5, the sparse finite mixture approach is illustrated and compared to Dirichlet process mixtures through case studies for each type of non-Gaussian mixture model discussed in Sect. 3. Section 6 concludes with a final discussion of the sparsity prior of the weight distribution in sparse finite mixtures.

From finite mixture distributions to sparse finite mixture models
The starting point of model-based clustering is a finite mixture distribution defined as: where the component densities f T (y|θ k ) arise from the same distribution family T (θ), each with weight η k , and K k=1 η k = 1. Data y generated from such a mixture distribution can be univariate or multivariate, continuous, discrete-valued or mixed-type, outcomes of a regression model, or even time series data; see Frühwirth-Schnatter (2006) for a comprehensive review of finite mixture distributions.
Clustering arises in a natural way for an i.i.d. sample from the finite mixture distribution (1), since each observation y i can be associated with the component, indexed by S i , that generated this data point: If N i.i.d. data points y 1 , . . . , y N are drawn from the finite mixture distribution (1), then the sequence S = (S 1 , . . . , S N ) is the collection of all component indicators that were used to generate the data. Obviously, S defines a partition P of the data. Let N k be the number of observations generated by component k, k = 1, . . . , K . Then (2) implies that: Depending on the weight distribution η = (η 1 , . . . , η K ) appearing in (1), multinomial sampling according to (3) may lead to partitions with N k = 0. In this case, fewer than K mixture components were used to generate the N data points which contain K + data clusters, i.e.
It is important to realize that in model-based clustering interest lies foremost in estimating the number of clusters in the data, rather than the number of components of the mixture distribution (1). Hence, in model-based clustering based on finite mixtures, it is extremely important to distinguish between the order K of the underlying mixture distribution and the number of (non-empty) clusters K + in the N data points. For finite mixtures this difference between K and K + is rarely addressed explicitly, exceptions being Nobile (2004) and, more recently, Harrison (2018) andMalsiner Walli et al. (2017).
If finite mixtures are used to cluster data with the number of clusters K + being unknown, then it makes sense to choose a prior on the weight distribution η = (η 1 , . . . , η K ) that allows a priori that K + < K with high probability. This is the very idea of the sparse finite mixture approach introduced by Malsiner Walli et al. for mixtures of univariate and multivariate Gaussian distributions. Sparse finite mixture models make a clear distinction between K , the order of the mixture distribution, and K + , the number of clusters in the data.
The sparse finite mixture approach pursues the following idea: if we choose a mixture model that is overfitting, then K + < K clusters will be present in the data. Then, as an intrinsically Bayesian approach, for a given value of K a prior distribution on K + is imposed which allows K + to be a random variable a priori, taking values smaller than K with high probability. This is achieved in an indirect way through choosing an appropriate prior on the weight distribution η = (η 1 , . . . , η K ), the commonly used prior being the Dirichlet distribution η ∼ D (e 1 , . . . , e K ). Very often, a symmetric Dirichlet prior is assumed with e k ≡ e 0 , k = 1, . . . , K ; such a prior will be denoted by η ∼ D K (e 0 ). If e 0 is a small value, then many of the K weights will be small a priori, implying that not all K components will generate a cluster of their own and, according to (3), K + < K with high probability. The prior of K + depends on both e 0 and K , as illustrated in Fig. 1, showing the prior distribution p(K + |e 0 , K ) for various values of K and e 0 . For increasing K and e 0 also the expected number of clusters K + increases.
Given data y = (y 1 , . . . , y N ), the posterior distribution p(K + |y) of K + is used to estimate the number of data clusters. For each iteration m of MCMC sampling (to be discussed in Sect. 2.4), a partition S (m) is sampled and given the corresponding occupation numbers N (m) 1 , . . . , N (m) K , the number of non-empty clusters K (m) + is determined using (4). Then,K + is estimated by the most frequent number of non-empty components:K + = mode{ p(K + |y)}. To illustrate the practical procedure, a sparse latent class model with K = 10 and e 0 = 0.005 is fitted to the Childrens' Fear Data which will be investigated in Sect. 5.1. In Fig. 2, the corresponding trace plot of K (m) + is plotted for 8000 MCMC iterations. Whereas observations are assigned to all 10 components at the very beginning, most components become empty rather quickly and the chain switches between 2 and 5 nonempty components in its steady state. With the mode of the posterior p(K + |y) being clearly equal to two, two data clusters are estimated for this data set.

From sparse finite mixture models to Dirichlet process mixtures
Sparse finite mixture models allow to estimate the number K + clusters a posteriori, given the data. A sparse finite mixture is "sparse" insofar, as it uses less than K components of the underlying finite mixture distribution for clustering the data. In this sense, the sparse finite mixture approach is related to Bayesian non-parametric approaches such as Dirichlet process mixtures (DPM) based on the Dirichlet process prior G ∼ DP (α, G 0 ) with concentration parameter α and base measure G 0 .
Random probability measure priors like the Dirichlet process prior lead to countably infinite mixtures, which have a representation similar to (1), however with K = ∞: where η k are random weights such that ∞ k=1 η k = 1 almost surely. With K being infinite, the focus of DPM automatically lies on the partitions implied by the Dirichlet process prior and the corresponding number of clusters K + . In this sense, DPM implicitly make a distinction between K and K + .
If the base measure θ k ∼ G 0 of a DPM is the same as the prior p(θ k ) in a finite mixture model, then the only difference between these two model classes lies in the prior on the weight distribution. A stick-breaking representation (Sethuraman 1994) of the weights η 1 , η 2 , η 3 , . . . in terms of a sequence v 1 , v 2 , v 3 , . . . of independent random variables, so-called sticks, allows to construct the weights iteratively for both model classes: However, the two model classes differ in the parameters a k and b k , as v k ∼ B (1, α) , k = 1, 2, . . ., for a DPM with precision parameter α and v k ∼ B (e 0 , (K − k)e 0 ) , k = 1, . . . , K − 1, v K = 1 for a finite mixture model with parameter e 0 , see e.g. Frühwirth-Schnatter (2011a).
To understand the clustering behavior of both model classes, it is illuminating to compare them in regard to the prior probability to create a new cluster when reallocating an observation y i , given all remaining observations y −i . For a DPM this probability is equal to (Lau and Green 2007): α independently of the current number of non-empty clusters K −i + implied by S −i , where S −i denotes all indicators excluding S i . This leads to well-known issues with modelbased clustering based on DPM. Since the number of cluster K + ∼ α log(N ) increases with N , it is very likely that one big cluster is found, the sizes of further clusters are geometrically decaying, and many singleton clusters are estimated (Müller and Mitra 2013).
In contrast, for sparse finite mixtures the probability that observation y i is assigned to an empty cluster, given the indicators S −i for all remaining observations, reads (Lau and Green 2007): i.e. the probability to create a new cluster goes to zero as the number of non-empty clusters K −i + increases. Based on (7), Malsiner Walli et al. (2017) argue that a sparse finite mixture with fixed K provides a two-parameter alternative to DPM where K + ≤ K is finite, even if N goes to infinity. Hence, DPM are mainly useful if the modelling assumption is that the number of data clusters increases with increasing data information as is the case e.g in the text mining framework, where the number of topics may increase, if more documents are considered. As opposed to that, sparse finite mixtures are mainly useful for applications where the underlying assumption is that the data arise from a moderate number of clusters, even if the number of data points N increases. However, it should be remarked that these recommendations are based on theoretical considerations. As we will see in the simulation study and the applications, the clustering performance of both model classes becomes comparable, if the priors of the precision parameters α and e 0 driving the stick-breaking representation are appropriately matched, as explained in the following subsection.

The importance of hyper priors on the precision parameters
It is obvious from the probabilities to create a new cluster given in (6) and (7) that the precision parameters e 0 and α exercise considerable impact on the resulting clustering. For DPM it is common to assume that α is unknown, typically following a Gamma prior: where E(α) = a α /b α . Choosing a large value b α is particularly relevant, because it encourages clustering (Müller and Mitra 2013). Commonly, the following prior suggested by Escobar and West (1995) is applied: α ∼ G (2, 4) with expectation E(α) = 0.5.
For finite mixture models, it is less common to assume that e 0 is an unknown precision parameter to be estimated from the data -rather e 0 is typically fixed. Choosing e 0 = 1, for instance, leads to a uniform prior over the unit simplex spanned by all possible weight distributions η 1 , . . . , η K . Frühwirth-Schnatter (2006) recommends choosing e 0 = 4. This implies that the number of clusters K + is equal to the number of components K with high probability, see again Fig. 1 which is sensible only if we assume that the data actually contain K groups.
For sparse finite mixtures, where K + is unknown a priori and typically smaller than K , the precision parameter e 0 heavily influences the probability to create a new cluster given in (7), see also Fig. 1. Hence, Malsiner Walli et al. (2016) suggested to estimate e 0 from the data using the following Gamma prior: where E(e 0 ) = a e /b e is a small number. Malsiner Walli et al. (2016) compared the clustering results obtained by putting a hyper prior on e 0 with an analysis where e 0 is a fixed, small value such as e 0 = 0.01 for sparse finite mixtures of Gaussian distributions. The results indicated that it is important to choose values of a e and b e that imply strong prior shrinkage of e 0 toward 0, see also van Havre et al. (2015). As shown in the present paper, such a choice of a e and b e is also crucial for more general sparse finite mixture models in the context of clustering discrete data and data with non-Gaussian clusters. A further discussion of this issue will be provided in Sect. 6.
As will be demonstrated in the applications in Sect. 5, sparse finite mixtures lead to sensible estimates of the number of clusters and often coincide with the number of components selected by marginal likelihoods based on e 0 = 4. As opposed to that DPM tend to overfit the number of clusters, as recently shown by Miller and Harrison (2013). There is an asymptotic explanation for this behaviour, however, as will be shown, for moderately sized data sets, this behaviour has to be mainly addressed to the influence of the hyper prior on α.
Indeed, the asymptotic relationship e 0 ≈ α/K between sparse finite mixtures with K components and DPM can be exploited to match the priors to each others: A simulation study and various applications will demonstrate that this matching leads to a "sparse" DPM that avoids overfitting the number of clusters. On the other hand, if a sparse finite mixture is matched through e 0 ∼ G (a α , K b α ) to a DPM with common priors such as a α = 2, b α = 4, then it tends to lose its ability to find sensible cluster solutions and overestimates the number of clusters as well.

Bayesian inference
Bayesian inference both for sparse finite mixture model as well as the DPM model is summarized in Algorithm 1. It is assumed that the base measure G 0 is equal to the prior distribution p(θ k ). For both model classes, basically the same Gibbs sampling scheme can be used with model-specific steps for sampling the precision parameters e 0 and α. Bayesian estimation of a sparse finite mixture is a straightforward extension of MCMC estimation of a standard finite mixture (Frühwirth-Schnatter 2006, Chapter 3) and requires only one additional step to update e 0 (Malsiner Walli et al. 2016). Bayesian inference for the DPM model relies on full conditional MCMC sampling as introduced in Ishwaran and James (2001).

Algorithm 1 Choose an initial classification S and repeat the following steps:
(a) Sample from θ k |S, y for all k = 1, . . . , K : (a-1) for all non-empty components (i.e. N k = 0), sample θ k from the complete-data posterior p(θ k |S, y); (a-2) for all empty components (i.e. N k = 0), sample θ k from the prior p(θ k ).
Determine the weights from the sticks using the stick-breaking representation (5). (c) Sample S|η, y by sampling each S i independently for i = 1, . . . , N : (d) Sample the precision parameters using an MH step: By exploiting the stick breaking representation (5), sampling the weight distribution in Step (b) is unified for both model classes. For DPM models, classification in Step (c) is performed using slice sampling (Kalli et al. 2011) (Papaspiliopoulos and Roberts 2008). For sparse finite mixtures, ξ k ≡ 1, and no truncation is performed, i.e.
Step (c-1) is skipped and Step (c-2) is equal to the standard classification step, since To sample e 0 in Step (d-1), we use an MH-algorithm with a high level of marginalization, where e 0 is sampled from the conditional posterior p(e 0 |P, K ) given the partition P rather than from p(e 0 |η) as in Malsiner Walli et al. (2016). Special care has to be exercised for shrinkage priors on e 0 and α, when implementing the MH-algorithm in Step (d), since the acceptance rate often involves the evaluation of the Gamma function for very small values, which can lead to numerical problems. However, these problems can be easily avoided by writing (x) = (1 + x)/x for arguments x close to 0.
The fitted models are identified in order to obtain a final partition of the data and to characterize the data clusters. We employ the post-processing procedure suggested by Frühwirth-Schnatter (2006) (see also Frühwirth-Schnatter 2011b) for finite mixtures and successfully applied in many papers, e.g. Malsiner Walli et al. (2016Walli et al. ( , 2017. Roughly speaking, the procedure works as follows. First, the number of data clus-tersK + is estimated by the mode of the posterior p(K + |y). Then for all posterior draws were K (m) + =K + , the component-specific parameters θ k , or some (lowerdimensional) functional ϕ(θ k ), are clustered in the point process representation intô K + clusters using k-means clustering. A unique labeling of the draws is obtained and used to reorder all draws, including the sampled allocations. The final partition is then determined by the maximum a posteriori (MAP) estimate of the relabelled cluster allocations.
This procedure is applied to the MCMC output of both finite and infinite mixture models. An advantage of this procedure is that the final partition and the cluster-specific parameters can be estimated at the same time.
(Sect. 3.3). Finally, Sect. 3.4 considers clustering continuous data with non-Gaussian clusters using mixtures of univariate and multivariate skew normal and skew-t distributions. For each of these classes of mixture models, case studies are provided in Sect. 5 where sparse finite mixtures are compared to Dirichlet process mixtures of the same type.

Sparse latent class models
First, we consider model-based clustering of multivariate binary or categorical data Mixture models for multivariate discrete data, usually called latent class models, or latent structure analysis, have long been recognized as a useful tool in the behavioral and biomedical sciences, as exemplified by Lazarsfeld and Henry (1968), Goodman (1974) and Clogg and Goodman (1984), among many others; see also Frühwirth-Schnatter (2006, Section 9.5) for a review. In Sect. 5.1 we will analyse the Childrens' Fear Data (Stern et al. 1994) using a sparse latent class model.
In latent structure analysis it is assumed that the entire dependence between the elements Y 1 , . . . , Y r of Y, which are the so-called manifest variables, is caused by a discrete latent variable S i , the so-called latent class. Therefore, conditional on the latent variable S i , the variables Y 1 , . . . , Y r , are stochastically independent. Latent structure analysis is closely related to multivariate mixture modeling, as marginally Y follows a multivariate discrete mixture distribution: where π k, j is a parameter modeling the discrete probability distribution of Y j in class k.
The basic latent class model results, if the data are a collection of multivariate binary observations y 1 , . . . , y N , where each y i = (y i1 , . . . , y ir ) is an r -dimensional vector of 0s and 1s, assumed to be the realization of a binary multivariate random variable Y = (Y 1 , . . . , Y r ). The marginal distribution of Y is then equal to a mixture of r independent Bernoulli distributions, with density: is the occurrence probability for each j = 1, . . . , r in the different classes and the K components of the mixture distribution correspond to the K latent classes.
Over the years, many variants and extensions of the basic latent class model have been considered. One particularly useful extension deals with multivariate categorical data y 1 , . . . , y N , where y i = (y i1 , . . . , y ir ) is the realization of an r -dimensional categorical random variable Y = (Y 1 , . . . , Y r ) as above, however, with each element Y j taking one value out of D j categories {1, . . . , D j }. Again, a multivariate mixture distribution results: where π k, jl = Pr(Y j = l|S i = k) is the probability of category l for feature Y j in class k. Within a Bayesian framework, the K r unknown probability distributions π k, j = (π k, j1 , . . . , π k, j D j ) of feature Y j in class k are equipped with a symmetric Dirichlet prior π k, j ∼ D D j g 0, j . In Step (a) of Algorithm 1, this leads to full conditional posterior distributions π k, j |S, y arising from the Dirichlet distribution, see Frühwirth-Schnatter (2006, Section 9.5) for further details.
If K is unknown, then the marginal likelihood p(y|K ) could be used to estimatê p(y|K ) over a range of different values of K , using e.g. bridge sampling (Frühwirth-Schnatter 2004). A particularly stable estimatorp(y|K ) of the marginal likelihood is given by full permutation bridge sampling, where the importance density is derived from all K ! possible permutations ρ s of the group labels of a subsequence of posterior draws S (l) , l = 1, . . . , S 0 of the unknown allocations, see Celeux et al. (2018, Section 7.2.3.2) for more details. Sparse finite as well as DP mixtures of latent class models are interesting alternatives to estimate the number of data clusters in modelbased clustering. This will be investigated through a simulation study in Sect. 4.

Sparse finite Poisson mixture models
A popular model for capturing unobserved heterogeneity and excess zeros in count data is the Poisson mixture model, where the data y = (y 1 , . . . , y N ) are assumed to be independent realizations of a random variable Y arising from a finite mixture of Poisson distributions: with P (μ k ) being a Poisson distribution with mean μ k . Based on a Gamma prior, the full conditional posterior μ k |S, y in Step (a) of Algorithm 1 arises from a Gamma distribution, see Frühwirth-Schnatter (2006, Section 9.2) for more details. An application of a sparse mixture of Poisson distributions to the Eye Tracking Data (Escobar and West 1998) will be considered in Sect. 5.2.
To select K , Frühwirth-Schnatter (2006) considers RJMCMC methods, following Viallefont et al. (2002), as well as marginal likelihoods p(y|K ). Even for this simple mixture with a univariate parameter μ k , implementing RJMCMC required carefully designed split and merge moves. Concerning marginal likelihoods, bridge sampling with an importance density obtained from random permutation sampling (see Frühwirth-Schnatter 2004, 2006.2), turned out to be rather unstable for larger values of K . An alternative estimatorp(y|K ) of the marginal likelihood is given by full permutation bridge sampling, where the importance density is derived from all K ! possible permutations ρ s of the group labels of a subsequence of posterior draws S (l) , l = 1, . . . , S 0 of the unknown allocations: This leads to stable estimators for the marginal likelihood even for larger values of K . However, since the number of functional evaluations increases with K ! this method is rather computer-intensive, and sparse finite Poisson mixture as well as DPM appear to be an attractive alternative.

Sparse finite mixtures of GLMs for count data
Finite mixtures of generalized linear models (GLMs) based on the Poisson, the binomial, the negative binomial, or the multinomial distribution, have found numerous applications in biology, medicine and marketing in order to deal with overdispersion and unobserved heterogeneity; see Frühwirth-Schnatter (2006, Section 9.4) for a review. A finite mixture of Poisson regression models, for instance, reads: where f P (y i ; λ k,i ) is the Poisson density with mean λ k,i = exp(x i β k ), x i is a row vector containing the observed covariates (including 1 for the intercept) and β 1 , . . . , β K are unknown component-specific regression parameters. A useful extension of (10) is a model where the Poisson distribution is substituted by a negative binomial distribution with mean being equal to λ k,i , while allowing at the same time for overdispersion of an unknown degree. Sparse finite mixtures of GLMs will be investigated for the Fabric Fault Data (Aitkin 1996) in Sect. 5.3. Implementation of Step (a) in Algorithm 1 can be based on any MCMC sampler that delivers draws from the posterior distribution p(θ k |S, y) of a GLM, with the outcomes y i being restricted to those observations, where S i = k. Various proposals have been put forward how to estimate the unknown parameters of a GLMs for count data (including the overdispersion parameter for negative binomial distributions) such as auxiliary mixture sampling (Frühwirth-Schnatter et al. 2009) and the Pólya-Gamma sampler (Polson et al. 2013).
To estimate K for a given family of regression models p(y i |θ k ), marginal likelihoods could be computed for each K . This is not at all straightforward for mixtures of GLMs, however a technique introduced in Frühwirth-Schnatter and Wagner (2008) can be used to approximate the marginal likelihood p(y|K ). Sparse finite mixtures of GLMs offer an attractive alternative to facing this computational challenge.

Sparse finite mixtures of skew normal and skew-t distributions
Finally, clustering of continuous data with non-Gaussian clusters using mixtures of skew normal and skew-t distributions is discussed in this subsection. Applications to the univariate Alzheimer Data (Frühwirth-Schnatter and Pyne 2010) will be considered in Sect. 5.4, whereas Sect. 5.5 considers the multivariate flow cytometric DLBCL Data (Lee and McLachlan 2013).
When clustering continuous data where the clusters are expected to have non-Gaussian shapes, it may be difficult to decide, which (parametric) distribution is appropriate to characterize the data clusters, especially in higher dimensions. Malsiner Walli et al. (2017) pursued a sparse finite mixture of Gaussian mixtures approach. They exploit the ability of normal mixtures to accurately approximate a wide class of probability distributions and model the non-Gaussian cluster distributions themselves by Gaussian mixtures. On top of that, they use the concept of sparse finite mixture models to select the number of the (semi-parametrically estimated) non-Gaussian clusters.
On the other hand, many researchers exploited mixtures of parametric non-Gaussian component distributions to cluster such data. To capture non-Gaussian clusters, many papers consider skew distributions as introduced by Azzalini (1985Azzalini ( , 1986) as component densities, see e.g. Frühwirth-Schnatter and Pyne (2010) and Lee and McLachlan (2013), among many others. A univariate random variable X follows a standard univariate skew normal distribution with skewness parameter α, if the pdf takes the form p(x) = 2φ(x) (αx), where φ(·) and (·) are, respectively, the pdf and the cdf of the standard normal distribution. For α < 0, a left-skewed density results, whereas the density is right-skewed for α > 0. Obviously, choosing α = 0 leads back to the standard normal distribution. The standard skew-t distribution with ν degrees of freedom results, if φ(·) and (·) are, respectively, the pdf and the cdf of a t ν -distribution. In a mixture context, the skewness parameter α k and (for univariate skew-t mixtures) the degree of freedom parameter ν k take component-specific values for each mixture component. For both families, group-specific location parameters ξ k and scale parameters ω k are introduced through the transformation Y = ξ k + ω k X .
A multivariate version of the skew normal distribution has been defined in Azzalini and Dalla Valle (1996), while multivariate skew-t distributions have been introduced by Azzalini and Capitanio (2003). In a multivariate setting, the skewness parameter α is a vector of dimension r . For standard members of this family, the pdf takes the form p(x) = 2φ(x) (α x) with φ(·) and (·) being equal to, respectively, the pdf of the r -variate and the cdf of the univariate standard normal distribution for the multivariate skew normal distribution. For the multivariate skew-t distribution with ν degrees of freedom, φ(·) and (·) are equal to, respectively, the pdf of the r -variate and the cdf of the univariate t ν -distribution. As for the univariate case, group-specific location parameters ξ k (a vector of dimension r ) and scale matrices k (a matrix of dimension r × r ) are introduced through the transformation Y = ξ k + k X, where X follows the standard r -variate distribution described above, with component-specific skewness parameters α k and (for multivariate skew-t mixtures) component-specific degrees of freedom parameters ν k . The first paper which considered Bayesian inference, both for univariate as well as multivariate mixtures of skew normal and skew-t distributions, is Frühwirth-Schnatter and Pyne (2010) who developed an efficient MCMC scheme, combining a latent variable representation with a latent factor following a truncated standard normal distribution with data augmentation. This MCMC scheme can be easily incorporated in Step (a) of Algorithm 1 to estimate sparse finite mixtures of skew normal and skew-t distributions as well as DPM. Frühwirth-Schnatter and Pyne (2010) also discussed various methods for selecting K for finite mixtures of skew normal and skew-t distributions, both in the univariate as well as in the multivariate case, among them marginal likelihoods p(y|K ) computed using bridge sampling (Frühwirth-Schnatter 2004), BIC and various DIC criteria (Celeux et al. 2006). However, it was practically impossible to compute the marginal likelihood p(y|K ) for mixtures with more than 5 or 6 components. Hence, sparse finite mixtures of skew normal and skew-t distributions appear to be an attractive way to select the number of groups or clusters for such mixture models.

A simulation study
The aim of this simulation study is to investigate whether (1) a sparse finite mixture of non-Gaussian components appropriately estimates the number of data clusters, (2) the posterior of K + of sparse finite mixtures and DPM is comparable, if the priors on the precision parameters e 0 and α are matched, and (3) whether both approaches estimate similar partitions of the data. Additionally, the impact of the prior on α and e 0 , the number of specified components K , and the number of observations N is investigated.
Inspired by the Childrens' Fear Data which will be analyzed in Sect. 5.1, we generate multivariate categorical data using following simulation setup. 100 data sets with, respectively, N = 100 and N = 1000 observations are simulated from a latent class model with two classes of equal size (i.e. η 1 = η 2 = 0.5) and three variables with D 1 = 3, D 2 = 3, and D 3 = 4 categories. The occurrence probabilities are given in Table 1. Sparse latent class models with K = 10 and K = 20 as well as DPM are fitted to each data set. For both model classes, the Gibbs sampler is run using Algorithm 1 for 8000 iterations after discarding 8000 draws as burn-in. The starting classification is obtained by clustering the data points into K = 10 or K = 20 clusters using k-means.
Various priors α ∼ G (a α , b α ) on the precision parameter α of the DPM are investigated and matched to the prior e 0 ∼ G (a α , K b α ) on the precision parameter e 0 of Table 2 Posterior distribution p(K + |y) for various prior specifications on e 0 and α, for K = 10 and K = 20, for the first data set of the simulation study, N = 100

Prior
Method K + = 1 K + = 2 K + = 3 K + = 4 K + = 5 K + = 6 K + ≥ 7 The reported values are averages of the posterior expectation E( p. p.|y) of the precision parameter e 0 (SFM) and α (DPM), the estimated number of clustersK + , the adjusted Rand index (ari) and the error rate (err) the sparse latent class model as described in Sect. 2.3. The first prior, α ∼ G(1, 20) with E(α) = 0.05, corresponds to the sparse priors e 0 ∼ G(1, 200) (for K = 10) and e 0 ∼ G(1, 400) (for K = 20) and yields a "sparse" DPM. The remaining two priors, α ∼ G(1, 2) and α ∼ G(2, 1), with E(α) = 0.5 and 2 reflect common choices in the literature. The posterior distributions of K + under the various prior settings are exemplified for one data set in Table 2. They look similar for DPM and sparse finite mixture models if the priors are matched accordingly. The average clustering results over all data sets, for both N = 100 and N = 1000, are reported in Table 3. The cluster quality of all estimated partitions is measured using the adjusted Rand index (ari) (Hubert and Arabie 1985) and the error rate (err) which is calculated as the proportion of misclassified data points. For N = 100, again the clustering results are very similar for DPM and sparse finite mixtures, regardless whether K = 10 or K = 20, or smaller or larger expected values for e 0 and α are defined, as long as the hyper priors are matched. For the sparse hyper priors α ∼ G(1, 20) and e 0 ∼ G (1, 20K ), the average of the posterior mode estimatorsK + over all data sets is very close to 2, whereas for more common priors on α this average is considerably larger than 2, both for sparse latent class models and DPM. However, the adjusted Rand index and the error rate are roughly the same for all priors, indicating that the superfluous clusters only consist of a few observations. The results for larger data sets with N = 1000 observations lead to similar conclusions, with the DPM showing a stronger tendency toward overfittingK + than sparse finite mixtures, despite matching the hyper priors for the precision parameters.
For comparison, for each data set a standard latent class analysis is performed using the EM algorithm and the BIC criterion to estimate the number of clusters. The R package poLCA (Linzer et al. 2011) is used for this estimation. For N = 100, the poLCA approach underestimates the number of data clusters, probably because the asymptotic consistency of BIC does not apply to small-sized data sets. For N = 1000, the poLCA approach performs equally well as the sparse finite mixture approach.
The simulation study also provides evidence that specifying a (sparse) hyper prior over e 0 is preferable to choosing a fixed (small) value. As shown in Fig. 1 for N = 100, a sparse finite mixture with K = 10 and fixed value e 0 = 0.005 basically prefers a onecluster solution. However, as can be seen from the first row in Table 3, by specifying the prior e 0 ∼ G(1, 200) the posterior mean E(e 0 |y) is on average twice as large as the prior mean E(e 0 ) = 0.005 and on average 1.94 clusters are estimated, meaning that one cluster was selected for only few data sets.

Applications
For each type of mixture models discussed in Sect. 3, a case study is provided to compare sparse finite mixtures with DPM of the same type. For both model classes, the influence of the priors p(e 0 ) and p(α) on the posterior distribution p(K + |y) of the number of clusters K + is investigated in detail. Typically, for sparse finite mixtures K = 10 and e 0 ∼ G (1, 200), implying E(e 0 ) = 0.005, is specified whereas for DPM α ∼ G(2, 4) is specified as in Escobar and West (1995). In addition, both priors are matched as described in Sect. 2.3. For each case study, standard finite mixtures with e 0 = 4 are estimated for increasing K . Stern et al. (1994) consider data of N = 93 children from white middle class homes in the U.S., tested at age 4 and 14 months, in the context of infant temperamental research. For each child, three categorical data (i.e. multivariate data of dimension r = 3) are observed, namely motor activity (M) at 4 months with D 1 = 4 categories, fret/cry behavior (C) at 4 months with D 2 = 3 categories, and fear of unfamiliar  (Stern et al. 1994 Table 4. The categories can be interpreted as scores with higher scores indicating a stronger behavior. The scientific hypothesis is that two different profiles in children are present, called inhibited and unhibited to the unfamiliar (i.e. avoidance or approach to unfamiliar children, situations and objects). To test this hypothesis, a latent class model as in (8) is applied,

Application to the CHILDRENS' FEAR DATA
with class specific probability distributions π M k = (π M k,1 , . . . , π M k,4 ), π C k = (π C k,1 , . . . , π C k,3 ), and π F k = (π F k,1 , . . . , π F k,3 ) and K being unknown. Three types of mixture models are considered, assuming the class specific probability distributions π M k , π C k , and π F k to be independent, each following a symmetric Dirichlet prior D D j g 0, j with g 0, j = 1 for j = 1, . . . , 3. Sparse latent class models as described in Sect. 3.1 are estimated with K = 10 and compared to DP latent class models. In addition, a standard latent class model with e 0 = 4 is estimated for increasing K and marginal likelihoods are computed using full permutation bridge sampling, see Table 5. Table 5 and Fig. 3 compare the various posterior distributions Pr(K + |y) of the number of clusters K + under the specific hyper priors. Both for the marginal likelihood as well as for a sparse finite mixture,K + = 2 is selected, confirming the theoretically expected number of clusters, whereas the DPM overestimates the number of clusters withK + = 4. However, once the hyper prior for α is matched to the sparse finite mixture, the resulting "sparse" DPM also selects two clusters. On the other hand, a sparse finite mixture matched to the DPM is overfitting. This example illustrates the importance of prior shrinkage of e 0 and α towards small values.
In Table 6, the estimated occurrence probabilities for the two classes are reported. Clearly, the children in the two classes have a rather different profile. Whereas chil- Table 5 Childrens' Fear Data; the rows in the upper table show the posterior distribution Pr(K + |y) of the number of clusters K + for various latent class models: sparse latent class models with K = 10 (SFM) with hyper priors e 0 ∼ G(1, 200) and e 0 ∼ G(2, 4K ) (matched to DPM), DPM with hyper priors α ∼ G(2, 4) and α ∼ G(1, 200/K ) (matched to SFM) Pr(K + |y) dren belonging to class 1 are more likely to have higher scores in all three variables, children in class 2 show less motor activity, crying behavior and fear at the same time. This clustering result is in line with the psychological theory behind the experiments, according to which all three behavioral variables are regularized by the same physiological mechanism, see Stern et al. (1994) for more details. The values are the average of the MCMC draws, with 95% HPD intervals in parentheses For each cluster, the most probable outcome for each feature is denoted in bold

Application to the EYE TRACKING DATA
The count data on eye tracking anomalies in 101 schizophrenic patients studied by Escobar and West (1998) are reconsidered. To capture overdispersion and excess zeros diagnosed for this data set, Frühwirth-Schnatter (2006) analyzed the data by a finite Poisson mixture model. The goal of the analysis is not primarily clustering of the data, but capturing the extreme unobserved heterogeneity present in this data set, using both sparse finite Poisson mixtures with K = 10 as in Sect. 3.2 as well as DPM. For all types of mixture models, the same hierarchical prior is applied for the component-specific parameters with μ k |b 0 ∼ G (a 0 , b 0 ) and b 0 ∼ G (g 0 , G 0 ), where a 0 = 0.1, g 0 = 0.5, and G 0 = g 0 y/a 0 , with y being the mean of the data. Table 7 and Fig. 4 compare the various posterior distributions Pr(K + |y) of the number of clusters K + under various hyper priors. The sparse finite Poisson mixture model clearly identifies four clusters, whereas the posterior Pr(K + |y) is much more spread out for the corresponding DPM, reflecting the extreme unobserved heterogeneity in the observed counts. However, once the hyper prior for α is matched to the sparse finite mixture, the resulting DPM also selects four clusters. On the other hand, a sparse finite mixture matched to the DPM also indicates considerable unobserved heterogeneity which is confirmed by the marginal likelihoods which are computed using full permutation bridge sampling.

Application to the FABRIC FAULT DATA
For further illustration, we consider regression analysis of (count) data on fabric faults (Aitkin 1996) where the response variable y i is the number of faults in a bolt of length l i . The goal of the analysis is testing homogeneity, i.e. to investigate if a single Table 7 Eye Tracking Data; the rows in the upper table show the posterior distribution Pr(K + |y) of the number of clusters K + for following Poisson mixture models: sparse finite mixtures with K = 10 (SFM) with hyper priors e 0 ∼ G(1, 200) and e 0 ∼ G(2, 4K ) (matched to DPM), DPM with hyper priors α ∼ G(2, 4) and α ∼ G(1, 200/K ) (matched to SFM) Pr(K + |y) K + = 1, 2    Table 8. For all mixtures,  ) a priori the component-specific regression coefficients are assumed to be i.i.d. from a N (0, 4)-distribution. For the negative binomial distribution, the same prior as in Frühwirth-Schnatter et al. (2009) is assumed for the group specific degrees of freedom parameter ρ k : p(ρ k ) ∝ 2dρ k /(ρ k + c) 3 , where the choice of c = 10/(1 + √ 2) implies a prior median of 10. Table 8 and Fig. 5 compare the various posterior distributions Pr(K + |y) of the number of clusters K + under various hyper priors for both model classes. For mixtures of Poisson GLMs, K = 2 is selected by the marginal likelihood andK + = 2, both for sparse finite mixture as well as DPM, which confirms results obtained by Aitkin (1996) and McLachlan and Peel (2000) using alternative methods of model selection. For the more flexible mixture of GLMs based on the negative binomial distribution K = 1 is selected by the marginal likelihood. Also sparse finite mixtures as well as DPM of GLMs based on the negative binomial distribution estimateK + = 1 cluster. This illustrates that sparse finite mixtures are also useful for testing homogeneity within a Bayesian framework.
One advantage of the marginal likelihood over sparse finite mixtures and DPMs, however, is the possibility to select the number of clusters and the appropriate clustering kernel at the same time. The model with the largest marginal likelihood in Table 5 is the negative binomial distribution with K = 1.

Application to the ALZHEIMER DATA
Alzheimer disease is a complex disease that has multiple genetic as well as environmental risk factors. It is commonly characterized by loss of a wide range of cognitive   ) abilities with aging. For illustration, data modelled in Frühwirth-Schnatter and Pyne (2010) through (standard) finite mixtures of skew normal and skew-t distributions are reanalyzed. The data set consists of N = 451 subjects, whose level of cognition was clinically evaluated proximate to their death based on tests of cognitive functions and summarized by a mean global cognition score, with higher scores suggesting better cognitive capabilities; see Bennett et al. (2005) for more details on the corresponding study. The true number of groups in these data is equal to two. The goal of the exercise is to investigate, if sparse finite mixtures with non-Gaussian components based on parametric densities such as univariate skew normal and skew-t distributions are able to detect the true number of clusters and to compare them to DPM models. Frühwirth-Schnatter and Pyne (2010) considered various methods for selecting K for skew normal and skew-t mixtures under the prior e 0 = 4. In particular, DIC criteria (Celeux et al. 2006) turned out to be extremely sensitive to prior choices for the cluster-specific parameter (ξ k , α k , ω k ). The marginal likelihoods of a standard finite mixture model with e 0 = 4 are compared in Table 9 to sparse finite skew normal and skew-t mixture models, where K = 10 and e 0 ∼ G (1, 200), as well as to DPMs of these same type. Table 9 and Fig. 6 summarize the pos- terior distributions Pr(K + |y) of the number of clusters K + under various hyper priors.
Again, Fig. 6 illustrates that the main difference between the resulting posterior distributions of K + is not wether a Dirichlet process mixtures or a finite mixture model is applied. Rather, the apparent difference is due to changes in the hyper prior. A sparse prior on the precision parameters e 0 and α yields a clear decision concerning K + , namely selectingK + = 2 for both types of clustering kernels. This is true both for a sparse finite mixture and a "sparse" DPM where the hyper prior for α is matched to the sparse finite mixture. However, for a prior that does not force sparsity, both sparse finite mixtures as well as DPM overestimate the number of clusters withK + = 3 for the skew normal distribution and are more or less undecided between two and three clusters for the skew-t mixture.
The choices obtained from both sparse finite mixture models and DPM coincide with the decision obtained by the marginal likelihood. An advantage of the marginal likelihood over sparse mixtures is that, in addition to K , the clustering kernel can be selected. For the data at hand, finite mixtures of skew normal distributions are preferred to skew-t distributions.

Applications to flow cytometric data
To assess how sparse finite mixtures scale to larger data sets, an application to flow cytometry data is investigated. The three-dimensional DLBCL data set (Lee and McLachlan 2013) consists of N = 7932 observations, with class labels which were determined manually. The true number of groups in these data is equal to 4. Malsiner Walli et al. (2017) fitted a sparse finite mixture-of-mixtures model to these data with K = 30 and e 0 = 0.001. The component densities were estimated in a semi-parametric manner through a Gaussian mixture with L = 15 components and inference identifiesK + = 4 such non-Gaussian clusters. The resulting error rate (0.03) outperformed the error rate of 0.056 reported by Lee and McLachlan (2013).
The goal of this application is to investigate, whether sparse finite mixtures with non-Gaussian components based on parametric densities such as the multivariate skew normal and skew-t distributions are able to detect this true number of clusters. Sparse finite mixtures with K = 20 and e 0 ∼ G (1, 100), as well as DPM of the corresponding type are fitted to these data and results are reported in Table 10 and Fig. 7. As it turns out, the posterior expectation of both precision parameters, i.e. E(α|y) as well as E(e 0 |y) are pretty large, indicating that a lot of components are needed to describe these data. Consequently, the estimated number of clustersK + is much larger than four for any of these mixtures. This finding is confirmed by the marginal likelihoods. Obviously, neither skew normal nor skew-t distributions are as flexible as the mixture-of-mixtures model introduced by Malsiner Walli et al. (2017) to capture departure from normality for these data.  (2016) for Gaussian clustering kernels, to a wide range of non-Gaussian mixture models, including Poisson mixtures, latent class analysis, mixtures of GLMs, skew normal and skew-t distributions. Opposed to common belief, this paper shows that finite mixture models do not necessarily assume that the number of clusters is known. As exemplified for several case studies in Sect. 5, the number of clusters was estimated a posteriori from the data and ranged fromK + = 1 (for the Fabric Fault Data under a mixture of negative binomial GLMs) toK + = 4 (for the Eye Tracking Data), when sparse finite mixtures with K = 10 components were fitted. Sparse finite mixture models are based on overfitting mixture distributions, where the number of clusters K + among N data points generated from such a mixture is, with high probability, smaller than K a priori. This is achieved by choosing a symmetric Dirichlet prior on the weight distribution (η 1 , . . . , η K ) ∼ D K (e 0 ), with a sparsity prior on e 0 that favours very small values.
A theoretical justification for sparse finite mixture models seems to emerge from asymptotic results of Rousseau and Mengersen (2011), who show that the asymptotic  behaviour of the mixture posterior p(θ 1 , . . . , θ K , η|y 1 , . . . , y N ) as N goes to infinity is determined by the hyperparameter e 0 of the symmetric Dirichlet prior D K (e 0 ). Let d = dim θ k be the dimension of the component-specific parameter θ k in a mixture distribution (1) with K tr distinct components (i.e. θ k = θ l , k = l) with non-zero weights. If e 0 < d/2, then the posterior distribution of an overfitting mixture distribution with K > K tr components asymptotically concentrates over regions forcing the sum of the weights of the K − K tr extra components to concentrate at 0. Hence, if e 0 < d/2, all superfluous components in an overfitting mixture are emptied, as the number of observations N goes to infinity. However, the implications of this important result for the posterior concentration of the number of data clusters K + are still unclear. As shown by Miller and Harrison (2013), the number of clusters K + in data generated from a finite mixture distribution of order K tr converges to K tr , as N goes to infinity, if K = K tr . Conditions under which such a convergence holds, if K tr is unknown and an overfitting mixture with K > K tr is fitted, are an interesting venue of future research. As noted by Malsiner Walli et al. (2016), who applied overfitting Gaussian mixtures to model-based clustering of quite a few benchmark data sets, values of e 0 much smaller than Rousseau and Mengersen (2011)'s threshold d/2 are needed in practice to identify the right number of clusters. We obtained similar results for the extensions and applications considered in the present paper. Table 11 summarizes the posterior expectations E(e 0 |y) as well as 95% confidence regions of e 0 for various data sets fitted in Sect. 5 under the sparse prior e 0 ∼ G(1, 200), with prior expectation E(e 0 ) = 0.005. These results confirm that the posterior distribution of e 0 is concentrated over values that are considerably smaller than d/2 (the dimensions d are also reported in the table). To see, whether the data alone would have been informative about e 0 for these case studies, the uniform prior e 0 ∼ U [0, d/2] over the region [0, d/2] is considered. The corresponding posterior expectations E(e 0 |y), reported in Table 11, are considerably larger than for the sparsity prior. As can be seen in Fig. 8, this leads to posterior distributions p(K + |y) that overfit the number of clusters for all data sets considerably, except for the homogeneous Fabric Fault Data. These results indicate that regularisation of the posterior distribution through a sparsity prior that encourages values of e 0 much smaller than d/2 is essential for identifying the number of clusters.
Introducing a sparsity prior avoids overfitting the number of clusters not only for finite mixtures, but also (somewhat unexpectedly) for Dirichlet process mixtures which are known to overfit the number of clusters (Miller and Harrison 2013). For the data Fig. 8 Posterior distributions Pr(K + |y) of the number of clusters K + for the various data sets for a sparse finite mixture with K = 10 and prior e 0 ∼ U [0, d/2] derived from the criterion of Rousseau and Mengersen (2011) considered in the present paper, overfitting could be avoided through a prior on the precision parameter α that encouraged very small values.
When matching the priors of e 0 in sparse finite mixtures and α in DPM, the posterior distribution of the number of clusters was more influenced by these hyper priors than whether the mixture was finite or infinite. It would be interesting to investigate, if this proximity of both model classes also holds more generally.
Another avenues for future research concern MCMC estimation. Although we did not encounter problems with full conditional Gibbs sampling for our case studies, more efficient algorithms could be designed by using parallel tempering as in van Havre et al. (2015) or by exploiting ideas from BNP (e.g. Fall and Barat 2014).