Description Usage Arguments Value Examples
Calculate the new centroids of the clusters based on the belonging matrix
1 | calcCentroids(data, belongmatrix, m)
|
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 |
m |
An integer representing the fuzzyness degree |
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.