Skip to Content
监控运维实践:原则与策略
book

监控运维实践:原则与策略

by Mike Julian
November 2020
Intermediate to advanced
142 pages
3h 12m
Chinese
Posts & Telecom Press
Content preview from 监控运维实践:原则与策略
40
|
第
4
章
负载平均值(平滑化)
图 4-2:负载平均值,平滑化
也就是说,波峰和波谷通过计算平均值消失了。这样做有利有弊:通过在数据集中隐藏极
端情况,我们可以创建一个更容易识别规律的数据集,但同时也失去了可能有价值的数据
点。更加平滑的曲线以牺牲准确性为代价来实现更好的可视化效果。换句话说,确定应用
合理的平滑化程度是一种相互平衡的艺术。
4.5
 中位数
当平均值不准确时,中位数就有了用武之地。本质上,中位数是数据集的“中间”值,在
实际中经常被用来精确地分析整个人口的收入水平。如果有
10
个人,每年的收入都是
3
万
美元,那他们的平均年收入是
3
万美元,中位数也是
3
万美元。如果这
10
个人中有一个人
发了财,每年收入达到
50
万美元,那么平均年收入将达到
7.7
万美元,但中位数保持不变。
因此,当处理个别数据变动较大的数据集时,中位数通常比平均值更能代表数据集。
要计算中位数,首先必须按升序对数据集进行排序,然后使用公式
(
n
+1)/2
,其中
n
是数据
集中的条目数。
3
如果数据集包含奇数个条目,则中位数就是中间项。但是,如果数据集
包含偶数个条目,那么中间的两个数字将被取平均值,结果得出的中位数值就不是原始数
据集中的数字了。
例如,假设有个数据集:
0
、
1
、
1
、
2
、
3
、
5
、
8
、
13
、
21
,此数据集的中位数是
3
。如果加
入第
10
个数字,那么数据集就变成了
0
、
1
、
1
、
2
、
3
、
5
、
8
、
13
、
21
、
34
,中位数则变成
了
4
。
注
3
:
TSDB
对你隐藏了底层的计算,但是相信我,它就是这么做的。
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

Java数据科学实战

Java数据科学实战

Michael R. Brzustowicz, PhD
可编程网络自动化

可编程网络自动化

Jason Edelman, Scott S. Lowe, Matt Oswalt
精通模块化JavaScript

精通模块化JavaScript

Nicolás Bevacqua

Publisher Resources

ISBN: 9787115550750