一種基于密度的聚類的算法
部分偽代碼:
Cluster M-DBSCAN()
{
Initialize S(n×n),dthr;
For i=1:n
If S(i,j)>=dthr
sum(i)++;
count(i,j)=j;
j++;
end
end
sort(sum(:));
S’(1,:)=count(,:);
S’(1,n+1)=meanradius;
S’(1,n+2)=meandistance2;
If meandistance1meandistance2
If meanradiusnewmeanradius
Add xj to S’(1);
S’(1,n+1)=new meanradius;
Else
Next class;
End
If no class
Create a new class S’(2);
End
…
Until no data come
It’s over
Output S’
}
評論