# 基于模型的聚类

基于模型的聚类是一种统计方法，它通过拟合有限混合模型——通常是多元正态分布的混合——并借助期望最大化（EM）算法对数据分组，再通过BIC（贝叶斯信息准则；一种平衡模型拟合与复杂度的统计量）等模型选择准则选择簇数和簇几何。与启发式划分不同，它为每个观测返回归属概率，对存在多少个簇给出有原则的答案，明确选择簇的形状、体积和方向，并提供一种将离群点视为噪声的方法。<sup>[1](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-115326)</sup> 同一个拟合模型可支持判别分析和多元密度估计。<sup>[2](https://doi.org/10.1198/016214502760047131)</sup> 相比之下，标准启发式聚类不提供分类不确定性评估，可能产生次优划分，并且通常不要求用户指定形状矩阵。<sup>[3](https://sites.stat.washington.edu/raftery/Research/PDF/bensmail1997.pdf)</sup><sup> • </sup><sup>[29](https://www.cambridge.org/core/journals/public-health-nutrition/article/comparison-of-heuristic-and-modelbased-clustering-methods-for-dietary-pattern-analysis/355233434504C5EC749927B49D95E2F7)</sup>

| 关键事实 | 值 |
|---|---|
| 底层模型 | 多元高斯分布的有限混合，每个簇一个成分，通过EM以最大似然拟合<sup>[1](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-115326)</sup> |
| 协方差族 | 14个命名模型（EII至VVV），来自分解 \( \Sigma_k = \lambda_k \cdot U_k \cdot \Delta_k \cdot U_k^{T} \)<sup>[4](https://mclust-org.github.io/mclust-book/chapters/02_mixture.html)</sup> |
| 模型选择 | BIC \( = 2\ell - \nu \log(n) \)；ICL为簇重叠增加熵惩罚<sup>[4](https://mclust-org.github.io/mclust-book/chapters/02_mixture.html)</sup> |
| 默认搜索网格 | 14个协方差模型 × 最多 \( G = 9 \) 个成分 = 126个拟合模型<sup>[5](https://mclust-org.github.io/mclust-book/chapters/03_cluster.html)</sup> |
| 每次EM运行成本 | \( O(n \cdot d^{2} \cdot k \cdot T + d^{2.807} \cdot k \cdot T) \)，而k-means为 \( O(n \cdot d \cdot k \cdot T) \)<sup>[6](https://ar5iv.labs.arxiv.org/html/2006.04916)</sup> |
| 每个观测的输出 | 归属概率；不确定性由 \( 1 - \max_k z^{*}_{ik} \) 度量<sup>[7](https://sites.stat.washington.edu/people/raftery/Research/PDF/fraley1998.pdf)</sup> |
| 参考软件 | R中的mclust（版本6.1.3），带贝叶斯正则化和基于重抽样的推断<sup>[8](https://cran.r-project.org/web/packages/mclust/mclust.pdf)</sup> |

## 工作原理

数据被建模为来自混合分布 \( \sum_{k=1}^{G} \pi_k f_k(x; \theta_k) \) 的抽样，其中每个成分 \( f_k \) 是多元正态密度，具有自己的均值和协方差，混合比例 \( \pi_k \) 之和为一。由于成分标签未观测，有限混合的EM最大化Q函数，即完整数据对数似然在潜在成分指示变量上的条件期望：\( Q(\Psi; \Psi^{(t)}) = \sum_i \sum_k \hat{z}_{ik}^{(t)} \{ \log \pi_k + \log f_k(x_i; \theta_k) \} \)。<sup>[4](https://mclust-org.github.io/mclust-book/chapters/02_mixture.html)</sup>

E步计算责任度 \( \hat{z}_{ik} = \hat{\pi}_k \varphi(x_i; \hat{\mu}_k, \hat{\Sigma}_k) / \sum_g \hat{\pi}_g \varphi(x_i; \hat{\mu}_g, \hat{\Sigma}_g) \)，即观测 \( i \) 属于成分 \( k \) 的估计条件概率。M步重新估计混合比例为 \( \hat{\pi}_k = n_k/n \)，均值为 \( \hat{\mu}_k = \sum_i \hat{z}_{ik} x_i / n_k \)，以及协方差。<sup>[4](https://mclust-org.github.io/mclust-book/chapters/02_mixture.html)</sup> 当对数似然变化低于阈值时迭代停止；在温和正则条件下，EM至少收敛到局部最大值，收敛性也可用艾特肯（Aitken）加速准则评估。<sup>[6](https://ar5iv.labs.arxiv.org/html/2006.04916)</sup><sup> • </sup><sup>[1](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-115326)</sup> 通过这些后验概率进行软分配，避免了分类最大似然下硬分配带来的偏差。<sup>[9](https://gwern.net/doc/statistics/probability/2019-mclachlan.pdf)</sup>

基于模型方法的显著特征是，成分协方差不是自由矩阵。它们被分解为 \( \Sigma_k = \lambda_k \cdot U_k \cdot \Delta_k \cdot U_k^{T} \)，其中 \( \lambda_k = |\Sigma_k|^{1/d} \) 是控制体积的标量，\( \Delta_k \) 是控制形状的对角矩阵，\( U_k \) 是控制方向的特征向量正交矩阵。<sup>[4](https://mclust-org.github.io/mclust-book/chapters/02_mixture.html)</sup> 体积、形状和方向各自可被约束为相等（E）或允许在簇间变化（V），得到14个命名模型EII、VII、EEI、VEI、EVI、VVI、EEE、VEE、EVE、VVE、EEV、VEV、EVV和VVV。<sup>[4](https://mclust-org.github.io/mclust-book/chapters/02_mixture.html)</sup> 这些约束将经典准则作为特例恢复：\( \Sigma_k = \lambda I \) 给出长期称为沃德（Ward）准则的平方和准则，\( \Sigma_k = \lambda \cdot D \cdot A \cdot D^{T} \) 对应弗里德曼–鲁宾（Friedman–Rubin）模型，无约束的 \( \Sigma_k \) 对应斯科特–西蒙斯（Scott–Symons）模型。<sup>[7](https://sites.stat.washington.edu/people/raftery/Research/PDF/fraley1998.pdf)</sup>

## 实施方法

mclust中实现的标准工作流有四步。首先，用基于模型的凝聚层次聚类初始化EM。其次，默认对最多 \( G = 9 \) 个成分拟合所有可用协方差模型，共126个模型，不过范围可以扩展。第三，选择使BIC最大的模型和成分数，\( \mathrm{BIC}_{\mathrm{Model},G} = 2\ell_{\mathrm{Model},G}(\hat{\Psi}; x) - \nu_{\mathrm{Model},G} \log(n) \)，其中 \( \ell \) 是最大化后的对数似然，\( \nu \) 是估计参数个数。第四，将每个观测分配给条件概率最大的成分，即MAP原则。<sup>[5](https://mclust-org.github.io/mclust-book/chapters/03_cluster.html)</sup>

可通过向混合模型加入泊松（Poisson）过程成分来容纳噪声和离群点，并用基于BIC的贝叶斯因子近似比较模型，从而同时选择簇数和几何模型。<sup>[7](https://sites.stat.washington.edu/people/raftery/Research/PDF/fraley1998.pdf)</sup> BIC的替代包括ICL，\( \mathrm{ICL} = \mathrm{BIC} + 2\sum_i \sum_k c_{ik} \log(\hat{z}_{ik}) \)，它通过一个度量簇重叠的熵项惩罚BIC，因此偏好分离良好的簇；以及自助似然比检验。<sup>[4](https://mclust-org.github.io/mclust-book/chapters/02_mixture.html)</sup><sup> • </sup><sup>[5](https://mclust-org.github.io/mclust-book/chapters/03_cluster.html)</sup> 由于BIC倾向于选择近似密度所需的成分数，而不是簇数本身，mclust还提供clustCombi，这是通过基于熵的成分合并构建的组合聚类层次结构。<sup>[8](https://cran.r-project.org/web/packages/mclust/mclust.pdf)</sup>

## 起源

一个簇可定义为混合模型中的一个成分。<sup>[10](https://link.springer.com/article/10.1007/s00357-016-9211-9)</sup> 早期为聚类拟合混合模型的工作包括一份关于类型最大似然分析的技术报告、一篇发表于《Biometrika》的关于估计正态分布混合成分的论文，以及一篇关于通过多元混合分析进行模式聚类的文章。<sup>[11](https://doi.org/10.21236/ad0620026)</sup><sup> • </sup><sup>[12](https://doi.org/10.1093/biomet/56.3.463)</sup><sup> • </sup><sup>[13](https://doi.org/10.1207/s15327906mbr0503_6)</sup> 这些方案所依赖的一般EM框架来自登普斯特（Dempster）、莱尔德（Laird）和鲁宾（Rubin）（1977）。<sup>[14](https://doi.org/10.1111/j.2517-6161.1977.tb01600.x)</sup> 贝叶斯处理见于宾德（Binder）1978年发表于《Biometrika》的关于贝叶斯聚类分析的论文。<sup>[15](https://doi.org/10.1093/biomet/65.1.31)</sup>

杰弗里·D·班菲尔德（Jeffrey D. Banfield）和阿德里安·E·拉夫特里（Adrian E. Raftery）1993年发表于《Biometrics》的论文《基于模型的高斯与非高斯聚类》与“基于模型的聚类”这一术语以及简约协方差族相关联，<sup>[16](https://doi.org/10.2307/2532201)</sup> 吉勒·塞勒（Gilles Celeux）和热拉尔·戈瓦埃尔（Gérard Govaert）1995年的高斯简约聚类模型论文讨论了通过EM对该族进行最大似然估计。<sup>[17](https://doi.org/10.1016/0031-3203%2894%2900125-6)</sup> 克里斯·弗雷利（Chris Fraley）1998年发表于《Computer Journal》的论文提出了基于BIC的工作流，用于选择簇数和聚类方法，<sup>[18](https://doi.org/10.1093/comjnl/41.8.578)</sup> 随后1999年有MCLUST软件论文，<sup>[19](https://doi.org/10.1007/s003579900058)</sup> 2002年弗雷利和拉夫特里发表于《JASA》的论文将该方法学与判别分析和密度估计整合起来。<sup>[2](https://doi.org/10.1198/016214502760047131)</sup>

## 变体

由于基于正态性的估计不稳健，多元t混合模型是连续数据的标准稳健替代。<sup>[20](https://people.smp.uq.edu.au/GeoffMcLachlan/mnb_as06.pdf)</sup> flowClust包将t混合与博克斯-考克斯（Box-Cox）变换结合，通过EM估计参数，同时处理离群点识别和变换选择，簇数由BIC或ICL选择。<sup>[21](https://bioconductor.posit.co/packages/release/bioc/vignettes/flowClust/inst/doc/flowClust.html)</sup> 对于高维数据，即观测数相对于维度很大时，因子分析器混合使用这种形式的成分协方差来减少参数数量；其向t因子分析器混合的扩展已应用于微阵列基因表达数据。<sup>[22](https://richardbean.id.au/papers/gbb_csda07.pdf)</sup> 对因子分析器混合和概率主成分分析混合的贝叶斯变分处理，其动机是最大似然方法容易陷入局部极大。<sup>[23](https://proceedings.neurips.cc/paper_files/paper/1999/file/2451041557a22145b3701b0184109cab-Paper.pdf)</sup> 麦克尼古拉斯（McNicholas）和墨菲（Murphy）（2008）的pgmm框架处理了成分内和成分间协方差均经特征分解的简约高斯混合模型。<sup>[24](https://doi.org/10.1007/s11222-008-9056-0)</sup> 布韦龙（Bouveyron）和布吕内-索马尔（Brunet-Saumard）（2014）综述了高维基于模型的聚类。<sup>[25](https://www.sciencedirect.com/science/article/abs/pii/S0167947312004422)</sup>

## 应用

基于模型的聚类的早期应用包括字符识别、组织分割、雷场和地震断层检测、纺织品缺陷识别以及天文数据分类。<sup>[7](https://sites.stat.washington.edu/people/raftery/Research/PDF/fraley1998.pdf)</sup> 在基因组学中，高斯混合模型已应用于聚类基因表达数据，EM通常由基于模型的层次聚类步骤初始化。<sup>[26](https://faculty.washington.edu/kayee/model/modeltech.pdf)</sup> 流式细胞术说明了该方法的模型选择权衡：BIC选择了 \( G = 9 \) 的VEV模型，而基于熵的成分合并表明六簇解，显示简约性如何与成分数权衡。<sup>[1](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-115326)</sup> 对于高维或非常大的数据，pmclust通过MPI上的期望-收集-最大化算法实现并行基于模型的聚类，并使用RndEM初始化，选择对数似然最高的随机起点。<sup>[27](https://snoweye.r-universe.dev/pmclust/doc/manual.html)</sup>

## 局限与替代方法

计算是首要成本。在d维中运行T次迭代、k个成分时，高斯混合的EM成本为 \( O(n \cdot d^{2} \cdot k \cdot T + d^{2.807} \cdot k \cdot T) \)，主要开销是评估 \( n \cdot k \) 个高斯密度，而k-means为 \( O(n \cdot d \cdot k \cdot T) \)。<sup>[6](https://ar5iv.labs.arxiv.org/html/2006.04916)</sup>

若干失效模式是结构性的。高斯混合的似然曲面在协方差奇异处无界，尽管EM倾向于收敛到有限局部极大，且结果强烈依赖起点，没有一种初始化方法普遍最优。<sup>[4](https://mclust-org.github.io/mclust-book/chapters/02_mixture.html)</sup> EM只是局部优化方法，随着维度和簇数增加，局部最优数量增加，收敛到远离全局解的机会上升；全局优化变体如CE-EM和MRAS-EM每次运行较慢，但能产生显著更好的解。<sup>[28](https://www.sciencedirect.com/science/article/abs/pii/S0167947309002473)</sup> EM还收敛缓慢，并且当成分协方差变得病态时失效，例如一个簇中观测很少或几乎共线；在mclust中，缺失的BIC值通常表示协方差估计在EM期间变得奇异，贝叶斯正则化可解决此问题。<sup>[7](https://sites.stat.washington.edu/people/raftery/Research/PDF/fraley1998.pdf)</sup><sup> • </sup><sup>[5](https://mclust-org.github.io/mclust-book/chapters/03_cluster.html)</sup>

具体与k-means相比，这种关系在极限下是精确的：当所有协方差 \( \Sigma_c = \varepsilon I \) 时，高斯混合的EM在 \( \varepsilon \to 0 \) 时退化为k-means，给出到最近均值的硬分配，而一般混合使用马哈拉诺比斯（Mahalanobis）距离和软分配。<sup>[6](https://ar5iv.labs.arxiv.org/html/2006.04916)</sup>

## References

1. [Model-Based Clustering (Annual Review of Statistics and Its Application)](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-115326)
2. [Chris Fraley, Adrian E Raftery (2002). Model-Based Clustering, Discriminant Analysis, and Density Estimation. Journal of the American Statistical Association.](https://doi.org/10.1198/016214502760047131)
3. [Inference in Model-Based Cluster Analysis (Bensmail et al.)](https://sites.stat.washington.edu/raftery/Research/PDF/bensmail1997.pdf)
4. [Finite Mixture Models – Model-Based Clustering, Classification, and Density Estimation Using mclust in R](https://mclust-org.github.io/mclust-book/chapters/02_mixture.html)
5. [Model-Based Clustering – mclust book, Chapter 3](https://mclust-org.github.io/mclust-book/chapters/03_cluster.html)
6. [An Algorithmic Introduction to Clustering (arXiv 2006.04916)](https://ar5iv.labs.arxiv.org/html/2006.04916)
7. [How Many Clusters? Which Clustering Methods? Answers Via Model-Based Cluster Analysis (Fraley & Raftery, The Computer Journal, 1998)](https://sites.stat.washington.edu/people/raftery/Research/PDF/fraley1998.pdf)
8. [mclust: Gaussian Mixture Modelling for Model-Based Clustering, Classification, and Density Estimation (CRAN documentation, v6.1.3)](https://cran.r-project.org/web/packages/mclust/mclust.pdf)
9. [Finite Mixture Models (McLachlan et al., WIREs Computational Statistics, 2019)](https://gwern.net/doc/statistics/probability/2019-mclachlan.pdf)
10. [Model-Based Clustering (Journal of Classification, 2016)](https://link.springer.com/article/10.1007/s00357-016-9211-9)
11. [John H. Wolfe (1965). A COMPUTER PROGRAM FOR THE MAXIMUM LIKELIHOOD ANALYSIS OF TYPES. .](https://doi.org/10.21236/ad0620026)
12. [N. E. DAY (1969). Estimating the components of a mixture of normal distributions. Biometrika.](https://doi.org/10.1093/biomet/56.3.463)
13. [John H. Wolfe (1970). PATTERN CLUSTERING BY MULTIVARIATE MIXTURE ANALYSIS. Multivariate Behavioral Research.](https://doi.org/10.1207/s15327906mbr0503_6)
14. [A. P. Dempster, N. M. Laird, D. B. Rubin (1977). Maximum Likelihood from Incomplete Data Via the EM Algorithm. Journal of the Royal Statistical Society Series B (Statistical Methodology).](https://doi.org/10.1111/j.2517-6161.1977.tb01600.x)
15. [D. A. BINDER (1978). Bayesian cluster analysis. Biometrika.](https://doi.org/10.1093/biomet/65.1.31)
16. [Jeffrey D. Banfield, Adrian E. Raftery (1993). Model-Based Gaussian and Non-Gaussian Clustering. Biometrics.](https://doi.org/10.2307/2532201)
17. [Gaussian parsimonious clustering models (Pattern Recognition, 1995)](https://doi.org/10.1016/0031-3203%2894%2900125-6)
18. [C. Fraley (1998). How Many Clusters? Which Clustering Method? Answers Via Model-Based Cluster Analysis. The Computer Journal.](https://doi.org/10.1093/comjnl/41.8.578)
19. [Chris Fraley, Adrian E. Raftery (1999). MCLUST: Software for Model-Based Cluster Analysis. Journal of Classification.](https://doi.org/10.1007/s003579900058)
20. [Robust Cluster Analysis via Mixture Models (McLachlan)](https://people.smp.uq.edu.au/GeoffMcLachlan/mnb_as06.pdf)
21. [Robust Model-based Clustering of Flow Cytometry Data: The flowClust package](https://bioconductor.posit.co/packages/release/bioc/vignettes/flowClust/inst/doc/flowClust.html)
22. [Extension of the Mixture of Factor Analyzers (Computational Statistics & Data Analysis)](https://richardbean.id.au/papers/gbb_csda07.pdf)
23. [Variational Inference for Bayesian Mixtures of Factor Analysers (NeurIPS 1999)](https://proceedings.neurips.cc/paper_files/paper/1999/file/2451041557a22145b3701b0184109cab-Paper.pdf)
24. [Paul David McNicholas, Thomas Brendan Murphy (2008). Parsimonious Gaussian mixture models. Statistics and Computing.](https://doi.org/10.1007/s11222-008-9056-0)
25. [Model-based clustering of high-dimensional data: A review (Computational Statistics and Data Analysis)](https://www.sciencedirect.com/science/article/abs/pii/S0167947312004422)
26. [Model-Based Clustering and Data Transformations for Gene Expression Data](https://faculty.washington.edu/kayee/model/modeltech.pdf)
27. [Package 'pmclust' reference manual](https://snoweye.r-universe.dev/pmclust/doc/manual.html)
28. [New global optimization algorithms for model-based clustering (Computational Statistics and Data Analysis)](https://www.sciencedirect.com/science/article/abs/pii/S0167947309002473)
29. [A comparison of heuristic and model-based clustering methods for dietary pattern analysis, Public Health Nutrition, Cambridge Core](https://www.cambridge.org/core/journals/public-health-nutrition/article/comparison-of-heuristic-and-modelbased-clustering-methods-for-dietary-pattern-analysis/355233434504C5EC749927B49D95E2F7)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Multivariate association and dimension reduction › Titles Mo to W

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/model-based-clustering

English original: https://www.edgepedia.org/model-based-clustering
