geosnap.analyze.analytics.ward_spatial¶
-
geosnap.analyze.analytics.
ward_spatial
(X, w, n_clusters=5, **kwargs)[source]¶ - Agglomerative clustering using Ward linkage with a spatial connectivity
constraint
- Parameters
- Xarray-like
n x k attribute data
- wPySAL W instance
spatial weights matrix
- n_clustersint, optional, default: 5
The number of clusters to form.
- Returns
- model: sklearn AgglomerativeClustering instance