B1_DEFAULT: ktaucenters_run

Description Usage Arguments Format Value Note References See Also Examples

Description

Robust Clustering algorithm based on centers, a robust and efficient version of K-Means.

Usage

1

Arguments

data

A matrix of size n x p.

K

The number of clusters.

centers

matrix of size K x p containing the K initial centers, one at each matrix-row.

tolerance

tolerance parameter used for the algorithm stopping rule

max_iter

a maximum number of iterations used for the algorithm stopping rule

Format

An object of class numeric of length 1.

Value

A list including the estimated K centers and labels for the observations

Note

Some times, if the initial centers are wrong, the algorithm converges to a non-optimal (local) solution. To avoid that, the algorithm must be run several times. This task is carried out by ktaucenters

References

Gonzalez, J. D., Yohai, V. J., & Zamar, R. H. (2019). Robust Clustering Using Tau-Scales. arXiv preprint arXiv:1906.08198.

See Also

ktaucenters

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Generate Synthetic data (three cluster well separated)
Z=rnorm(600);
mues=rep(c(0,10,20),200)
data= matrix(Z+mues,ncol=2)

# Applying the algorithm
sal = ktaucenters_aux(
data, K=3, centers=data[sample(1:300,3), ],
tolerance=1e-3, max_iter=100)

#plot the results
plot(data,type='n')
points(data[sal$cluster==1,],col=1);
points(data[sal$cluster==2,],col=2);
points(data[sal$cluster==3,],col=3);

anevolbap/ktaucenterscpp documentation built on March 10, 2021, 10:12 a.m.