Why the Gaussian Likelihood Needs a Covariance Choice
A continuous omics profile might contain transformed expression measurements, protein abundances, or other real-valued features. In a clustering model, each cluster needs a probability distribution for profiles assigned to it. A multivariate Gaussian is a common choice: it describes both the cluster’s typical profile and the variability and dependence of measurements around that profile. The key modeling decision is how much structure to allow in the covariance matrix.
The earlier material on conditional independence in integrative mixtures motivates a distinction: blocks may be modeled as independent of one another conditional on a sample’s cluster, while features within a continuous block may still be correlated. The covariance choice determines whether and how that within-block dependence is represented.
For a profile \(x_i\), the density under cluster \(k\) is
Here \(|\Sigma_k|\) is the determinant. The quadratic form is the squared Mahalanobis distance from \(x_i\) to the cluster mean: it measures deviation while accounting for the covariance structure. The determinant term adjusts the density for the volume and orientation of the distribution. A broader distribution spreads probability over more space and, all else equal, has a smaller density near its center.
For \(n_k\) profiles assigned to cluster \(k\), conditional independence of samples given the cluster parameters gives a likelihood that is the product of their densities. Taking logs is convenient because it turns that product into a sum:
This likelihood treats the observed feature values as continuous and assumes that, conditional on membership and the cluster parameters, profiles assigned to the cluster follow the specified Gaussian distribution. The covariance matrix must be positive definite for the ordinary density to exist. The model is a distributional assumption, not a claim that cluster membership causes the measured profile.
Three Covariance Structures
The structures differ in which variances and covariances they permit. In all three cases the mean can vary across features. Their restrictions concern the shape of variability around that mean.
| Structure | Covariance form | What it permits within a cluster | Covariance parameters |
|---|---|---|---|
| Spherical | \(\Sigma_k=\sigma_k^2 I_d\) | One common variance; zero covariance between distinct features | 1 |
| Diagonal | \(\Sigma_k=\operatorname{diag}(\sigma_{k1}^2,\ldots,\sigma_{kd}^2)\) | Feature-specific variances; zero covariance between distinct features | \(d\) |
| Full | Any positive-definite \(\Sigma_k\) | Feature-specific variances and nonzero covariances | \(d(d+1)/2\) |
A spherical covariance assumes that all features have the same within-cluster variance and are uncorrelated. A diagonal covariance relaxes the equal-variance restriction but still assumes conditional independence of features within that block. A full covariance can represent linear dependence and different orientations of cluster variation, but it requires many more parameters. These assumptions concern features within a profile; they are distinct from assumptions about dependence between omics blocks.
Worked Example: Estimating Three Covariance Structures
Consider a hypothetical cluster containing four profiles on two continuous features. Their values are \((2+\sqrt{3},3+\sqrt{3})\), \((2-\sqrt{3},3-\sqrt{3})\), \((2,4)\), and \((2,2)\). For this calculation, treat the cluster assignments as given.
The feature-wise mean is \(\bar{x}_k=(2,3)\). The centered profiles are \((\sqrt{3},\sqrt{3})\), \((-\sqrt{3},-\sqrt{3})\), \((0,1)\), and \((0,-1)\). Their outer products sum to
For comparison, the unbiased sample covariance divides this scatter matrix by \(n_k-1=3\):
In particular, the first diagonal entry is \((3+3+0+0)/3=6/3=2\), not \(2/3\). The off-diagonal entry is \((3+3+0+0)/3=2\). The second diagonal entry is \((3+3+1+1)/3=8/3\).
The Gaussian maximum likelihood covariance estimate, with the mean estimated from the same four profiles, divides the scatter by \(n_k=4\), not by \(n_k-1\):
The diagonal maximum likelihood estimate keeps only the diagonal entries, giving \(\operatorname{diag}(3/2,2)\). The spherical maximum likelihood estimate uses the average of those two variances, \((3/2+2)/2=7/4\), giving \((7/4)I_2\). Thus the full estimate preserves the positive within-cluster covariance, the diagonal estimate discards it, and the spherical estimate additionally imposes equal feature variances.
Reading and Comparing Gaussian Likelihoods
A likelihood value measures how well a specified parameter setting assigns density to observed profiles. It is not itself the probability that a cluster assignment or model is correct. To see how covariance changes the calculation, consider a hypothetical two-feature profile \(x=(2,1)\) evaluated at mean \(\mu=(0,0)\) under three covariance choices. The numerical comparison below is for this one profile only.
Worked Example: Evaluating Log-Densities Under Three Covariances
Under the spherical choice \(\Sigma=I_2\), the determinant is 1 and the squared Mahalanobis distance is \(2^2+1^2=5\). Therefore,
Under the diagonal choice \(\Sigma=\operatorname{diag}(4,1)\), the determinant is 4 and the quadratic form is \(2^2/4+1^2/1=2\). Thus,
Under the full covariance \(\Sigma=\begin{pmatrix}4&1\\1&1\end{pmatrix}\), the determinant is 3 and the inverse is \(\frac{1}{3}\begin{pmatrix}1&-1\\-1&4\end{pmatrix}\). The quadratic form is
It follows that
For this profile and these parameter values, the full covariance gives the largest density. This does not establish that it is the best clustering model: a flexible covariance can fit the observed profiles more closely, and a fair model comparison must account for the data as a whole and the models’ complexity.
For a fixed cluster assignment and an unrestricted Gaussian covariance, the maximum likelihood estimates are the feature-wise sample mean and the scatter matrix divided by \(n_k\). This follows directly from the log-likelihood. First, differentiating with respect to the mean gives the condition \(\sum_{i:z_i=k}(x_i-\mu_k)=0\), so \(\widehat{\mu}_k=\bar{x}_k\). Substituting this mean, let \(A=\sum_{i:z_i=k}(x_i-\bar{x}_k)(x_i-\bar{x}_k)^\top\). The covariance-dependent part is \(-\frac{n_k}{2}\log|\Sigma_k|-\frac{1}{2}\operatorname{tr}(\Sigma_k^{-1}A)\). Its maximum, when \(A\) is positive definite, occurs at \(\widehat{\Sigma}_k=A/n_k\). The divisor is \(n_k\) because this is a likelihood estimate; the familiar divisor \(n_k-1\) gives an unbiased sample covariance under the usual independent, identically distributed sampling conditions.
Diagnostics, Failure Modes, and Model Choice
The central practical tension is flexibility versus estimability. A full covariance has \(d(d+1)/2\) covariance parameters per cluster, so even a moderate feature count can require many observations in each cluster. If the centered profiles do not span all \(d\) dimensions, the scatter matrix is singular. In particular, its rank is at most \(n_k-1\), so \(n_k\leq d\) guarantees singularity. A singular estimate has determinant zero and no ordinary Gaussian density with that covariance; the inverse and log-determinant in the likelihood are undefined.
Useful checks include inspecting cluster sizes relative to the number of features, checking covariance eigenvalues and condition numbers, and looking for extreme correlations or variances that arise from very few profiles. A numerical routine that returns a covariance is not by itself proof that the estimate is stable: near-zero eigenvalues can make the inverse highly sensitive to small changes in the data. Also inspect whether the Gaussian shape is a plausible description, using residual patterns or simulated profiles from the fitted distribution. Strong skewness, heavy tails, or outliers can make a Gaussian likelihood poorly matched to the data.
A diagonal or spherical model can be a defensible alternative when data are limited, but each restriction should be scientifically and empirically plausible. The diagonal model may miss coordinated feature variation; the spherical model may additionally misrepresent features with different scales. Standardizing features can change the practical meaning of the spherical assumption, so any transformation should be considered part of the model specification and reported. A full covariance may capture dependence, but its extra flexibility can produce unstable estimates or overly tailored clusters. Regularization or dimension reduction may help with estimation, but those choices require their own justification and should not be confused with evidence that the unrestricted Gaussian assumptions hold.
When several omics blocks are modeled in one shared-cluster mixture, a Gaussian density can be used for a continuous block, with its own mean and covariance for each cluster. Under conditional independence of blocks given cluster membership, their block likelihoods multiply, or their log-likelihood contributions add. That factorization does not imply independence among features within a block: a full covariance can still represent those dependencies. Likelihood comparisons should use the same observations and account for model complexity; a higher maximized likelihood alone tends to favor a more flexible covariance structure.
Common Mistakes
- Confusing sample covariance with the Gaussian maximum likelihood estimate. Dividing the scatter by \(n_k-1\) gives the unbiased sample covariance; the Gaussian maximum likelihood estimate with an estimated mean divides by \(n_k\).
- Assuming diagonal means equal variance. A diagonal covariance allows each feature its own variance. Equal variances are imposed by the spherical structure.
- Calling a full covariance automatically preferable. It can model within-block dependence, but it needs enough information for stable estimation and may fit noise.
- Treating a singular covariance as an ordinary Gaussian covariance. The standard density requires a positive-definite covariance; a zero determinant makes the usual log-likelihood undefined.
- Interpreting the largest single-profile density as proof of the best clustering. A density comparison at fixed parameter values is not a model-selection result and does not account for complexity or uncertainty.
Check Your Understanding
Answer each question, then compare with the solutions below.
- For \(d=5\) features, how many covariance parameters are there in spherical, diagonal, and full cluster-specific covariance structures?
- A cluster has \(n_k=4\) profiles on \(d=4\) features. Can its unrestricted Gaussian maximum likelihood covariance be positive definite? Explain using the rank bound.
- For a two-feature cluster, the centered scatter matrix is \(\begin{pmatrix}12&6\\6&8\end{pmatrix}\) and \(n_k=6\). Give the full Gaussian maximum likelihood covariance estimate and the unbiased sample covariance.
- What within-block dependence assumption is imposed by a diagonal covariance? How does it differ from the spherical assumption?
- Why does a larger maximized likelihood under a full covariance not, by itself, show that it is the better clustering model?
Solutions. (1) The counts are 1, 5, and \(5(6)/2=15\), respectively. (2) No. The centered scatter has rank at most \(n_k-1=3\), which is less than \(d=4\); it cannot be positive definite, so the unrestricted maximum likelihood covariance is singular. (3) The maximum likelihood estimate is the scatter divided by 6, \(\begin{pmatrix}2&1\\1&4/3\end{pmatrix}\). The unbiased sample covariance divides by \(6-1=5\), giving \(\begin{pmatrix}12/5&6/5\\6/5&8/5\end{pmatrix}\). (4) A diagonal covariance sets covariances between distinct features to zero but allows different feature variances. A spherical covariance also sets those covariances to zero and requires all feature variances to be equal. (5) A full covariance has more parameters and can increase the fitted likelihood through flexibility; judging it requires considering complexity, estimation stability, and whether its assumptions fit the data.