Learn R Programming

spatgraphs (version 2.62)

spatgraph-spectral: Spectral clustering

Description

Spectral clustering: Given a weighted adjacency matrix W and G=diag(rowSums(W)), the Laplacian of the graph is L=G-W. We compute the eigenvalues of L, and for the 2:(m+1) smallest eigenvalues, we use the corresponding eigenvectors to do a K-means clustering.

Usage

spectral.sg(x, pp, m=2, K=3, diagplot=FALSE, ...)

Arguments

x
Weighted graph, sg-object. Will be transformed to W using sg2wadj().
pp
Point pattern.
m
Number of eigenvectors to use.
K
Number of clusters to look for using K-means.
diagplot
Plot some diagnostics: Result: first 20 eigenvalues and m eigenvectors.
...
Not used at the moment.

Value

  • List with $id element denoting each points cluster id, and $sgc is a spatcluster-object with the clusters.

Details

ll{ Date: 2011-04-15 License: GPL v2 or later }