科学与数学setosa.io
主成分分析的可视化讲解
Principal Component Analysis Explained Visually (2015)
2015 — 2022,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这是一个交互式可视化页面,用直观的动画演示主成分分析(PCA)的原理:如何在高维数据中找到方差最大的方向,从而实现降维和可视化。页面属于 Setosa 的 'Explained Visually' 系列项目。
为什么经久不衰:它把一个抽象的统计概念变成可动手操作的动画,多年来反复登上 HN 首页,至今仍是初学者理解 PCA 最直观的入门材料之一。
HN 评论精选
推荐用贝叶斯 PCA 的方法有原则地确定主成分数量
很棒的可视化!顺便说个相关话题:PCA 也可以看作降维方法。一个有趣的问题是如何有原则地选择保留多少个主成分,而不是算到无聊为止。Bishop 1999 年的论文给出了一种迷人做法:把 PCA 重构成带层级先验的贝叶斯隐变量模型来回答这个问题。
aqsalose查看英文原文
Nice visualization! This provides me an opportunity to go on a random tangent on PCA: The post considers PCA from visualization perspective, but the exactly same thing can also be viewed as a method for reducing number of dimensions in the original dataset. [1] Now, one of the interesting questions in a dimensionality reduction task is, how to pick the number of dimensions (principal components)? A good number? In a principled way, instead of just computing the next component and the next and the one after that, until you get bored? (It works for visualizations where you often want only the first two or three components anyway, but suppose we want more information than plots.) I recently learned that there's a fascinating way to do this, presented in Bishop's paper [2] from 1999. In short: this can answered by recasting the PCA as Bayesian latent variable model with a hierarchical prior. (Yes, it is a bit of mouthful to say. Yes, it is fairly mathematical, unlike the visualization.) [1] https://en.wikipedia.org/wiki/Dimensionality_reduction [2] https://www.microsoft.com/en-us/research/publication/bayesian-pca/
高维视角下应把 PCA 的奇异向量理解为'原型信号'的排序
我喜欢这个可视化,但高维下的 PCA 会给你很不同的直觉。我更愿意把奇异向量理解为按重要性排序的'原型信号',数据的某种线性组合能被它们最好地重构。这解释了为什么自然时间序列数据的最大奇异向量类似傅里叶系数,而对齐人脸数据的最大奇异向量对应光照变化。
gabrielgoh查看英文原文
I love this visualization - but I think there's a very different intuition you get from PCA in high dimensions. I prefer to think of the singular vectors in PCA as an ordering of "prototype signals" for which some linear combination best reconstructs the data. That explains, for example, why the largest singular vectors on natural time series data gives fourier like coefficients, and why the largest singular vectors on aligned faces gives variations in lighting.
用蛋糕的'特性 vs 原料'类比直观解释 PCA
不用数学的更简单解释:你吃一块蛋糕,说'咸、甜、果香、口感好'——这些就是你眼中的'主成分'。做蛋糕的配方里没有'甜'或'果香'这些指令,只有糖、香草、柠檬汁等原料,混合后才产生这些特性。用特性(主成分)描述蛋糕比罗列全部原料更方便、更相关——这正是 PCA 有用的原因。
jschveibinz查看英文原文
Even simpler without the math: Let’s say you eat a piece of cake. You say, “hmm, salty, sweet, fruity, nice texture.” Let’s call those attributes the “principal components” of the cake from your point of view. Are there others? Maybe you could have also said “moist, or fluffy,” but you didn’t because those weren’t as obvious, so not as important. When the cake was made, according to the recipe, there were no instructions on how to add “sweet” or “fruity.” Instead, there was a list of ingredients: sugar, vanilla, lemon juice, flour, water, baking powder, etc. The mixture of these ingredients in the quantities dictated (plus the baking) resulted in the cake having the characteristics that you described. Some of the characteristics have a strong reliance on just one or two ingredients, e.g. “sweet” with “sugar,” and some characteristics are the result of subtle combinations of many ingredients, e.g. “texture.” The list of characteristics (principal components) definitely describe the cake, but in a more convenient and relevant way. You don’t need the whole list of ingredients to describe the cake. This is what makes principal component analysis useful.
理解 PCA 需要一整套线性代数概念作基础
我认为 PCA 是学好线性代数的一个好理由。要真正理解它,需要学基、秩、秩近似、正交性、特征向量、谱分解等一整套概念——没有这些,PCA 其实并没有被真正理解。
usgroup查看英文原文
I think PCA is a good reason to learn enough linear algebra to understand PCA. It means learning about basis, rank, rank approximation, orthogonality, eigenvectors, spectral decomposition, etc. There's a whole iceberg of concepts that go into actually understand PCA without which PCA is not really understood.
历次讨论
同类还值得读
如果月球只有 1 像素:一个极其精确的太阳系模型(2014)
If the moon were only 1 pixel: A tediously accurate solar system model (2014)
一个网页版太阳系模型,以“如果月亮只有 1 像素”的真实比例呈现:你必须一路横向滚动,才能体会行星之间空旷到何等程度。
科学与数学上首页 7 次 · 2014–2025joshworth.com编辑精选沉浸式线性代数(2016)
Immersive Linear Algebra (2016)
《Immersive Linear Algebra》是一本完全免费、开放在线的线性代数“超文本教科书”,其最大特色是大量可交互的图形:读者可以直接拖动、操作图中的向量、矩阵和变换…
科学与数学上首页 5 次 · 2015–2024immersivemath.com编辑精选如何将贝果切成两个相连的半环(2009)
How to Slice a Bagel into Two Linked Halves (2009)
数学家 George Hart 的经典教程,演示如何用一刀把贝果切成两个相互扣住的环,并附上切割步骤与数学原理。
科学与数学上首页 5 次 · 2009–2022georgehart.com“犹太问题”:一组用于歧视的数学题
Jewish problems
一篇 arXiv 论文,整理并讨论苏联时期犹太学生在申请大学数学系时被问到的特殊数学难题:这些题往往有简单解法却极难想到,被用作面试中拒绝犹太考生的手段。
科学与数学上首页 5 次 · 2011–2021arxiv.org你的身体并非为长久而造:人类死亡率数据的一课
Your body wasn’t built to last: a lesson from human mortality rates
文章从人类死亡率随年龄变化的统计规律出发,解释身体并非为长久使用而设计:年轻时死亡风险较低,之后随年龄近似指数上升,像复杂系统在不断累积损伤。
科学与数学上首页 5 次 · 2009–2018gravityandlevity.wordpress.com