| as.crisp | R Documentation |
The function converts fuzzy clusterings into crisp ones.
as.crisp(clara)
clara |
The results of |
A fuzzy clustering is converted to a crisp one by assinging each observation to the cluster showing the highest membership probability.
See seqclararange for details
## Not run:
# load illustrative data
data(mvad)
# Creating a state sequence object
mvad.seq <- seqdef(mvad[1:200, 17:86])
# Fuzzy clustering
mvadFuzzy <- seqclararange(mvad.seq, R = 3, sample.size = 20, kvals = 2:3,
method="fuzzy", seqdist.args = list(method = "HAM"),
parallel=FALSE)
# Conversion to crisp
mvadCrisp <- as.crisp(mvadFuzzy)
# Plotting sequences in 3 groups
seqdplot(mvad.seq,
group = mvadCrisp$clustering$cluster3,
border = NA)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.