ClustGeo: an R package for hierarchical clustering with spatial constraints
In this paper, we propose a Ward-like hierarchical clustering algorithm including spatial/geographical constraints. Two dissimilarity matrices \(D_0\) and \(D_1\) are inputted, along with a mixing parameter \(\alpha \in [0,1]\). The dissimilarities can be non-Euclidean and the weights of the observations can be non-uniform. The first matrix gives the dissimilarities in the “feature space” and the second matrix gives the dissimilarities in the “constraint space”. The criterion minimized at each stage is a convex combination of the homogeneity criterion calculated with \(D_0\) and the homogeneity criterion calculated with \(D_1\). The idea is then to determine a value of \(\alpha \) which increases the spatial contiguity without deteriorating too much the quality of the solution based on the variables of interest i.e. those of the feature space. This procedure is illustrated on a real dataset using the R package ClustGeo.
KeywordsWard-like hierarchical clustering Soft contiguity constraints Pseudo-inertia Non-Euclidean dissimilarities Geographical distances
The authors are grateful to the editor and the anonymous referees for their valuable comments that lead to several improvements of this article.
- Bécue-Bertaut M, Alvarez-Esteban R, Sànchez-Espigares JA (2017) Xplortext: statistical analysis of textual data R package. R package version 1.0. https://cran.r-project.org/package=Xplortext. Accessed 26 Oct 2017
- Chavent M, Kuentz-Simonet V, Labenne A, Saracco J (2017) ClustGeo: hierarchical clustering with spatial constraints. R package version 2.0. https://cran.r-project.org/package=ClustGeo. Accessed 14 July 2017
- Duque JC, Dev B, Betancourt A, Franco JL (2011) ClusterPy: library of spatially constrained clustering algorithms, RiSE-group (research in spatial economics). EAFIT University. Version 0.9.9. http://www.rise-group.org/risem/clusterpy/. Accessed 19 July 2017
- Legendre P (2014) const.clust: Space- and time-constrained clustering package. http://adn.biol.umontreal.ca/~numericalecology/Rcode/. Accessed 30 Mar 2014