# 典型变量分析

典型变量分析（canonical variate analysis，CVA）是一种多元统计方法，用于寻找实测变量的线性组合，使预先定义的各组之间实现最大程度的分离；或者，在第二种意义上，寻找两个变量集的线性组合，使二者之间相关性最大。该方法用于分类。这一名称涵盖了两个相互关联的传统：其一与判别分析相联系，最大化组间方差与组内方差之比<sup>[1](http://www.filogenetica.org/bibliografia/morfometria/ordenacion/Campbell&Atchley%201979CVA.pdf)</sup><sup> • </sup><sup>[2](https://support.nag.com/numeric/cl/nagdoc_latest/html/g03/g03acc.html)</sup>；其二与典型相关分析（canonical correlation analysis，CCA）相联系，最大化两组变量之间的相关性。<sup>[3](https://doi.org/10.1093/biomet/28.3-4.321)</sup> 文献中的术语确实混乱：CVA 常被等同于线性判别分析（linear discriminant analysis，LDA），而 CCA 本身有时也被称为典型变量分析。<sup>[4](https://bio723-class.github.io/Bio723-book/canonical-variates-analysis.html)</sup><sup> • </sup><sup>[5](https://jlahne.github.io/r-opus-v2/canonical-variate-analysis.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 最大化的量 | 组间方差与组内方差之比，\( \lambda = \mathbf{l}'\mathbf{B}\mathbf{l} / \mathbf{l}'\mathbf{W}\mathbf{l} \)<sup>[6](https://link.springer.com/article/10.1007/s10260-025-00831-y)</sup> |
| 特征值问题 | \( \mathbf{B}\mathbf{l} = \lambda \mathbf{W}\mathbf{l} \)，等价于 \( (\mathbf{B} - f\mathbf{W})\mathbf{c} = 0 \)<sup>[6](https://link.springer.com/article/10.1007/s10260-025-00831-y)</sup><sup> • </sup><sup>[1](http://www.filogenetica.org/bibliografia/morfometria/ordenacion/Campbell&Atchley%201979CVA.pdf)</sup> |
| 变量个数 | 具有非零根的典型变量有 \( h = \min(v,\, g-1) \) 个，其中 \( v \) 为变量数，\( g \) 为组数<sup>[1](http://www.filogenetica.org/bibliografia/morfometria/ordenacion/Campbell&Atchley%201979CVA.pdf)</sup> |
| 关键要求 | 组内散布矩阵必须非奇异，这要求 \( v \le n-g \) 且组内残差具有满列秩<sup>[6](https://link.springer.com/article/10.1007/s10260-025-00831-y)</sup> |
| 显著性检验 | Bartlett 1938 年提出的卡方统计量，自由度为 \( (v-k) \times (g-k-1) \)<sup>[7](https://genstat.kb.vsni.co.uk/knowledge-base/cva/)</sup> |
| 历史渊源 | 典型变量与典型相关系数由霍特林（H. Hotelling）提出，载于 Biometrika，1936 年<sup>[3](https://doi.org/10.1093/biomet/28.3-4.321)</sup> |
| 命名变体 | 典型岭，维诺德（H. D. Vinod）提出，载于 Journal of Econometrics，1976 年<sup>[8](https://doi.org/10.1016/0304-4076%2876%2990010-5)</sup> |

## 工作原理

在组间分离的意义上，CVA 取一个 \( n \times p \) 的数据矩阵，其样本分属 \( g \) 个组，寻找变量的线性组合，以在低维空间中最好地表示组均值，并以马哈拉诺比斯距离（一种考虑变量相关性和尺度的距离度量）加以分离。<sup>[9](https://www.casperalbers.nl/files/canonicalanalysis2014.pdf)</sup> 设 \( \mathbf{B} \) 表示组间平方和与乘积和矩阵，\( \mathbf{W} \) 表示组内平方和与乘积和矩阵。选择系数向量 \( \mathbf{c} \) 使以下比值最大化：

\[ f = \frac{\mathbf{c}'\mathbf{B}\mathbf{c}}{\mathbf{c}'\mathbf{W}\mathbf{c}}, \]

由此得到基本特征方程 \( (\mathbf{B} - f\mathbf{W})\mathbf{c} = 0 \)<sup>[1](http://www.filogenetica.org/bibliografia/morfometria/ordenacion/Campbell&Atchley%201979CVA.pdf)</sup>，等价地写为双边问题 \( \mathbf{B}\mathbf{l} = \lambda \mathbf{W}\mathbf{l} \)。<sup>[6](https://link.springer.com/article/10.1007/s10260-025-00831-y)</sup> CVA 最初的定义正是优化这两个二次型之比，需要求解一个双边特征值问题的最大特征值。<sup>[9](https://www.casperalbers.nl/files/canonicalanalysis2014.pdf)</sup>

秩限制了输出：对于 \( g \) 个组和 \( v \) 个变量，有 \( h = \min(v, g-1) \) 个具有非零典型根的典型向量；当 \( g-1 < v \) 时，组均值位于一个 \( g-1 \) 维子空间中。<sup>[1](http://www.filogenetica.org/bibliografia/morfometria/ordenacion/Campbell&Atchley%201979CVA.pdf)</sup> 等价地，所需的线性组合数目为 \( \operatorname{rank}(\mathbf{B}) \le \min(v, g-1) \)，仅当组均值张成的空间达到可能的最大秩时才达到最大值。<sup>[6](https://link.springer.com/article/10.1007/s10260-025-00831-y)</sup>

在双集合意义上，CCA 找出 \( r \le \min(p, q) \) 个 \( x \) 与 \( y \) 的线性组合，使二者相关性最大，求解 \( \max\ \mathbf{u}^\top \Sigma_{XY} \mathbf{v} \)，受单位方差和正交性约束；配对 \( (x\mathbf{u}_i, y\mathbf{v}_i) \) 即为典型变量，\( \mathbf{u}_i, \mathbf{v}_i \) 为典型方向，\( \lambda_i = \mathbf{u}_i^\top \Sigma_{XY} \mathbf{v}_i \) 为典型相关系数。<sup>[10](http://jmlr.org/papers/volume27/25-0196/25-0196.pdf)</sup> 其解满足特征值型方程 \( \Sigma_X^{-1} \Sigma_{XY} \Sigma_Y^{-1} \Sigma_{YX} U = U \Lambda^2 \) 以及 \( V \) 的对称对应式。<sup>[10](http://jmlr.org/papers/volume27/25-0196/25-0196.pdf)</sup>

## 操作步骤

实际操作者按以下步骤进行<sup>[11](https://metricgate.com/docs/canonical-variate-analysis/)</sup>：

1. 组装 \( n \times p \) 的数据矩阵，每行附有组标签。
2. 计算组内散布矩阵 \( \mathbf{W} \) 和组间散布矩阵 \( \mathbf{B} \)。
3. 求解特征值问题，计算 \( \mathbf{W}^{-1}\mathbf{B} \) 的特征分解（或通过奇异值分解，某些实现采用此法<sup>[2](https://support.nag.com/numeric/cl/nagdoc_latest/html/g03/g03acc.html)</sup>；典型向量也可由标准或广义特征值问题获得<sup>[12](https://ar5iv.labs.arxiv.org/html/1711.02391)</sup>）。
4. 保留前 \( \min(g-1, v) \) 个特征向量，按特征值降序排列，投影数据以获得典型得分。<sup>[11](https://metricgate.com/docs/canonical-variate-analysis/)</sup>
5. 用 Bartlett 卡方统计量依次检验各维度的显著性，该统计量渐近服从自由度为 \( (v-k) \times (g-k-1) \) 的卡方分布，对 \( k = 0, 1, \ldots, \min(g-1, v)-1 \) 逐一检验。<sup>[7](https://genstat.kb.vsni.co.uk/knowledge-base/cva/)</sup>
6. 检查特征值降序排列的碎石图，它指示了所捕获的组间与组内方差比的比例，有助于决定需要多少个典型变量。<sup>[13](https://simfit.uk/canonical_variates.pdf)</sup>

解释时使用结构相关性，即原始变量与典型映像（得分）之间的相关性，它传达了得分与变量轴的对齐方式<sup>[12](https://ar5iv.labs.arxiv.org/html/1711.02391)</sup>；绘制这些相关性而非原始系数是通常的做法。<sup>[5](https://jlahne.github.io/r-opus-v2/canonical-variate-analysis.html)</sup> 潜向量通常被缩放，使每个典型变量维度上的平均组内变异性为 1，因此根低于 1 的载荷标志着组内变异大于组间变异的维度。<sup>[7](https://genstat.kb.vsni.co.uk/knowledge-base/cva/)</sup> 组均值得分被中心化，使其按规模加权的质心位于原点。<sup>[7](https://genstat.kb.vsni.co.uk/knowledge-base/cva/)</sup>

## 起源

典型变量与典型相关系数由霍特林（H. Hotelling）在《两组变量之间的关系》（Biometrika，1936 年）中提出，该文将其定义为两组变量之间可由相关系数表示的不变关系。<sup>[3](https://doi.org/10.1093/biomet/28.3-4.321)</sup> 在此之前，1935 年发表于《教育心理学杂志》的论文《最可预测的准则》已先行问世。<sup>[14](https://doi.org/10.1037/h0058165)</sup><sup> • </sup><sup>[15](https://journals.sagepub.com/doi/10.3102/00346543043004433)</sup>

组间分离 CVA 的归属在不同传统之间并无定论<sup>[1](http://www.filogenetica.org/bibliografia/morfometria/ordenacion/Campbell&Atchley%201979CVA.pdf)</sup>，而其他叙述将典型变量的引入归功于霍特林（H. Hotelling）1936 年的论文<sup>[3](https://doi.org/10.1093/biomet/28.3-4.321)</sup><sup> • </sup><sup>[10](http://jmlr.org/papers/volume27/25-0196/25-0196.pdf)</sup>，另有来源将其归功于吉廷斯（Robert Gittins）的专著《典型变量分析》（Biomathematics，1985 年）。<sup>[16](https://doi.org/10.1007/978-3-642-69878-1_4)</sup><sup> • </sup><sup>[6](https://link.springer.com/article/10.1007/s10260-025-00831-y)</sup> 这些反映了判别分析与典型相关两条不同的谱系，而非各来源所能解决的单一优先权主张。

## 变体

**正则化。** 典型岭由维诺德（H. D. Vinod）于 1976 年在 Journal of Econometrics 上提出，将岭回归的思想引入典型分析框架，在样本协方差矩阵的对角线上添加惩罚项 \( k_1 \) 和 \( k_2 \)，以处理变量数超过样本量的情形。<sup>[8](https://doi.org/10.1016/0304-4076%2876%2990010-5)</sup><sup> • </sup><sup>[17](https://ar5iv.labs.arxiv.org/html/1501.01231)</sup> 岭 CCA 对应于对典型方向的 \( \ell_2 \) 惩罚，而稀疏 CCA 方法则惩罚 \( \ell_1 \) 范数。<sup>[18](https://arxiv.org/html/2403.02979v1)</sup>

**非线性与多视图。** 核 CCA 将数据映射到由核诱导的高维特征空间，然后执行线性 CCA，从而可以发现非线性关系；两阶段核 CCA 可选择稀疏特征和多重非线性关联。<sup>[19](https://link.springer.com/article/10.1186/s12859-017-1543-x)</sup> 广义 CCA 将方法扩展到两个以上的视图。<sup>[20](https://arxiv.org/html/2502.18756)</sup> 稀疏、深度和贝叶斯扩展则针对小样本、非线性和高维情形。<sup>[12](https://ar5iv.labs.arxiv.org/html/1711.02391)</sup>

## 应用

在形态测量学和系统分类生物学中，CVA 用于分离形态相似的生物体、评估组间亲缘关系，并将个体分配到预先存在的组中。<sup>[1](http://www.filogenetica.org/bibliografia/morfometria/ordenacion/Campbell&Atchley%201979CVA.pdf)</sup> 在感官科学中，对产品平均得分的主成分分析忽略了评价员的变异性，因此对双因素 MANOVA 中产品效应进行 CVA 是一种自然的替代方案，可依次生成使产品区分程度最大化的成分。<sup>[21](https://onlinelibrary.wiley.com/doi/10.1111/joss.12160)</sup> 双集合意义上的典型相关分析在遗传学和神经科学等领域仍然适用。<sup>[22](https://par.nsf.gov/servlets/purl/10324406)</sup>

## 局限与替代方法

**假设与失效模式。** CVA 假设组内协方差齐性；违反该假设可能扭曲典型轴并夸大表观分离。<sup>[11](https://metricgate.com/docs/canonical-variate-analysis/)</sup> 组内散布矩阵必须非奇异，因此变量数 \( v \) 不应超过观测数 \( n \)；当 \( v > n \) 时，协方差矩阵正则化是一种补救措施。<sup>[6](https://link.springer.com/article/10.1007/s10260-025-00831-y)</sup> 该方法对多重共线性敏感，多重共线性会使 \( \mathbf{W} \) 接近奇异；且在没有核扩展的情况下，它只能捕获线性边界。<sup>[11](https://metricgate.com/docs/canonical-variate-analysis/)</sup> 除非 \( n - g \) 远大于 \( v \)，否则显著性检验应谨慎对待。<sup>[7](https://genstat.kb.vsni.co.uk/knowledge-base/cva/)</sup>

**与替代方法的比较。** PCA 最大化总方差而不考虑组结构，而 CVA 最大化组间方差与组内方差之比。<sup>[11](https://metricgate.com/docs/canonical-variate-analysis/)</sup> CVA 与典型相关分析密切相关，常被等同于（线性）判别分析，有时称为 Fisher 线性判别分析；它是一种需要组标识符的有监督方法。<sup>[5](https://jlahne.github.io/r-opus-v2/canonical-variate-analysis.html)</sup> 还有一个解释上的注意事项：CVA 通常不产生正交线性函数，因此将典型变量绘制为笛卡尔坐标轴会轻微扭曲空间。<sup>[5](https://jlahne.github.io/r-opus-v2/canonical-variate-analysis.html)</sup>

**近期方法学工作。** 2026 年的一项扩展通过广义奇异值分解构建 CVA 双标图，消除了双标图展示中 \( v \le n \) 的限制；该扩展在 wideRhino R 包中实现。<sup>[6](https://link.springer.com/article/10.1007/s10260-025-00831-y)</sup>

## References

1. [The Geometry of Canonical Variate Analysis (Campbell & Atchley, 1979, Systematic Zoology)](http://www.filogenetica.org/bibliografia/morfometria/ordenacion/Campbell&Atchley%201979CVA.pdf)
2. [nag_mv_canon_var (g03acc), NAG C Library documentation](https://support.nag.com/numeric/cl/nagdoc_latest/html/g03/g03acc.html)
3. [H. HOTELLING (1936). RELATIONS BETWEEN TWO SETS OF VARIATES. Biometrika.](https://doi.org/10.1093/biomet/28.3-4.321)
4. [Chapter 14 Canonical Variates Analysis, Biology 723](https://bio723-class.github.io/Bio723-book/canonical-variates-analysis.html)
5. [Chapter 5 Canonical Variate Analysis, The R Opus v2](https://jlahne.github.io/r-opus-v2/canonical-variate-analysis.html)
6. [A canonical variate analysis biplot based on the generalized singular value decomposition (Statistical Methods & Applications, 2025)](https://link.springer.com/article/10.1007/s10260-025-00831-y)
7. [CVA directive, Genstat Knowledge Base 2024](https://genstat.kb.vsni.co.uk/knowledge-base/cva/)
8. [Canonical ridge and econometrics of joint production (Journal of Econometrics, 1976)](https://doi.org/10.1016/0304-4076%2876%2990010-5)
9. [Canonical Analysis: Ranks, Ratios and Fits (Albers & Gower, 2014)](https://www.casperalbers.nl/files/canonicalanalysis2014.pdf)
10. [Canonical Correlation Analysis as Reduced Rank Regression in High Dimensions (JMLR, 2025)](http://jmlr.org/papers/volume27/25-0196/25-0196.pdf)
11. [Canonical Variate Analysis Calculator, MetricGate documentation](https://metricgate.com/docs/canonical-variate-analysis/)
12. [A Tutorial on Canonical Correlation Methods](https://ar5iv.labs.arxiv.org/html/1711.02391)
13. [Canonical variates analysis, Simfit documentation](https://simfit.uk/canonical_variates.pdf)
14. [H. Hotelling (1935). The most predictable criterion.. Journal of Educational Psychology.](https://doi.org/10.1037/h0058165)
15. [Canonical Variate Analysis and Related Techniques (Review of Educational Research)](https://journals.sagepub.com/doi/10.3102/00346543043004433)
16. [Robert Gittins (1985). Canonical variate analysis. Biomathematics.](https://doi.org/10.1007/978-3-642-69878-1_4)
17. [Sparse canonical correlation analysis from a predictive point of view](https://ar5iv.labs.arxiv.org/html/1501.01231)
18. [Regularised Canonical Correlation Analysis: graphical lasso, biplots and beyond (arXiv, 2024)](https://arxiv.org/html/2403.02979v1)
19. [Sparse kernel canonical correlation analysis for discovery of nonlinear interactions in high-dimensional data (BMC Bioinformatics, 2017)](https://link.springer.com/article/10.1186/s12859-017-1543-x)
20. [Nonlinear Sparse Generalized Canonical Correlation Analysis for Multi-view High-dimensional Data (arXiv, 2025)](https://arxiv.org/html/2502.18756)
21. [Canonical Variate Analysis of Sensory Profiling Data (Journal of Sensory Studies, 2015)](https://onlinelibrary.wiley.com/doi/10.1111/joss.12160)
22. [Canonical correlation analysis in high dimensions with structured regularization](https://par.nsf.gov/servlets/purl/10324406)

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

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

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/canonical-variate-analysis

English original: https://www.edgepedia.org/canonical-variate-analysis
