mean shift

基本Mean Shift

示意图
给定d维空间$R^d$的n个样本点 ,i=1,…,n,在空间中任选一点x,那么Mean Shift向量的基本形式定义为:

![](http://pic002.cnblogs.com/images/2012/358029/2012051213564761.jpg)

其中,$S_k$是在一个半径为h的高维球区域中的点集合。

基于核函数的Mean Shift

![](http://pic002.cnblogs.com/images/2012/358029/2012051215383189.jpg)

解释一下K()核函数,h为半径,$\frac{C_{k,d}}{nh^d}$ 为单位密度,要使得上式f得到最大,最容易想到的就是对上式进行求导,的确meanshift就是对上式进行求导.。

Mean Shift Clustering伪代码

1
2
3
4
5
6
7
8
9
// e is a predefined threshold value.
for data in dataset:
x = data;
do :
calculate mean shift of x: ms;
error = f(ms-x);
while (error < e);
dict{data} = x;
dict{x}=dict{y} -> x,y in same cluster
分享到