spaeth {inaparc}R Documentation

Initialization of cluster prototypes using Spaeth's algorithm

Description

Initializes the cluster prototypes using the centroids that are calculated with Spaeth's algorithm (Spaeth, 1977), which is similar to Forgy's algorithm.

Usage

spaeth(x, k)

Arguments

x

a numeric vector, data frame or matrix.

k

an integer specifying the number of clusters.

Details

In this algorithm, each object in the data set is assigned to one of k clusters in cyclical fashion. The j-th (j \epsilon {1,2, \cdots, n}) object is assigned to the (j-1 (mod k) + 1)(j-1 (mod\, k)+1)-th cluster. In contrast to Forgy's method, this method is sensitive to order of data (Celebi et al, 2013).

Value

an object of class ‘inaparc’, which is a list consists of the following items:

v

a numeric matrix containing the initial cluster prototypes.

ctype

a string representing the type of centroid, which used to build prototype matrix. Its value is ‘avg’ with this function because the cluster prototypes are the averages of sampled objects for each feature.

call

a string containing the matched function call that generates the ‘inaparc’ object.

Author(s)

Zeynel Cebeci, Cagatay Cebeci

References

Spaeth, H. (1977). Computational experiences with the exchange method: Applied to four commonly used partitioning cluster analysis criteria, European J of Operational Rsch., 1(1):23-31. doi:10.1016/S0377-2217(77)81005-9

Celebi, M.E., Kingravi, H.A. & Vela, P.A. (2013). A comparative study of efficient initialization methods for the K-means clustering algorithm, Expert Systems with Applications, 40 (1): 200-210. arXiv:https://arxiv.org/pdf/1209.1960.pdf

See Also

aldaoud, ballhall, crsamp, firstk, forgy, hartiganwong, inofrep, inscsf, insdev, kkz, kmpp, ksegments, ksteps, lastk, lhsmaximin, lhsrandom, maximin, mscseek, rsamp, rsegment, scseek, scseek2, ssamp, topbottom, uniquek, ursamp

Examples

data(iris)
res <- spaeth(iris[,1:4], k=5)
v <- res$v
print(v)

[Package inaparc version 1.2.0 Index]