labelmoments-methods | R Documentation |
Returns the list with the data frame Mij
containing the cluster levels l
, the numbers of pixels n
and the cluster moments
\bm{M} = (M_{\mathrm{10}}, M_{\mathrm{01}}, M_{\mathrm{11}})^{\top}
for 2D images or the data frame Mijk
containing the cluster levels l
, the numbers of voxels n
and the cluster moments \bm{M} = (M_{\mathrm{100}}, M_{\mathrm{010}}, M_{\mathrm{001}}, M_{\mathrm{111}})^{\top}
for 3D images and the adjacency matrix A
of size c_{\mathrm{max}} \times c_{\mathrm{max}}
. It may have some NA
rows and columns. To calculate the adjacency matrix A(i,j) = \exp{(-\|\bm{M}_{i} - \bm{M}_{j}\|^2 / 2 \sigma^2)}
, the raw cluster moments are first converted into z-scores.
## S4 method for signature 'array'
labelmoments(Zp = array(), cmax = integer(), Sigma = 1.0, ...)
## ... and for other signatures
Zp |
a 2D array of size |
cmax |
maximum number of clusters |
Sigma |
scale parameter |
... |
currently not used. |
signature(Zp = "array")
an array.
Marko Nagode, Branislav Panic
A. Ng, M. Jordan and Y. Weiss. On spectral clustering: Analysis and an algorithm. Advances in Neural Information Processing Systems 14 (NIPS 2001).
Zp <- matrix(rep(0, 100), nrow = 10, ncol = 10)
Zp[2, 2:4] <- 1;
Zp[2:4, 5] <- 2;
Zp[8, 7:10] <- 3;
Zp[9, 6] <- 4; Zp[10, 5] <- 4
Zp[10, 1:4] <- 5
Zp[6:9, 1] <- 6
labelmoments <- labelmoments(Zp, cmax = 6, Sigma = 1.0)
set.seed(12)
mergelabels <- mergelabels(list(labelmoments$A), w = 1.0, k = 2, nstart = 3)
Zp
mergelabels
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.