Beyond the EM Algorithm: Constrained Optimization Methods for Latent Class Model
Hao Chen, Lanshan Han, Alvin Lim

TL;DR
This paper introduces constrained optimization methods, specifically quasi-Newton techniques, as efficient alternatives to the EM algorithm for latent class models, achieving faster convergence and more accurate estimators.
Contribution
It proposes and evaluates quasi-Newton constrained optimization methods for latent class models, improving convergence speed and estimator accuracy over traditional EM algorithms.
Findings
Faster convergence than EM algorithm.
More accurate model estimators.
Effective in simulation studies.
Abstract
Latent class model (LCM), which is a finite mixture of different categorical distributions, is one of the most widely used models in statistics and machine learning fields. Because of its non-continuous nature and the flexibility in shape, researchers in practice areas such as marketing and social sciences also frequently use LCM to gain insights from their data. One likelihood-based method, the Expectation-Maximization (EM) algorithm, is often used to obtain the model estimators. However, the EM algorithm is well-known for its notoriously slow convergence. In this research, we explore alternative likelihood-based methods that can potential remedy the slow convergence of the EM algorithm. More specifically, we regard likelihood-based approach as a constrained nonlinear optimization problem, and apply quasi-Newton type methods to solve them. We examine two different constrained…
| (A) | ||||
|---|---|---|---|---|
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (B) | ||||
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (C) | ||||
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (D) | ||||
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (A) | ||||
|---|---|---|---|---|
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (B) | ||||
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (C) | ||||
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (D) | ||||
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (A) | ||||
|---|---|---|---|---|
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (B) | ||||
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (C) | ||||
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (D) | ||||
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (A) | ||||
|---|---|---|---|---|
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (B) | ||||
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (C) | ||||
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| (D) | ||||
| True Parameters | EM | SQP | Projected QN | |
| Log-Likelihood | ||||
| Number of Iterations | N.A. | |||
| BayesLCA | EM | SQP | Projected QN | |
|---|---|---|---|---|
| Log-Likelihood | ||||
| Number of Iterations | N.A. |
| BayesLCA | EM | SQP | Projected QN | |
|---|---|---|---|---|
| BayesLCA | ||||
| EM | ||||
| SQP | ||||
| Projected QN |
| EM | SQP | Projected QN | |
| CPU Time per Iteration | 0.08 | 0.31 | 0.39 |
| Number of Iterations | 302 | 44 | 50 |
| Overall Runtime | 24.2 | 13.6 | 19.5 |
| weights | |||
|---|---|---|---|
| weights | |||
|---|---|---|---|
| weights | |||||
|---|---|---|---|---|---|
| weights | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| weights | ||||||
|---|---|---|---|---|---|---|
| weights | ||||||
|---|---|---|---|---|---|---|
| weights | ||||||||
|---|---|---|---|---|---|---|---|---|
| weights | ||||||||
|---|---|---|---|---|---|---|---|---|
| weights | |||||||
|---|---|---|---|---|---|---|---|
| weights | |||||||
|---|---|---|---|---|---|---|---|
| weights | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| weights | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| weights | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| weights | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| weights | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| weights | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Beyond the EM Algorithm: Constrained Optimization Methods for Latent Class Model
Hao Chen111Corresponding Author. We thank the editor and the anonymous reviewer for suggestions that improved the manuscript.
Research & Development, Precima, Chicago, IL USA 60631
Lanshan Han
Research & Development, Precima, Chicago, IL USA 60631
Alvin Lim
Research & Development, Precima, Chicago, IL USA 60631
Abstract
Latent class model (LCM), which is a finite mixture of different categorical distributions, is one of the most widely used models in statistics and machine learning fields. Because of its non-continuous nature and flexibility in shape, researchers in areas such as marketing and social sciences also frequently use LCM to gain insights from their data. One likelihood-based method, the Expectation-Maximization (EM) algorithm, is often used to obtain the model estimators. However, the EM algorithm is well-known for its notoriously slow convergence. In this research, we explore alternative likelihood-based methods that can potential remedy the slow convergence of the EM algorithm. More specifically, we regard likelihood-based approach as a constrained nonlinear optimization problem, and apply quasi-Newton type methods to solve them. We examine two different constrained optimization methods to maximize the log-likelihood function. We present simulation study results to show that the proposed methods not only converge in less iterations than the EM algorithm but also produce more accurate model estimators.
(NOTE: the paper has been published online at here)
keywords:
Constrained Optimization, Quasi-Newton’s Method, Quadratic Programming, EM Algorithm, Latent Class Model, Finite Mixture Model.
††journal: CSSC. Accepted on Apr 28, 2020.
1 Introduction
Latent class model (LCM) (McCutcheon (1987)) is a model to study latent (unobserved) categorical variables by examining a group of observed categorical variables which are regarded as the indictors of the underlying latent variables. It can be regarded as a special case of the finite mixture model (FMM) with component distributions being categorical distributions. It is widely used to analyze ordered survey data collected from real world applications. In many applications in econometrics, social sciences, biometrics, and business analytics (see Hagenaars and McCutcheon (2002); Oser et al. (2013) for example), finite mixture of categorical distributions arises naturally when we sample from a population with heterogeneous subgroups. LCM is a powerful tool to conduct statistical inference from the collected data in such situations.
We provide a motivating example from White et al. (2014) where an LCM is applied to analyze a dataset of patient symptoms recorded in the Mercer Institute of St. James’ Hospital in Dublin, Ireland (Moran et al. (2004)). The data is a recording of the presence of six symptoms displayed by patients diagnosed with early onset Alzheimer’s disease. The six symptoms are as follows: hallucination, activity, aggression, agitation, diurnal and affective, and each symptom has two states: either present or absent. White et al. (2014) proposed to divide patients into groups such that patients are homogeneous within each group and heterogeneous between groups. Each group’s characteristics are summarized by the LCM parameters that help doctors prepare more specialized treatments. In this sense, LCM is a typical unsupervised statistical learning method that could “learn” the group labels based on the estimated parameters.
Due to its theoretical importance and practical relevance, many different approaches have been proposed to estimate the unknown parameters in LCMs from the observed data. In general, there are mainly two different paradigms. The first one is the frequentist’s approach of maximum likelihood estimation (MLE), i.e., one maximizes the log-likelihood as a function of the unknown parameters. In contrast, a second paradigm – the Bayesian approach – where the unknown parameters obey a distribution and assumes prior distributions on them, then one either analytically or numerically obtains the posterior distributions and statistical inference is carried out based on the posterior distributions.
In recent years, significant progress has been made on Bayesian inference in LCM. White et al. (2014), by assuming the Dirichlet distribution on each unknown parameter, used Gibbs sampling to iteratively draw samples from the posterior distribution and then conduct inference on the LCM using the samples drawn. The authors also provided an implementation of the approach in R. Li et al. (2018) described a similar Bayesian approach to estimate the parameters and they also utilized the Dirichlet distribution as the prior distribution. Asparouhov and Muthén (2011) introduced a similar implementation package of Bayesian LCM in Mplus. However, compared to the fast development of the Bayesian inference via Markov chain Monte Carlo (MCMC), the frequentist’s MLE approach for LCM has largely lagged. As far as we know, researchers still heavily rely on the expectation-maximization (EM) algorithm (Dempster et al. (1977)), even with its notoriously slow convergence (see for instance Meilijson (1989)), to maximize the log-likelihood function. It is known that some authors (Jamshidian and Jennrich (1997)) use Quasi-Newton methods as alternatives for the EM algorithm in Gaussian mixture models. However, the extension to LCM is not straightforward since LCM includes a lot more intrinsic constraints on the parameters than the general Gaussian mixture model when considered as an optimization problem. More sophisticated optimization methods need to be applied when maximizing the log-likelihood function.
This paper primarily focuses on the MLE paradigm. We propose the use of two widely-used constrained optimization methods to maximize the likelihood function, namely, the Projected Quasi-Newton method and the sequential quadratic programming method. Our contributions include not only exploring alternatives beyond the EM algorithm, but also demonstrating that better results could be obtained by using these alternatives. The rest of this paper is organized as follows: in Section 2, we present the preliminaries including the log-likelihood function and the classical EM algorithm. In Section 3, we introduce and discuss the two constrained optimization methods in detail. Some simulation studies and a real world data analysis are presented in Section 4 to compare the performance of the proposed methods with the EM algorithm. We make concluding remarks in Section 6.
2 Latent Class Models and the EM Algorithm
In many applications, a finite mixture distribution arises naturally when we sample from a population with heterogeneous subgroups, indexed by taking values in . Consider a population composed of subgroups, mixed at random in proportion to the relative group sizes . There is a random feature , heterogeneous across and homogeneous within the subgroups. The feature obeys a different probability distribution, often from the same parametric family with differing, for each subgroup. Now we sample from this population, if it is impossible to record the subgroup label, denoted by , then the density is:
[TABLE]
which is a finite mixture distribution. In this situation, we often need to estimate the ’s as well as based on the random samples of , when the subgroup label is known or unknown. Throughout this paper, we assume that is known.
The LCM is a special case of the FMM. In LCM, the component densities are multivariate categorical distributions. That is, with each being a categorical random variable, taking values from categories . It is assumed that ’s are independent within each subgroup with an indictor (the latent variable), which is a categorical random variable taking values in , i.e., within each subgroup, the probability density function (PDF) is written as:
[TABLE]
where and is the Iverson bracket function, i.e.
[TABLE]
Overall, the mixture density of latent class models is:
[TABLE]
where, the parameters include both the weight distribution and the ’s that define the categorical distributions.
Suppose we have collected samples drawn from the LCM distribution, denoted by . We write as the data matrix. The log-likelihood function is given by
[TABLE]
The maximum likelihood principle is to find a that maximizes the log-likelihood function (1) as the estimation of . Clearly, we can regard the problem of finding such a as an optimization problem. At the same time, we notice that the LCM implies several constraints that need to be satisfied when maximizing the log-likelihood function (1). In particular, the ’s are all nonnegative and sum up to 1. Also, for each and , the ’s are all nonnegative and sum up to 1. Let be the vector of ’s and be the vector of ’s. From an optimization point of view, the MLE in the LCM case is the following optimization problem.
[TABLE]
As we can see, the optimization problem (2) possesses equality constraints together with nonnegativity constraints on all the individual decision variables. While there are considerable number of constraints, the feasible region in (2) is indeed the Cartesian product of probability simplexes. We recall that a probability simplex in -dimensional space is defined as
[TABLE]
where is the nonnegative orthant of . Let for all and . The constraints in (2) can be written as and .
To maximize the log-likelihood function in (1), the EM algorithm is a classical approach. In statistics, the EM algorithm is a generic framework that is commonly used in obtaining maximum likelihood estimators. The reason why the EM algorithm enjoys its popularity in finite mixture model is the fact that we can view finite mixture model as an estimation problem with missing data. More specifically, if we know the true label of each observation, we could obtain the MLE in a fairly straightforward fashion. On the other hand, if we know the true model parameters, it is also trivial to compute the probability each observation belonging to each class. Therefore, a natural idea is that we begin the process with an initial random guess of the parameters, and compute the probability each observation belonging to each class E(xpectation)-step. With those probabilities we compute the MLE, which is the M(aximization)-step. We iterate between the two steps until a convergence condition is reached. Particularly for the LCM, when the EM algorithm is applied to it, the constraints are implicitly satisfied for all the iterations thanks to the way the EM algorithm updates the values of the parameters. This nice property does not necessarily hold naturally when other non-linear optimization algorithms are applied to the optimization problem (2).
In the context of LCM, the details of the EM algorithm is given in Algorithm 1. We make two comments on Algorithm 1. First, Algorithm 1 does not produce standard errors of MLE as a by-product. In order to conduct statistical inference, one has to compute the observed Fisher information matrix and it could be algebraically tedious or might only apply to special cases. This is one of the criticisms often laid out against the EM algorithm as compared to Bayesian analysis using Gibbs samplers for example, where independent posterior samples are collected and statistical inference is easy under such circumstance. Second, the convergence of Algorithm 1 is typically slow. Wu (1983) studied the convergence issue of the EM algorithm and concluded that the convergence of the EM algorithm is sublinear when the Jacobian matrix of the unknown parameters is singular. Jamshidian and Jennrich (1997) also reported that the EM algorithm could well be accelerated by the Quasi-Newton method. In Section 4, we shall also empirically observe the two constrained optimization methods converge in less iterations than the EM algorithm.
3 Constrained Optimization Methods
Motivated by the significant progress in constrained non-linear optimization, as well as the constrained nature of the LCM estimation problem, we propose to apply two non-linear optimization approaches to solve the optimization problem (2). We notice that the EM algorithm is closely related to a gradient decent method Wu (1983), whose convergence rate is at most linear. On the other hand, it is known in optimization theory that if the second order information is utilized in the algorithm, quadratic convergence may be achieved, e.g., the classical Newton’s method. However, in many applications, it is often computationally very expensive to obtain the second order information, i.e., the Hessian matrix. One remedy is to use computationally cheap approximation of the Hessian matrix. This idea leads to the family of Quasi-Newton methods in the unconstrained case. While the convergence rate is typically only superlinear, the per iteration cost (both the execution time and the memory usage) is significantly reduced. In the constrained case, sophisticated methods have been developed to allow us to deal with the constraints. Given that it is relative easy to solve a constrained optimization problem when the objective function is quadratic and the constraints are all linear, one idea in constrained non-linear optimization is to approximate the objective function (or the Lagrangian function) by a quadratic function (via second-order Taylor expansion at the current solution) and approximate the constraints by linear constraints (via first-order Taylor expansion at the current solution). A new solution is obtained by solving the approximation and hence a new approximation can be constructed at the new solution. Analogous to the idea of quasi-Newton methods in the unconstrained case, in the constrained case, we can also consider an approximated Taylor expansion without having to compute the Hessian matrix exactly. Once an approximated quadratic program is obtained, one may use different approaches to solve it. For example, one can use an active set method or an interior point method to solve the quadratic program when it does not possess any specific structure. When the feasible region of the quadratic program is easily computable (typically in strongly polynomial time), a gradient projection method can be applied to solve the quadratic program approximation. As we have seen, the feasible region of optimization problem (2) is the Cartesian product of probability simplexes. It is known that projection on a probability simplex is computable in strongly polynomial time. Therefore, it is reasonable to apply a projection method to solve the quadratic program approximation. In the following subsections, the two approaches we propose are discussed in details. In both approaches, we need to evaluate the gradient of the LCM log-likelihood function. We provide the analytical expression below. For the part, we have:
[TABLE]
For the part, we have for all :
[TABLE]
where . And therefore, for all ,
[TABLE]
3.1 Limited Memory Projected Quasi-Newton Method
We first present the Projected Quasi-Newton method which is proposed by Schmidt et al. (2009). We augment it with the algorithm proposed by Wang and Carreira-Perpinán (2013) to project parameters onto a probability simplex in strongly polynomial time. In general, we address the problem of minimizing a differentiable function over a convex set subject to equality constraints:
[TABLE]
In an iterative algorithm, we update the next iteration as follows:
[TABLE]
where is the solution at the -th iteration, is the step length and is the moving direction at iteration . Different algorithms differ in how and are determined. In the Projected Quasi-Newton method, a quadratic approximation of the objective function around the current iterate is constructed as follows.
[TABLE]
where and denotes a positive-definite approximation of the Hessian . The projected quasi-Newton method then compute a feasible descent direction by minimizing this quadratic approximation subject to the original constraints:
[TABLE]
Then the moving direction is .
To determine the step length , we ensure that a sufficient decrease condition, such as the Armijo condition is met:
[TABLE]
where .
Although there are many appealing theoretical properties of projected Newton method just summarized, many obstacles prevent its efficient implementation in its original form. A major shortcoming is that minimizing (7) could be as difficult as optimizing (5). In Schmidt et al. (2009), the projected Newton method was modified into a more practical version which uses the limited memory BFGS update to obtain ’s and a Spectral Projected Gradient (SPG) Algorithm ((Birgin et al., 2000)) to solve the quadratic approximation (7).
To apply this Projected Quasi-Newton method to (2), we let . As we discussed in the previous section, we rewrite (2) as follows:
[TABLE]
where is the feasible region given in the format of the Cartesian product of probability simplexes. This rewriting is to facilitate the projection operation. We denote as the projection of a vector on a closed convex set , i.e. is the unique solution of the following quadratic program:
[TABLE]
As we can see, in general, a quadratic program needs to be solved to compute the projection onto a closed convex set, and hence is not computationally cheap. Fortunately, the feasible region in (9) allows for a projection computable in strongly polynomial time according to Wang and Carreira-Perpinán (2013). This algorithm is presented in Algorithm 4. This algorithm is the building block for the SPG algorithm to solve the quadratic approximation in each iteration. More specifically, in the -th iteration, let
[TABLE]
where and denotes a positive-definite approximation of the Hessian . The quadratic approximation is now given by
[TABLE]
The gradient of is given by
[TABLE]
In our implementation, is numerically approximated by the method of symmetric difference quotient with length chosen as . We can also compute using the analytical expressions (3) and (4).
We update using the limited memory version of BFGS. The non-limited memory BFGS update of is given by
[TABLE]
where and . This will consume significant memory in storing ’s when the number of features increases dramatically. Therefore, in the proposed Projected Quasi-Newton algorithm we only keep the most recent and arrays (the definitions of and are in Algorithm 2) and update using its compact representation described by Byrd et al. (1994):
[TABLE]
where and are explicitly given in equation (3.5) of Byrd et al. (1994).
In addition, running Algorithm 2 until convergence, the matrix is outputted as a by-product. The matrix is an approximation of the observed Fisher information of the unknown parameters, which will enable us to construct asymptotic confidence intervals using the following classical results:
[TABLE]
This is way easier than the EM algorithm to conduct statistical inference. According to Gower and Richtárik (2017), when is convex quadratic function with positive definite Hessian matrix, it is expected that from the Quasi-Newton method to converge to the true Hessian matrix. However, the log-likelihood function is obviously not a convex function and as far as we know there is no formal theory that guarantees the convergence. Nonetheless, in Section of Jamshidian and Jennrich (1997), the authors empirically compared the estimates for standard errors to the true values and the results are satisfactory.
In our implementation of Algorithm 2, we use and the default parameters are , , and in Algorithm 3.
3.2 Sequential Quadratic Programming
Sequential quadratic programming (SQP) is a generic method for non-linear optimization with constraints. It is known as one of the most efficient computational method to solve the general nonlinear programming problem in (5) subject to both equality and inequality constraints. There are many variants of this algorithm, we use the version considered in Kraft (1988). We give a brief review of this method and then we will specifically talk about how this method could be applied to optimization problem (2).
Consider the following minimization problem
[TABLE]
where the problem functions . SQP is also an iterative method and each iteration a quadratic approximation of the original problem is also constructed and solved to obtain the moving direction. Compared to the Projected Quasi-Newton method, in SQP, the quadratic approximations are typically solved by an active set method or an interior point method rather than a projection type method. This significantly complicates the algorithm, but also allows the algorithm to handle more general non-linear optimization problems, especially when the feasible region is too complex to admit an efficient projection computation. In particular, starting with a given vector of parameters , the moving direction at iteration is determined by a quadratic programming problem, which is formulated by a quadratic approximation of the Lagrangian function and a linear approximation of the constraints. Note that, in contrast to the Projected Quasi-Newton method we presented in the previous subsection, the SQP algorithm here approximates the Lagrangian function instead of the objective function itself. An advantage is that the dual information can be incorporated in the algorithm to ensure better convergence property. Let
[TABLE]
be the Lagrangian function associated with this optimization problem. This approximation is of the following standard form of quadratic programming:
[TABLE]
with
[TABLE]
as proposed in Wilson (1963). The multiplier is updated using the multipliers of the constraints in ( \IfBeginWitheqn:SQP_QPfig:Figure 18\IfBeginWitheqn:SQP_QPeqn:18\IfBeginWitheqn:SQP_QPtab:Table 18Unsupported ref start).
In terms of the step length , Han (1977) proved that a one-dimensional minimization of the non-differential exact penalty function
[TABLE]
with , as a merit function
[TABLE]
with and fixed, leads to a step length guaranteeing global convergence for values of the penalty parameters greater than some lower bounds. Then, Powell (1978) proposed to update the penalty parameters according to
[TABLE]
where denotes the Lagrange multiplier of the -th constraint in the quadratic problem and is the -th penalty parameter of the previous iteration, starting with some .
It is important in practical applications to not evaluate in (19) in every iteration, but to use only first order information to approximate the Hessian matrix of the Lagrange function in (17). Powell (1978) proposed the following modification:
[TABLE]
with
[TABLE]
where
[TABLE]
and is chosen as
[TABLE]
which ensures that remains positive definite within the linear manifold defined by the tangent planes to active constraints at .
In LCM, the problem turns out to be simpler: the quadratic programming problem in (18) is only subject to equality constraints. In addition, unless we use Projected Quasi-Newton method, for which we have to build our own solver, there is a popular implementation of SQP in Python’s SciPy package. The package uses a variant of SQP: Sequential Least SQuares Programming (SLSQP): It replaces the quadratic programming problem in (18) by a linear least squares problem using a stable factorization of the matrix .
4 Simulation Studies and Real Data Analysis
In this section, we provide four example bundles and one real data analysis to demonstrate the performance of the proposed methods. The model specifications of the four example bundles as follows:
Example Bundle , : (A) ; (B) ; (C) ; (D)
- 2.
Example Bundle , : (A) ; (B) ; (C) ; (D)
- 3.
Example Bundle , : (A) ; (B) ; (C) ; (D)
- 4.
Example Bundle , : (A) ; (B) ; (C) ; (D)
One dataset is simulated from latent class model for each combination. In total, we consider datasets with different combinations of sample size, dimensionality and number of groups providing a comprehensive picture of the model performance.
4.1 Example Bundle 1
In this example bundle, we use the following three methods to maximize the log-likelihood function: (1) EM, (2) SQP, and (3) Projected Quasi-Newton (QN). Each method is repeated times with different initial values across the runs. At each run, the three methods begin with identical initial values. The true weights and categorical parameters are reported in Tables 8, 9, 10, 11 in the appendix. Side by side boxplots are drawn and reported in Figure 1 and Figure 2 showing number of iterations and log-likelihood values of the runs, respectively. For each method, the best result based on the log-likelihood values across the runs are given in Table 1. Results from the true parameters are also included in Table 1 as a comparison.
From Table 1, Figure 1 and Figure 2, we observe that the proposed two optimization methods have good performance compared to the traditional EM algorithm: the log-likelihood values are very close to that of EM for all four datasets in this example bundle. Note that the vertical axis scales are different in Figure 1. The numbers of iterations of the two proposed optimization methods are obviously lower than that of EM, for example the number of iterations of SQP and Projected QN are both compared to of the EM algorithm. This suggests that the two optimization methods are less likely to get stuck in local maxima.
In addition, there are no substantial differences between the final best solutions across the runs. Actually, the final best results are quite close to the results obtained from the other runs. Using scenario (A) with in this bundle as an example, we divide the log-likelihood values into two groups, where the first group contains the largest log-likelihood value only while the second group contains the rest of the nine log-likelihood values, and then fit a non-parametric two-group Wilcoxon signed-rank test Bauer (1972). The p-value is , which is clearly larger than the usual threshold. The parametric t-test might not work well here because the group sizes are too small. Moreover, the estimated weights and categorical parameters from the runs are also close to each other. We repeat the test for the log-likelihood values on the estimates for each of the weight and categorical parameters and none of the p-values are larger than .
4.2 Example Bundle 2
The true weights and categorical parameters are reported in Tables 12, 13, 14, 15 in the appendix. As in Example Bundle 1, each method is repeated times with different initial values across the runs. At each run, the three methods begin with identical initial values. The simulation results for this bundle are summarized in Figure 3 and 4 for number of iterations and log-likelihood, respectively. Similarly, for each method, the best result based on the log-likelihood values among the runs are given in Table 2. Results from the true parameters are also included in Table 2 for comparison.
From Table 2, Figure 3 and Figure 4, we observed a similar pattern as in Example Bundle 1, i.e., the log-likelihood values are close to each other, however the number of iterations of the two optimization methods are smaller than that of EM, further showing the promise of using the proposed optimization methods as alternatives in practice.
4.3 Example Bundle 3
With exactly the same settings, we report results for Example Bundle 3 in this section. The resulting number of iteration and log-likelihood values are reported in Figure 5 and 6, respectively. For each method, the best result based on the log-likelihood values among the runs are given in Table 3. Results from the true parameters are also included in Table 3 for comparison. The true weights and categorical parameters are reported in Tables 16, 17, 18, 19 in the appendix.
From Table 3, Figure 5 and Figure 6, we observed a similar pattern as in the previous examples: the number of iterations of the two optimization methods are much smaller than that of EM, while the log-likelihood values are quite close to each other for the three methods.
4.4 Example Bundle 4
The resulting number of iterations and log-likelihood values of Example Bundle are reported in Figure 7 and 8, respectively. For each method, the best result based on the log-likelihood values among the ten runs are given in Table 4. Results from the true parameters are also included in Table 4 for comparison. The true weights and categorical parameters are repeated in Tables 20, 21, 22, 23 in the appendix.
These results in Example Bundle 4 further confirm what we have observed: with the same settings, the two optimization methods converge in less iterations than EM, while they still yield comparable log-likelihood values as EM. This strengthens the promise of using the two proposed optimization methods as alternatives to EM when estimating a latent class model.
4.5 An Application
We now go back to the motivating example discussed in Section 1. The data set is available in the R package BayesLCA. White et al. (2014) used a latent class model to fit the data using Gibbs sampler. It is clear that this is an binary data set. We follow the recommendation of Moran et al. (2004) and fit a latent class model with (1) EM, (2) SQP, and (3) Projected Quasi-Newton methods and different initial points, and the best result of each method is recorded based on the log-likelihood value. The results are summarized in Table 5. The result from BayesLCA package (White et al., 2014) is also included. The side-by-side boxplots for number of iterations and log-likelihood values of the runs are reported in Figure 9.
From Table 5, SQP has the best performance in terms both the log-likelihood value and the number of iterations. The results from EM and Projected Quasi-Newton are very similar although EM needs way more iterations to converge. This agrees with the previous observations. We also note that all the three methods considered have larger log-likelihood values than that of BayesLCA. The method proposed by White et al. (2014) actually has the smallest log-likelihood value.
In addition, since we do not know the true values, we computed pairwise root mean squared error (RMSE) based on the estimates, i.e, we compute RMSE of estimates for every two methods. Since we have considered four different methods, we will have six RMSEs, one number for each pair of methods. The results are reported in Table 6
The results in Table 6 are consistent with the observations we have made: Since the log-likelihood values are closer for EM, SQP and Projected QN, the pairwise RMSE of these three methods are way lower than those when paired with BayesLCA, for example the RMSE of SQP and EM is , while the RMSE for SQP and BayesLCA is , which is over eight times larger.
5 Discussion
In the previous section, we have shown the number of iterations of the proposed methods is smaller than that of the EM algorithm. In this section, we report the comparison of CPU times. Taking the application as an example, the runtime are reported in Table 7.
From Table 7, we can see that the EM algorithm indeed has the lowest CPU time per iteration. However, when taking the number of iterations into account, the story is different: using SQP as example, the number of iterations of EM and SQP are and , respectively. The number of iterations for the SQP algorithm is around of the EM algorithm, although the CPU time per iteration is merely about four times longer. Therefore, the total computational time of the SQP algorithm is significantly less than that of the EM algorithm. In the application example, the computational times of the SQP and Projected QN methods are respectively and better compared to the EM algorithm.
6 Concluding Remarks
The primary research objective of the paper is to provide alternative methods to learn the unknown parameters of the latent class model. Given the log-likelihood as a function of the parameters, we aim to find estimators that can maximize the log-likelihood function. The traditional way is to use the EM algorithm. However, it is observed that the EM algorithm converges slowly. Therefore, in this paper, we propose the use of two constrained optimization methods, namely the Sequential Quadratic Programming and the Projected Quasi-Newton methods as alternatives. Simulation studies and the real example in Section 4 reveal that the two proposed methods perform well. The obvious advantages we observed are as follows: (1) the two optimization methods produced slightly larger log-likelihood values compared to the EM algorithm; (2) they converge in significantly less iterations than the EM algorithm. That being said, we want to make it clear that the aim is not to completely replace the EM algorithm, rather we would like to provide alternative ways of achieving the same goal using some optimization methods. Inter-disciplinary collaboration between researchers in statistics and mathematical optimization has never been as important as in the big data era.
About the Authors
Hao Chen received his Ph.D. in Statistics from the University of British Columbia and is currently a Senior Data Scientist at Precima. Lanshan Han holds a Ph.D. in Decision Sciences and Engineering Systems from the Rensselaer Polytechnic Institute and is currently a Director of Research and Development at Precima. Alvin Lim received his Ph.D. in Mathematical Sciences from the Johns Hopkins University and is currently Precima’s Chief Scientist and Vice President for Research and Development.
Appendix
The Python source codes for EM and Projected Quasi-Newton for LCM are available upon request. The implementation of SQP is available in Python SciPy package.
The true weights and parameters used in Section 4 are given below.
Example Bundle 1
Example Bundle 2
Example Bundle 3
Example Bundle 4
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Asparouhov and Muthén (2011) Asparouhov, T., Muthén, B., 2011. Using bayesian priors for more flexible latent class analysis, American Statistical Association.
- 2Bauer (1972) Bauer, D., 1972. Constructing confidence sets using rank statistics. Journal of the American Statistical Association 67, 687–690.
- 3Birgin et al. (2000) Birgin, E.G., Martínez, J.M., Raydan, M., 2000. Nonmonotone spectral projected gradient methods on convex sets. SIAM Journal on Optimization 10, 1196–1211.
- 4Byrd et al. (1994) Byrd, R.H., Nocedal, J., Schnabel, R.B., 1994. Representations of quasi-newton matrices and their use in limited memory methods. Mathematical Programming 63, 129–156.
- 5Dempster et al. (1977) Dempster, A.P., Laird, N.M., Rubin, D.B., 1977. Maximum likelihood from incomplete data via the EM algorithm. Journal of the royal statistical society. Series B (methodological) , 1–38.
- 6Gower and Richtárik (2017) Gower, R.M., Richtárik, P., 2017. Randomized quasi-newton updates are linearly convergent matrix inversion algorithms. SIAM Journal on Matrix Analysis and Applications 38, 1380–1409.
- 7Hagenaars and Mc Cutcheon (2002) Hagenaars, J.A., Mc Cutcheon, A.L., 2002. Applied latent class analysis. 64, Cambridge University Press.
- 8Han (1977) Han, S.P., 1977. A globally convergent method for nonlinear programming. Journal of optimization theory and applications 22, 297–309.
