|
Algorithm 2: Wishart clustering |
|
Input: {x1…xl}—objects, d(xi, xj)—distance function, k, h
|
|
Output: —cluster labels |
|
dk(xi)← distance to k-th nearest neighbour of xi
|
| sort objects so that ) the cluster c is defined to be a height-significant one, with respect to height value h > 0 if —volume of the minimum hypersphere with its centre at point x containing at least k observations |
|
fori←1 to l do
|
| Vi←x ∈ x(1)…x(i − 1)|d(x(i), x) ⩽ dk(x(i)) |
| Ci←y(x)|x ∈ Vi
|
| ifCi = ∅ then
|
| generate new cluster c |
| y(i)← c |
| if|Ci| = 1 then
|
| let Ci = {c} |
| ifcompleted(c) then
|
| ← noise |
| else
|
| ←c
|
| if then
|
| let {Ci = c1, …, ct} |
| ifcompleted(cj)∀j then
|
| ← noise |
| Si←c ∈ Ci|cissignificant(h) |
| if|Si| > 1 then
|
| completed(c)← True ∀c ∈ Si
|
| y(x)← noise ∀x ∈ c ∈ Ci∖Si
|
| ← noise |
| else
|
| merge all clusters from Ci and update labels in merged clusters |
|
return
y
|