Skip to Content
面向数据科学家的实用统计学
book

面向数据科学家的实用统计学

by Peter Bruce, Andrew Bruce
October 2018
Beginner to intermediate
238 pages
6h 32m
Chinese
Posts & Telecom Press
Content preview from 面向数据科学家的实用统计学
无监督学习
|
195
图 7-1:CVX 和 XOM 股票收益的主成分
虚线表示了两个主成分。第一主成分沿椭圆的长轴,第二主成分沿椭圆的短轴。我们可以
看到,两支股票收益的主要变化是由第一主成分解释的。这是合理的,因为能源股的价格
倾向于整体发生变化。
从上例中我们看到,第一主成分的权重均为负值。将所有权重的正负值反
转,并不会改变主成分。例如,如果对第一主成分使用
0.747
和
0.665
的权
重,等价于使用
-
0.747
和
-
0.665
的权重。这从图中也可以看出,经过原点
和
(1, 1)
的无限长直线,等同于经过原点和
(
-
1,
-
1)
的无限长直线。
7.1.2
 计算主成分
将主成分分析从两个变量扩展到多个变量是十分简单的。对于第一主成分,只需在线性组
合中额外添加预测变量,并指定可优化所有预测变量共变集(在统计学中这被称为
协方
差
,参见
5.2.1
节)的权重。主成分的计算使用了经典的统计学方法,依赖于数据的相关
矩阵或协方差矩阵,并且计算执行得很快,不需要做迭代。如上节所述,主成分分析只适
用于数值型变量,并不适用于分类变量。完整的计算过程如下。
(1)
在创建第一主成分时,主成分分析给出的预测变量的线性组合,使得可解释的总方差的
比例最大化。
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

基于Python的智能文本分析

基于Python的智能文本分析

Benjamin Bengfort, Rebecca Bilbro, Tony Ojeda
Python数据处理

Python数据处理

Jacqueline Kazil, Katharine Jarmul
精通機器學習

精通機器學習

Aurélien Géron
C++语言导学(原书第2版)

C++语言导学(原书第2版)

本贾尼 斯特劳斯特鲁普

Publisher Resources

ISBN: 9787115493668