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’.
ksteps(x, k, ctype)
a numeric vector, data frame or matrix.
an integer for the number of clusters.
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’.
an object of class ‘inaparc’, which is a list consists of the following items:
a numeric matrix containing the initial cluster prototypes.
a string representing the type of centroid, which used to build prototype matrix.
a string containing the matched function call that generates this ‘inaparc’ object.
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.
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
# NOT RUN {
data(iris)
res <- ksteps(x=iris[,1:4], k=5)
v <- res$v
print(v)
# }
Run the code above in your browser using DataLab