Skip to Main Content
Python 机器学习实践:测试驱动的开发方法
book

Python 机器学习实践:测试驱动的开发方法

by Matthew Kirk
January 2018
Intermediate to advanced content levelIntermediate to advanced
211 pages
8h 31m
Chinese
China Machine Press
Content preview from Python 机器学习实践:测试驱动的开发方法
聚类
159
确定无监督学习方法的一些先验的合格性
将结果与某种实际事实进行比较
群集的合格性
领域知识在确定非监督学习模型的适应度上可能会非常有用。例如,如果想要找到一
些类似的事物,可以使用一些基于距离的度量。如果希望确定数据的独立属性,可以
基于相关性或协方差来计算适应度。可能的适应度函数包括:
与质心的平均距离
与群集中所有点的平均距离
轮廓系数
距离质心或者所有点的平均距离,被处理成我们将要讨论的算法,例如
K
均值或者
EM
聚类,但轮廓系数对集群映射的合格性是很有意义的。
轮廓系数
轮廓系数通过查看集群内部的平均距离与最近集群的平均距离来评估集群的性能,而
不需要真实参考标准(即通过已提供的直接观察到的数据与推断的观察结果对比),
如图
9-1
所示。
集群1 集群2
选取样本 计算集群内部
平均距离
计算到下一集群的
平均距离
9-1:轮廓系数视图
数学化的度量如下:
Mathematically the metric is:
s =
b a
max
a, b
where a is the average distance between a sample and all other points in that cluster
and b is the same sample’s mean distance to the next nearest cluster points.
This coefficient ends up becoming useful because it will show ...
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.
Start your free trial

You might also like

Mastering Python for Bioinformatics

Mastering Python for Bioinformatics

Ken Youens-Clark

Publisher Resources

ISBN: 9787111581666