Description Usage Arguments Details Value Examples
View source: R/SC-MEB.R View source: R/RcppExports.R
The function ICMEM was used to conduct spatial clustering with hidden Markov random field for a sequence of beta and fixed number of clusters
1 2 3 4 5 6 7 8 9 10 11 12 | ICMEM(
y,
x_int,
Adj,
mu_int,
sigma_int,
alpha,
beta_grid,
PX,
maxIter_ICM,
maxIter
)
|
y |
is a matrix of PCs containing gene expression. |
x_int |
is a vector of initial cluster label. |
Adj |
is a matrix containing neighborhood information generated by find_neighbors2. |
mu_int |
is a initial mean vector. we often generated it by Gaussian mixture model. |
sigma_int |
is a initial co-variance matrix. we often generated it by Gaussian mixture model. |
alpha |
is a intercept. |
beta_grid |
is a sequence of smoothing parameter that can be specified by user. |
PX |
is a logical value specifying the parameter expansion in EM algorithm. |
maxIter_ICM |
is the maximum iteration of ICM algorithm. |
maxIter |
is the maximum iteration of EM algorithm. |
The function ICMEM was used to conduct spatial clustering with hidden Markov random field for fixed beta and fixed number of clusters
a list.
The item 'x' is the clustering result.
The item 'gam' is the posterior probability matrix.
The item 'ell' is the opposite log-likelihood.
The item 'mu' is the mean of each component.
The item 'sigma' is the variance of each component.
1 2 3 4 5 6 7 8 9 10 11 12 13 | y = matrix(rnorm(50, 0, 1), 25,2)
pos = cbind(rep(1:5, each=5), rep(1:5, 5))
Adj = getneighborhood_fast(pos, 1.2)
beta_grid = c(0.5,1)
G = 2
fit_int = Mclust(y, G = G)
x_gmm <- fit_int$classification
mu_int <- unname(fit_int$parameter$mean)
sigma_int <- unname(fit_int$parameter$variance$sigma)
alpha <- -log(fit_int$parameter$pro)*0
reslist <- ICMEM(y = y, x_int = x_gmm, Adj = Adj, mu_int = mu_int, sigma_int = sigma_int,
alpha = alpha, beta_grid = beta_grid,
PX = TRUE, maxIter_ICM = 10, maxIter = 50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.