Learn R Programming

ppclust (version 1.1.0.1)

crisp: Crisp the fuzzy membership degrees

Description

Crisps the fuzzy and possibilistic membership degrees from the fuzzy or possibilistic clustering algorithms.

Usage

crisp(u, method, tv)

Value

cluster

a numeric vector containing the indexes (labels) of clusters for the maximum membership of the objects.

Arguments

u

a numeric matrix containing the fuzzy or possibilistic membership degrees of the data objects.

method

a string for selection of the crisping method. The default is max that assigns the data object to the cluster in which the object has maximum membership. The alternative is threshold that assigns the objects to a cluster if its maximum membership degree is greater than tv, a threshold value.

tv

a number for the threshold membership degree. The default is 0.5 with the method is threshold if it is not speficied by the user.

Author

Zeynel Cebeci

Details

The function crisp produces the crisp or hard membership degrees of the objects in order to place them into only one cluster.

Examples

Run this code
data(iris)
x <- iris[,1:4]

# Run FCM 
res.fcm <- fcm(x, centers=3)

# Crisp the fuzzy memberships degrees and plot the crisp memberships
cllabels <- crisp(res.fcm$u)
plot(x, col=cllabels)

Run the code above in your browser using DataLab