All Projects → mpadge → spatialcluster

mpadge / spatialcluster

Licence: other
spatially-constrained clustering in R

Programming Languages

C++
36643 projects - #6 most used programming language
r
7636 projects
c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to spatialcluster

scanstatistics
An R package for space-time anomaly detection using scan statistics.
Stars: ✭ 41 (+64%)
Mutual labels:  cluster, spatial
Genetic-Algorithm-on-K-Means-Clustering
Implementing Genetic Algorithm on K-Means and compare with K-Means++
Stars: ✭ 37 (+48%)
Mutual labels:  cluster, clustering-algorithm
AMapMarker-master
提供一种高德地图自定义marker的解决方案以及改善高德官方点聚合功能
Stars: ✭ 63 (+152%)
Mutual labels:  cluster
recmap
Draw your own Rectangular Statistical Cartogram - CRAN package
Stars: ✭ 18 (-28%)
Mutual labels:  spatial
st-hadoop
ST-Hadoop is an open-source MapReduce extension of Hadoop designed specially to analyze your spatio-temporal data efficiently
Stars: ✭ 17 (-32%)
Mutual labels:  spatial
core
augejs is a progressive Node.js framework for building applications. https://github.com/augejs/augejs.github.io
Stars: ✭ 18 (-28%)
Mutual labels:  cluster
cyoptics-clustering
Fast OPTICS clustering in Cython + gradient cluster extraction
Stars: ✭ 23 (-8%)
Mutual labels:  clustering-algorithm
Spatial pre2021
This repo has been archived. The latest version of the GIS and Spatial Analysis online book is at https://github.com/mgimond/Spatial
Stars: ✭ 88 (+252%)
Mutual labels:  spatial
dev-gateway
Local development cluster with "now" path aliases syntax support. Allows running multiple microservices as one solid server.
Stars: ✭ 32 (+28%)
Mutual labels:  cluster
kubernetes-marketplace
Marketplace of Kubernetes applications available for quick and easy installation in to Civo Kubernetes clusters
Stars: ✭ 136 (+444%)
Mutual labels:  cluster
Clustering-in-Python
Clustering methods in Machine Learning includes both theory and python code of each algorithm. Algorithms include K Mean, K Mode, Hierarchical, DB Scan and Gaussian Mixture Model GMM. Interview questions on clustering are also added in the end.
Stars: ✭ 27 (+8%)
Mutual labels:  clustering-algorithm
ring-election
A node js library with a distributed leader/follower algorithm ready to be used
Stars: ✭ 92 (+268%)
Mutual labels:  cluster
bvh-tree
A Bounding Volume Hierarchy implementation using javascript
Stars: ✭ 41 (+64%)
Mutual labels:  spatial
kmedoids
The Partitioning Around Medoids (PAM) implementation of the K-Medoids algorithm in Python [Unmaintained]
Stars: ✭ 18 (-28%)
Mutual labels:  cluster
docker-rabbitmq-ha-cluster
A docker stack to create, test and benchmark a rabbitmq cluster in high availability configuration. HAProxy, php workers, node failures, network partition, persistent messages.
Stars: ✭ 98 (+292%)
Mutual labels:  cluster
minidb
A minimal in-memory distributed master-less document database
Stars: ✭ 29 (+16%)
Mutual labels:  cluster
Clustering
Implements "Clustering a Million Faces by Identity"
Stars: ✭ 128 (+412%)
Mutual labels:  clustering-algorithm
NLMR
📦 R package to simulate neutral landscape models 🏔
Stars: ✭ 57 (+128%)
Mutual labels:  spatial
dlaCluster
Python code for simple diffusion limited aggregation (DLA) simulation. The code provided creates a .gif for cluster growth and calculates fractal dimensionality of the cluster. User can vary the radius of the cluster.
Stars: ✭ 23 (-8%)
Mutual labels:  cluster
fred.rs
A Redis Client for Rust based on Futures and Tokio
Stars: ✭ 97 (+288%)
Mutual labels:  cluster

R build status Project Status: WIP codecov

spatialcluster

An R package for spatially-constrained clustering using either distance or covariance matrices. “Spatially-constrained” means that the data from which clusters are to be formed also map on to spatial reference points, and the constraint is that clusters must be spatially contiguous.

The package includes both an implementation of the REDCAP collection of efficient yet approximate algorithms described in D. Guo’s 2008 paper, “Regionalization with dynamically constrained agglomerative clustering and partitioning.” (pdf available here), with extension to covariance matrices, and a new technique for computing clusters using complete data sets. The package is also designed to analyse matrices of spatial interactions (counts, densities) between sets of origin and destination points. The spatial structure of interaction matrices is able to be statistically analysed to yield both global statistics for the overall spatial structure, and local statistics for individual clusters.

Installation

The easiest way to install spatialcluster is be enabling the corresponding r-universe:

options(repos = c(
                  mpadge = 'https://mpadge.r-universe.dev',
                  CRAN = 'https://cloud.r-project.org'))

The package can then be installed as usual with,

install.packges ("spatialcluster")

Alternatively, the package can also be installed using any of the following options:

# install.packages("remotes")
remotes::install_git("https://git.sr.ht/~mpadge/spatialcluster")
remotes::install_bitbucket("mpadge/spatialcluster")
remotes::install_gitlab("mpadge/spatialcluster")
remotes::install_github("mpadge/spatialcluster")

Usage

The two main functions, scl_redcap() and scl_full(), implement different algorithms for spatial clustering. The former implements the algorithms of REDCAP collection of efficient yet approximate algorithms described in D. Guo’s 2008 paper, “Regionalization with dynamically constrained agglomerative clustering and partitioning.” (pdf available here), yet also here allowing covariance matrices to be submitted to clustering routines. These algorithms are computationally efficient yet generate only approximate estimates of underlying clusters. The latter function, scl_full(), trades computational efficiency for accuracy, through generating clustering schemes using all available data.

In short:

  • scl_full() should always be preferred as long as it returns results within a reasonable amount of time
  • scl_redcap() should be used only where data are too large for scl_full() to be run in a reasonable time.

Both of these functions require three main arguments:

  1. A rectangular matrix of coordinates of points to be clustered (n rows; at least 2 columns);
  2. An n-by-n square matrix quantifying relationships between those points;
  3. A single value (ncl) specifying the desired number of clusters.

Usage can be demonstrated with some simple fake data:

set.seed (1)
n <- 100
xy <- matrix (runif (2 * n), ncol = 2)
dmat <- matrix (runif (n ^ 2), ncol = n)

The load the package and call the function:

scl <- scl_full (xy, dmat, ncl = 8, linkage = "average")
plot (scl)

scl <- scl_redcap (xy, dmat, ncl = 8, linkage = "complete")
plot (scl)

This example illustrates the universal danger in all clustering algorithms: they can not fail to produce results, even when the data fed to them are definitely devoid of any information as in this example. Clustering algorithms should only be applied to reflect a very specific hypothesis for why data should be clustered in the first place; spatial clustering algorithms should only be applied to reflect two very specific hypothesis for (i) why data should be clustered at all, and (ii) why those clusters should manifest a spatial pattern.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].