| mergelabels-methods {rebmix} | R Documentation |
Merge Labels Based on Probability Adjacency Matrix
Description
Returns the list with the normalised adjacency matrix L of size c \times c. The normalised adjacency matrix
L = D^{-1/2} P D^{-1/2} depends on the probability adjacency matrix P(i,j) = \sum_{l = 1}^{n} p_{l} A_{l}(i,j), where p_{l} = w_{l} / \sum_{i = 1}^{c}\sum_{j = i + 1}^{c} A_{l}(i,j)
and the degree matrix D(i,i) = \sum_{j = 1}^{c} P(i,j). The A_{l} matrices may contain some NA rows and columns, which are eliminated by the method.
The list also contains the vector of integers cluster of length k, which indicates the cluster to which each label is assigned.
Usage
## S4 method for signature 'list'
mergelabels(A = list(), w = numeric(), k = 2, ...)
## ... and for other signatures
Arguments
A |
a list of length |
w |
vector of length |
k |
number of clusters |
... |
further arguments to |
Methods
signature(A = "list")a list.
Author(s)
Marko Nagode, Branislav Panic
References
A. Ng, M. Jordan and Y. Weiss. On spectral clustering: Analysis and an algorithm. Advances in Neural Information Processing Systems 14 (NIPS 2001).
Examples
Zp <- array(0, dim = c(10, 10, 2))
Zp[ , ,1][10, 1:4] <- 1
Zp[ , ,1][1:4, 10] <- 2
Zp[ , ,2][9, 1:5] <- 3
Zp[ , ,2][1:6, 9] <- 4
labelmoments <- labelmoments(Zp, cmax = 4, Sigma = 1.0)
labelmoments
set.seed(3)
mergelabels <- mergelabels(list(labelmoments$A), w = 1.0, k = 2, nstart = 5)
Zp
mergelabels