choicealpha: Empirical choice of the mixing parameter

Description Usage Arguments References Examples

View source: R/choicealpha.R

Description

This function calculates the proportion (resp. normalized proportion) of explained inertia of the partitions in K clusters obtained with the Ward-like hclustgeo procedure for a range of mixing parameters alpha. When the proportion (resp. normalized proportion) of explained inertia based on D0 decreases, the proportion (resp. normalized proportion) of explained inertia based on D1 increases. The plot of these criteria can help the user in the choice of the mixing parameter alpha.

Usage

1
choicealpha(D0, D1, range.alpha, K, wt = NULL, scale = TRUE, graph = TRUE)

Arguments

D0

an object of class "dist" with the dissimilarities between the n observations. The function as.dist can be used to transform an object of class matrix to object of class "dist".

D1

an object of class "dist" with other dissimilarities between the same n observations.

range.alpha

a vector of real values between 0 and 1.

K

the number of clusters.

wt

vector with the weights of the observations. By default, wt=NULL corresponds to the case where all observations are weighted by 1/n.

scale

if TRUE the two dissimilarity matrix are scaled i.e. divided by their max.

graph

if TRUE the two graphics (proportion and normalized proportion of explained inertia) are drawn.

References

M.chavent, V. Kuentz-Simonet, A. Labenne, J. Saracco. ClustGeo: an R package for hierarchical clustering with spatial constraints arXiv:1707.03897 [stat.CO]

Examples

1
2
3
4
5
6
7
8
data(estuary)
D0 <- dist(estuary$dat) # the socio-demographic distances
D1 <- as.dist(estuary$D.geo) # the geographic distances between the cities
range.alpha <- seq(0,1,0.1)
K <- 5
cr <- choicealpha(D0,D1,range.alpha,K,graph=TRUE)
cr$Q # proportion of explained pseudo inertia
cr$Qnorm # normalized proportion of explained pseudo inertia

ClustGeo documentation built on May 2, 2019, 10:15 a.m.