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×cc \times c. The normalised adjacency matrix L=D1/2PD1/2L = D^{-1/2} P D^{-1/2} depends on the probability adjacency matrix P(i,j)=l=1nplAl(i,j)P(i,j) = \sum_{l = 1}^{n} p_{l} A_{l}(i,j), where pl=wl/i=1cj=i+1cAl(i,j)p_{l} = w_{l} / \sum_{i = 1}^{c}\sum_{j = i + 1}^{c} A_{l}(i,j) and the degree matrix D(i,i)=j=1cP(i,j)D(i,i) = \sum_{j = 1}^{c} P(i,j). The AlA_{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 kk, 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 nn of adjacency matrices AlA_{l} of size cmax×cmaxc_{\mathrm{max}} \times c_{\mathrm{max}}, where cmaxcc_{\mathrm{max}} \geq c.

w

vector of length nn containing weights wlw_{l} summing to 1.

k

number of clusters kk for kmeans. The default value is 2.

...

further arguments to kmeans.

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

[Package rebmix version 2.16.0 Index]