Description Usage Arguments Value Examples
Calculate the new centroids of the clusters based on the belonging matrix (spatial version)
1 | calcSWFCCentroids(data, belongmatrix, neighbours, m, alpha)
|
data |
A dataframe or matrix representing the observed data with nrows and p columns |
belongmatrix |
A n X k matrix giving for each observation n, its probability to belong to the cluster k |
neighbours |
A list.w object describing the neighbours typically produced by the spdep package |
m |
An integer representing the fuzzyness degree |
alpha |
An integer representing the weight of the space in the analysis (0 is a typical fuzzy-c-mean algorithm) |
A n X k matrix represening the belongings of each datapoint to each cluster
1 2 3 4 | data <- matrix(c(1,4,2,5,3,6,7,8,9,10,11,12),nrow=6,ncol=2)
centers <- data[1:2,]
belongmatrix <- calcBelongMatrix(centers,data,1.5)
newcenters <- calcCentroids(data,belongmatrix,1.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.