# 函数型主成分分析

**函数型主成分分析**（Functional principal component analysis，FPCA）是将主成分分析推广到曲线、曲面或其他定义在连续域上的函数型数据的方法。FPCA 不再概括变量向量之间的变异，而是通过寻找一小组正交归一函数（称为特征函数或谐波函数）来概括函数之间的变异，这些函数能解释曲线样本中的大部分变异性。它被称为函数型数据分析中使用最广泛的技术，而函数型数据分析是处理在连续统上变化的观测值的统计框架。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11261241/)</sup><sup> • </sup><sup>[2](https://edoc.hu-berlin.de/server/api/core/bitstreams/e4b172a0-d2e2-4c3b-90c9-373456cbe203/content)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 将 PCA 应用于函数而非向量；主成分为协方差算子的正交归一特征函数，且不同特征值-特征函数对的数量是无限的<sup>[2](https://edoc.hu-berlin.de/server/api/core/bitstreams/e4b172a0-d2e2-4c3b-90c9-373456cbe203/content)</sup> |
| 模型 | 每条曲线表示为均值函数加上特征函数的有限加权和，权重为主成分得分，由曲线样本估计得到<sup>[3](https://onlinelibrary.wiley.com/doi/10.1002/bimj.202300363)</sup> |
| 标准流程 | 估计均值函数，估计协方差函数，估计特征函数和特征值，然后预测函数型主成分得分<sup>[4](https://www.tandfonline.com/doi/full/10.1080/10618600.2022.2067550)</sup> |
| 平滑为何重要 | 对含噪离散化曲线直接做 PCA 会高估特征值，并在真实特征值为零处分配信号；平滑 FPCA 的特征值则能紧密追踪真实值<sup>[5](https://functionaldataanalysis.org/chapter_03.html)</sup> |
| 稀疏数据 | 当每条曲线仅在少数不规则分布的时间点上被观测到，且观测含有测量误差时，估计通过平滑均值曲面和协方差曲面进行，而非对样本协方差直接做特征分析<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC4032817/)</sup> |
| 缺失数据容忍度 | 在一项 80% 网格观测缺失的模拟中，平滑 FPCA 仍能恢复接近真实值的特征函数；只有当每个函数的观测数极少时估计才会退化<sup>[5](https://functionaldataanalysis.org/chapter_03.html)</sup> |
| 软件 | R 包 fda 提供 pca.fd 用于计算谐波函数、特征值和得分；refund 提供 fpca.face；Python 包 scikit-fda 实现了 FPCA 及其他 FDA 工具<sup>[7](https://search.r-project.org/CRAN/refmans/fda/html/pca.fd.html)</sup><sup> • </sup><sup>[8](https://www.jstatsoft.org/index.php/jss/article/view/v109i02/4562)</sup> |

## FPCA 计算什么

函数型数据是随机函数 \( X_i(t) \) 的观测值，例如一天中连续记录的温度或追踪数年的生长曲线。FPCA 将每条曲线表示为均值函数加上协方差算子特征函数的加权和，这种分解称为 Karhunen-Loève 表示。特征函数 \( \phi_m(t) \) 在 \( L_2 \) 中正交归一，特征值 \( \nu_m \) 度量每种变异模式携带多少方差，得分 \( \xi_{m,i} \) 则定位每条个体曲线沿该模式的位置。在实践中，这些量从曲线样本中估计得到，样本视为 \( X_i(t) = \mu(t) + \sum_{m=1}^{\infty} \xi_{m,i} \phi_m(t) \) 的实现。<sup>[3](https://onlinelibrary.wiley.com/doi/10.1002/bimj.202300363)</sup><sup> • </sup><sup>[2](https://edoc.hu-berlin.de/server/api/core/bitstreams/e4b172a0-d2e2-4c3b-90c9-373456cbe203/content)</sup>

FPCA 与多元 PCA 密切相关，但有两个不同之处，这两个差异源于数据是函数。它利用观测数据的顺序和潜在信号的平滑性来降低近似的秩并提高可解释性，且协方差结构是双变量函数而非矩阵。<sup>[5](https://functionaldataanalysis.org/chapter_03.html)</sup><sup> • </sup><sup>[9](https://pmc.ncbi.nlm.nih.gov/articles/PMC6871761/)</sup> 由于特征值-特征函数对的数量是无限的，分析时截断至捕获大部分方差的前几个成分。<sup>[2](https://edoc.hu-berlin.de/server/api/core/bitstreams/e4b172a0-d2e2-4c3b-90c9-373456cbe203/content)</sup>

## 稠密数据与稀疏数据的估计

**稠密数据。** 当曲线在精细的公共网格上观测时，特征值和特征函数可通过矩估计法和样本协方差的特征分析来估计。对于稠密且等间距的观测，无论是否含测量误差，局部化 FPCA 方法都可以直接作用于样本协方差，无需基展开、个体曲线平滑或估计协方差算子的平滑。<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC4032817/)</sup><sup> • </sup><sup>[10](https://pmc.ncbi.nlm.nih.gov/articles/PMC4721272/)</sup>

**稀疏和不规则数据。** 在纵向研究、可穿戴传感器数据和环境数据集中，每条曲线通常记录在少量不均匀间隔的时间点上，且时间点因人而异。此时直接特征分析失效，需反复使用散点图平滑来估计潜在均值函数和协方差核，然后再提取特征函数。通过条件期望的主成分分析（PACE）方法正是为此情形开发的，允许估计稀疏且部分观测、含测量误差的函数型观测。<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC4032817/)</sup><sup> • </sup><sup>[11](https://archive.itea.org/journals/volume-44-3/estimating-sparsely-and-irregularly-observed-multivariate-functional-data/)</sup>

**平滑与正则化。** 函数型 PCA 的一个决定性特征是需要对估计的主成分曲线进行平滑或正则化。对于 Silverman 方法（对特征函数的粗糙度施加惩罚），理论研究给出了估计特征值和特征函数的收敛速率，这些速率同时依赖于样本量和平滑参数。<sup>[12](https://www.sciencedirect.com/science/article/pii/S0047259X10002411)</sup> 平滑的效果在模拟中显而易见：对含噪曲线做原始 PCA 会产生高度变异的特征函数估计，特征值几乎以直线缓慢趋近于零，这种模式表明数据比标准 PCA 所假设的更有噪声，而平滑 FPCA 估计则能紧密追踪真实特征函数。<sup>[5](https://functionaldataanalysis.org/chapter_03.html)</sup>

**快速计算。** 快速协方差估计（FACE）算法对样本协方差矩阵应用计算快速的三明治平滑器，直接提供特征值和特征函数，而无需显式构造平滑后的协方差矩阵。对于高维函数型数据，当对具有数万个网格点的协方差矩阵进行双变量平滑在计算上变得不可行时，一种结构化变体将 FACE 应用于变换后的数据矩阵。<sup>[13](https://pmc.ncbi.nlm.nih.gov/articles/PMC4383722/)</sup>

## 扩展

**多层 FPCA。** 当每个受试者贡献多个函数时，例如纵向研究中的重复访视，多层 FPCA（MFPCA）将总协方差分解为受试者间部分和受试者内部分，每个层级有各自的特征值和特征函数。对于稀疏和不规则网格，估计方法与稠密数据版本显著不同，依赖于对均值曲面和协方差曲面的平滑。<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC4032817/)</sup>

**多元与结构化 FPCA。** 多元 FPCA 将方法扩展到每个观测有多个函数的情形，允许每个预测变量有不同的特征函数甚至不同的时间域。<sup>[3](https://onlinelibrary.wiley.com/doi/10.1002/bimj.202300363)</sup><sup> • </sup><sup>[14](https://repository.lib.ncsu.edu/bitstreams/9ecc69b9-6f93-42f4-b0b5-1e41b9c366a3/download)</sup> 结构化 FPCA 纳入协变量信息，并处理本身即为平滑潜在过程的噪声成分。<sup>[13](https://pmc.ncbi.nlm.nih.gov/articles/PMC4383722/)</sup>

**稀疏性约束。** 将函数型 PCA 与稀疏性结合，得到的成分既平滑又集中在域的某些子集上，从而改善特征选择、信号恢复和可解释性。在网格点数很大且每个变量本身是无限维过程的高维情形中，稀疏 FPCA 使用一种阈值规则，利用单变量正交归一基展开与多元 Karhunen-Loève 表示之间的关系，避免非参数平滑。<sup>[15](https://arxiv.org/abs/1309.2895)</sup><sup> • </sup><sup>[16](https://arxiv.org/abs/2011.00959)</sup>

**协变量依赖与稳健变体。** 特征值调整 FPCA 对随协变量变化的特征值建模，在对合并协方差进行特征分解后，对稠密和稀疏数据均使用加权最小二乘方法。<sup>[4](https://www.tandfonline.com/doi/full/10.1080/10618600.2022.2067550)</sup> 稳健 FPCA 方法处理每条轨迹仅有少量观测且离群曲线会扭曲经典估计的纵向数据。<sup>[17](https://arxiv.org/abs/2012.01540)</sup>

## 应用

FPCA 用于观测单元为曲线或图像的任何场合。在神经影像学中，将 FPCA 应用于 fMRI 数据可得到主成分得分图像，以图形方式表示大脑中在各特征函数上具有载荷的区域。<sup>[9](https://pmc.ncbi.nlm.nih.gov/articles/PMC6871761/)</sup> 在医学中，稀疏 FPCA 方法应用于 CD4 计数等纵向结局，其中患者访视的次数和时间因人而异。<sup>[18](https://academic.oup.com/biomet/article/112/1/asae055/7825363)</sup><sup> • </sup><sup>[19](https://arxiv.org/abs/2603.18833)</sup> 在环境统计学中，对不完整时空数据做 FPCA 被用于重建维多利亚湖湖面水温这一基本气候变量，其重建精度优于其他信号重建技术。<sup>[20](https://link.springer.com/article/10.1007/s10651-024-00598-7)</sup> 应用于荷兰瓦登海的 Euro-CORDEX 气候预估时，单个主成分函数解释了 21 世纪情景下太阳辐射变异的 77% 和气温变异的 57%，且函数型成分被用于对气候情景进行聚类和分类。<sup>[21](https://www.frontiersin.org/journals/marine-science/articles/10.3389/fmars.2022.920616/full)</sup>

## 软件

在 R 中，fda 包的 pca.fd 函数计算谐波函数、特征值、得分以及每个特征函数解释的方差比例，并提供对谐波粗糙度施加惩罚的选项。<sup>[7](https://search.r-project.org/CRAN/refmans/fda/html/pca.fd.html)</sup> refund 包提供 fpca.face 用于基于协方差的快速 FPCA，可容忍缺失值。<sup>[5](https://functionaldataanalysis.org/chapter_03.html)</sup> 在 Python 中，scikit-fda 包实现了 FPCA 及其他函数型数据分析工具。<sup>[8](https://www.jstatsoft.org/index.php/jss/article/view/v109i02/4562)</sup>

## References

1. [From multivariate to functional data analysis: fundamentals, recent developments, and emerging areas, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC11261241/)
2. [A functional Principal Component Analysis for compositional data, Humboldt-Universität zu Berlin](https://edoc.hu-berlin.de/server/api/core/bitstreams/e4b172a0-d2e2-4c3b-90c9-373456cbe203/content)
3. [Functional Data Analysis: An Introduction and Recent Developments, Biometrical Journal (2024)](https://onlinelibrary.wiley.com/doi/10.1002/bimj.202300363)
4. [Eigen-Adjusted Functional Principal Component Analysis, Journal of Computational and Graphical Statistics](https://www.tandfonline.com/doi/full/10.1080/10618600.2022.2067550)
5. [Chapter 3: FPCA, Functional Data Analysis with R](https://functionaldataanalysis.org/chapter_03.html)
6. [Multilevel sparse functional principal component analysis, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC4032817/)
7. [pca.fd, R Documentation for the fda package](https://search.r-project.org/CRAN/refmans/fda/html/pca.fd.html)
8. [scikit-fda: A Python Package for Functional Data Analysis, Journal of Statistical Software](https://www.jstatsoft.org/index.php/jss/article/view/v109i02/4562)
9. [Functional principal component analysis of fMRI data, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC6871761/)
10. [Localized Functional Principal Component Analysis, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC4721272/)
11. [Estimating Sparse Multivariate Functional Data, ITEA Journal](https://archive.itea.org/journals/volume-44-3/estimating-sparsely-and-irregularly-observed-multivariate-functional-data/)
12. [Some theoretical properties of Silverman's method for smoothed functional principal component analysis, Journal of Multivariate Analysis](https://www.sciencedirect.com/science/article/pii/S0047259X10002411)
13. [Structured Functional Principal Component Analysis, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC4383722/)
14. [Multivariate FPCA background, NC State University repository](https://repository.lib.ncsu.edu/bitstreams/9ecc69b9-6f93-42f4-b0b5-1e41b9c366a3/download)
15. [Sparse and Functional Principal Components Analysis, arXiv](https://arxiv.org/abs/1309.2895)
16. [Sparse Functional Principal Component Analysis in High Dimensions, arXiv](https://arxiv.org/abs/2011.00959)
17. [Robust functional principal components for sparse longitudinal data, arXiv](https://arxiv.org/abs/2012.01540)
18. [Functional principal component analysis with informative observation times, Biometrika](https://academic.oup.com/biomet/article/112/1/asae055/7825363)
19. [Estimation of Functional Principal Components from Sparse Functional Data, arXiv](https://arxiv.org/abs/2603.18833)
20. [Functional principal component analysis for incomplete space-time data, Environmental and Ecological Statistics](https://link.springer.com/article/10.1007/s10651-024-00598-7)
21. [Coastal environmental and atmospheric data reduction in the Southern North Sea, Frontiers in Marine Science (2022)](https://www.frontiersin.org/journals/marine-science/articles/10.3389/fmars.2022.920616/full)

---
*Initially written Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Multivariate association and dimension reduction › Factor analysis and latent variable methods

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/functional-principal-component-analysis

English original: https://www.edgepedia.org/functional-principal-component-analysis
