ksteps | R Documentation |
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)
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’. |
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.
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. |
Zeynel Cebeci, Cagatay Cebeci
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
data(iris) res <- ksteps(x=iris[,1:4], k=5) v <- res$v print(v)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.