ssamp: Initialization of cluster prototypes using systematic random...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/inaparc.R

Description

Initializes the cluster prototypes matrix using the systemically sampled data objects.

Usage

1
ssamp(x, k)

Arguments

x

a numeric vector, data frame or matrix.

k

an integer for the number of clusters.

Details

The function ssamp generates a prototype matrix using the sytematic random sampling technique. Since the data objects are enough away from each other with this technique it may provide better initializations than the simple random sampling. The first object is randomly sampled from the top n/k objects of data set and assigned as the prototype of first cluster. The prototypes of remaining clusters are the objects whose row indexes are v_{1} + i (n/k), where v1 and i are the index of first selected object and index of cluster, respectively.

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 ‘obj’ with this function because the cluster prototype matrix contains the sampled objects.

call

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

Author(s)

Zeynel Cebeci, Cagatay Cebeci

See Also

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

Examples

1
2
3
4
data(iris)
res <- ssamp(x=iris[,1:4], k=5)
v <- res$v
print(v)

inaparc documentation built on Nov. 17, 2017, 7:53 a.m.