calcCentroids: Calculate the new centroids of the clusters based on the...

Description Usage Arguments Value Examples

View source: R/geo-c-mean.R

Description

Calculate the new centroids of the clusters based on the belonging matrix

Usage

1
calcCentroids(data, belongmatrix, m)

Arguments

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

Value

A n X k matrix represening the belongings of each datapoint to each cluster

Examples

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)

jejeplusfaim/geoCmeans documentation built on Dec. 23, 2019, 7:31 p.m.