Description Usage Arguments Details Value Author(s) References Examples
Wrapper function for a call to fuzzy k-means function FKM
.
1 |
d |
data-set with standardized columns |
m |
Fuzziness parameter |
start |
Starting values as provided by |
maxit |
Maximum number of iterations (default is 10000). |
threshold |
Upper limit below which a cluster distance (as defined by matrix |
The function is a specific wrapper function to a function which gives the same results as FKM from the R package fclust
.
The below example gives an exemplary complete run for an analysis as implemented by this package DoTC
.
The selection of the fuzziness parameter m
is crucial for the result of the wrapFKM
function. We have good experiences with following strategy: first use a coarse grid of proposal values for m
, look on aggregation of clusters across this proposal vector – as for example implemented by getStart
–, and then refine this grid for a certain sub-interval of interest.
A list with the results from the call to FKM
:
U
(matrix containing case-wise (rows) cluster (columns) affiliation values),
H
(pair-wise cluster distance matrix),
value
(terminal value of the fuzzy-clustering algorithm),
iter
(number of iterations needed to get to value
),
k
(number od proposed clusters to the start solution start
),
call
(call to the interior FKm
function),
combined
(which clusters are members of any combinations),
remaining
(which clusters stay remaining),
combinations
(which are the combinations that lead to the reduction),
and n_cluster
(number of reduced clusters),
and further attributes of the solution across potential different proposal fuzziness values:
m
(all proposed fuzziness values),
n_cluster
(the number of reduced clusters),
m_before_step
(the maximum fuzziness parameter before a reduction in n_cluster
),
and which_list_indexes_m_before_step
(where are the respective results to m_before_step
).
Holger Sennhenn-Reulen
Paolo Giordani, Maria Brigida Ferraro (2015). fclust: Fuzzy Clustering, on CRAN.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
## Load and standardize (by column) data:
d <- read.csv("data_file.csv")
d <- apply(d, MAR = 2, FUN = scale)
## Set maximal number of clusters:
K <- 10
## Set random seed:
set.seed(1604)
## Get k-means-clustering solutions as starting values:
start <- getStart(d = d, K = K)
## Proposal vector for fuzziness parameter m:
m_proposal <- seq(1.1, 2.5, by = 0.1)
## Calculate results of fuzzy clustering:
fkm_result <- wrapFKM(d = d, m = m_proposal, start = start)
## Plot cluster solution across varying m:
plotNcluster(fkm = fkm_result)
## Plot distribution of typicality coefficients:
plotTC(fkm_result[[1]])
## Plot pairwise cluster segregation comparisons:
plotCS(fkm_result[[1]])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.