rsegment: Initialization of cluster prototypes using a randomly...

View source: R/inaparc.R

rsegmentR Documentation

Initialization of cluster prototypes using a randomly selected segment

Description

Initializes the cluster prototypes matrix using using a k-length segment of data set consists of consecutive objects that starts with a randomly sampled data object.

Usage

rsegment(x, k)

Arguments

x

a numeric vector, data frame or matrix.

k

an integer for the number of clusters.

Details

The function rsegment randomly samples one data object as the prototype of first cluster, and then it assigns the next k-1 data objects as the prototype of remaining clusters.

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, scseek, scseek2, spaeth, ssamp, topbottom, uniquek, ursamp

Examples

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

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