imembrand: Initialization of membership matrix using simple random...

View source: R/inaparc.R

imembrandR Documentation

Initialization of membership matrix using simple random sampling

Description

Initializes the membership degrees matrix which is used to start a fuzzy and possibilistic partitioning clustering algorithm.

Usage

imembrand(n, k, mtype, numseed)

Arguments

n

an integer for the number of objects in the data set.

k

an integer for the number of clusters.

mtype

a string for any of three random initialization methods. The default method is f1 for fuzzy memberships. The options are f2 and f3 for fuzzy memberships and h for hard (crisp) memberships.

numseed

a number to be used for the seed of RNG.

Details

The function imembrand generates a numeric matrix containing the initial membership degrees by using simple random sampling technique.

Value

an object of class ‘inaparc’, which is a list consists of the following items:

u

a numeric matrix containing the crisp initial membership degrees of n objects to k clusters.

call

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

Author(s)

Zeynel Cebeci, Cagatay Cebeci

See Also

figen, imembones

Examples

data(iris)
n <- dim(iris)[1]

# Generate a fuzzy membership degrees matrix using default values
u <- imembrand(n=n, k=5)$u
head(u)
tail(u)

# Generate a fuzzy membership degrees matrix using the method 3
u <- imembrand(n=n, k=5, mtype="f3", numseed=123)$u
head(u)
tail(u)

# Generate a crisp membership degrees matrix 
u <- imembrand(n=n, k=5, mtype="h")$u
head(u)
tail(u)

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