Description Usage Arguments Value References See Also Examples
This function calculates the proportion of inertia explained by the partitions in K
clusters
for a range of mixing parameters alpha
. When the proportion
of explained inertia calculated with D0
decreases, the proportion of explained inertia
calculated with D1
increases. The plot of the two curves of explained
inertia (one for D0
and one for D1
) helps
the user to choose the mixing parameter alpha
.
1 | choicealpha(D0, D1, range.alpha, K, wt = NULL, scale = TRUE, graph = TRUE)
|
D0 |
a dissimilarity matrix of class |
D1 |
an other dissimilarity matrix of class |
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 matrices are scaled i.e. divided by their max. |
graph |
if TRUE, two graphics (proportion and normalized proportion of explained inertia) are drawn. |
An object with S3 class "choicealpha" and the following components:
Q |
a matrix of dimension |
Qnorm |
a matrix of dimension |
M. Chavent, V. Kuentz-Simonet, A. Labenne, J. Saracco. ClustGeo: an R package for hierarchical clustering with spatial constraints. Comput Stat (2018) 33: 1799-1822.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.