ksteps: Initialization of cluster prototypes using the centers of k...

View source: R/inaparc.R

kstepsR Documentation

Initialization of cluster prototypes using the centers of k blocks

Description

Initializes the cluster prototypes matrix using the centers of objects in k blocks that are generated with a kind of systematic sampling method as described in the section ‘Details’.

Usage

ksteps(x, k, ctype)

Arguments

x

a numeric vector, data frame or matrix.

k

an integer for the number of clusters.

ctype

a string for the type of centroid. The options are ‘avg’ for average and ‘med’ for median of the objects in the blocks. The default is ‘avg’.

Details

The algorithm ksteps is similar to ksegments but it differs for the selection of the members of the segments or blocks. The objects whose row indexes are 1, 1+k, 1+2k,... are assigned to the first segment, and then the objects whose row indexes are 2, 2+k, 2+2k,... to the second block. In this way, k blocks of the objects are formed. The centers of these k blocks are assigned as the cluster prototypes.

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.

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, lastk, lhsmaximin, lhsrandom, maximin, mscseek, rsamp, rsegment, scseek, scseek2, spaeth, ssamp, topbottom, uniquek, ursamp

Examples

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

inaparc documentation built on June 16, 2022, 5:09 p.m.