calcSWFCCentroids: 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 (spatial version)

Usage

1
calcSWFCCentroids(data, belongmatrix, neighbours, m, alpha)

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

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)

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.