Skip to Content
数据科学中的实用统计学(第2版)
book

数据科学中的实用统计学(第2版)

by Peter Bruce, Andrew Bruce, Peter Gedeck
October 2021
Intermediate to advanced
289 pages
8h 31m
Chinese
Posts & Telecom Press
Content preview from 数据科学中的实用统计学(第2版)
无监督学习
249
本节关键术语
树状图
记录以及记录所属簇的层次结构的一种可视化表示。
距离
测量一条记录与另一条记录之间邻近程度的一种方式。
相异度
测量一个簇与另一个簇之间邻近程度的一种方式。
层次聚类的灵活性是有代价的,它不能很好地扩展到有几百万条记录的大数据集上。即使
是对于有几万条数据的中等规模数据集,层次聚类也需要大量的计算资源。实际上,层次
聚类的大多数应用集中在较小的数据集之上。
7.3.1
 一个简单的例子
在一个有
n
条记录和
p
个变量的数据集上进行层次聚类时,需要以下两个基本指标。
距离度量
d
i
,
j
,用来测量两条记录
i
j
之间的距离。
相异度度量
D
A
,
B
,用来测量两个簇
A
B
之间的差异,这种测量是基于每个簇中成员
之间的距离
d
i
,
j
来进行的。
对于有数值型数据的应用,最重要的选择就是相异度指标。层次聚类开始时,将每条记录
都设定为一个簇,然后通过迭代将这些记录组合成相异度最小的簇。
R
,可以使用
hclust
函数执行层次聚类。
hclust
kmeans
的一个主要区别是,它处
理的是成对记录的距离
d
i
,
j
,而不是数据本身。你可以使用
dist
函数计算出这些距离。例
如,以下代码对一个公司集合的股票收益进行了层次聚类:
syms1 <- c('GOOGL', 'AMZN', 'AAPL', 'MSFT', 'CSCO', 'INTC', 'CVX', 'XOM', 'SLB',
'COP', 'JPM', 'WFC', 'USB', 'AXP', 'WMT', 'TGT', 'HD', ...
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机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu

Publisher Resources

ISBN: 9787115569028